Player spawn sound (no hero)

In this forum you will find and post information regarding the modding of Star Wars Battlefront 2. DO NOT POST MOD IDEAS/REQUESTS.

Moderator: Moderators

Deviss
Master of the Force
Master of the Force
Posts: 3772
Joined: Tue Aug 12, 2008 7:59 pm
Projects :: Clone Wars Extended
Games I'm Playing :: BF2

Re: Player spawn sound (no hero)

Post by Deviss »

StarkillerMarek wrote:

Code: Select all

OnCharacterSpawn: function(player)
         if GetEnityClass(player) == FindEnityClass("commandoclassnamehere") then
         ScriptCB_SndPlaySound("commandospawnsound")
       end
end
This is what I think will work, by the way. I am not sure that it will work, and I'd appreciate it if someone could correct me if I am wrong.
in what section of the lua i put that :D ? and into unit odf must to be this because is commando type:

SndcommandoSpawned = "delta38_spawn"
User avatar
StarkillerMarek
Rebel Colonel
Rebel Colonel
Posts: 611
Joined: Wed Aug 12, 2009 4:42 pm
Location: I may be back.

Re: Player spawn sound (no hero)

Post by StarkillerMarek »

It can be placed anywhere in the ScriptPostLoad section of the Lua. I am not sure exactly what you mean about the odf.
Deviss
Master of the Force
Master of the Force
Posts: 3772
Joined: Tue Aug 12, 2008 7:59 pm
Projects :: Clone Wars Extended
Games I'm Playing :: BF2

Re: Player spawn sound (no hero)

Post by Deviss »

StarkillerMarek wrote:It can be placed anywhere in the ScriptPostLoad section of the Lua. I am not sure exactly what you mean about the odf.
into odf i must put spawn sound with that line

SndcommandoSpawned = "delta38_spawn"
or must to be

SndheroSpawned = "delta38_spawn"
??
User avatar
StarkillerMarek
Rebel Colonel
Rebel Colonel
Posts: 611
Joined: Wed Aug 12, 2009 4:42 pm
Location: I may be back.

Re: Player spawn sound (no hero)

Post by StarkillerMarek »

If I understand correctly, you do not need that line at all in the odf, if you use the code I gave you. You just need to be loading(in a req) the commando spawn sound, and change the two lines in the Lua to your commando class name, and the commando spawn sound.
Deviss
Master of the Force
Master of the Force
Posts: 3772
Joined: Tue Aug 12, 2008 7:59 pm
Projects :: Clone Wars Extended
Games I'm Playing :: BF2

Re: Player spawn sound (no hero)

Post by Deviss »

StarkillerMarek wrote:If I understand correctly, you do not need that line at all in the odf, if you use the code I gave you. You just need to be loading(in a req) the commando spawn sound, and change the two lines in the Lua to your commando class name, and the commando spawn sound.
bes2x_con
Hidden/Spoiler:
--
-- Copyright (c) 2005 Pandemic Studios, LLC. All rights reserved.
--

-- load the gametype script
ScriptCB_DoFile("ObjectiveConquest")
ScriptCB_DoFile("setup_teams")
ScriptCB_DoFile("AIHeroSupport")

-- REP Attacking (attacker is always #1)
REP = 1;
CIS = 2;
-- These variables do not change
ATT = REP;
DEF = CIS;


function ScriptPostLoad()


--This defines the CPs. These need to happen first
cp1 = CommandPost:New{name = "CP1"}
cp2 = CommandPost:New{name = "CP2"}
cp3 = CommandPost:New{name = "CP3"}
cp4 = CommandPost:New{name = "CP4"}
cp5 = CommandPost:New{name = "CP5"}
cp6 = CommandPost:New{name = "CP7"}



--This sets up the actual objective. This needs to happen after cp's are defined
conquest = ObjectiveConquest:New{teamATT = ATT, teamDEF = DEF,
textATT = "game.modes.con",
textDEF = "game.modes.con2",
multiplayerRules = true}

--This adds the CPs to the objective. This needs to happen after the objective is set up
conquest:AddCommandPost(cp1)
conquest:AddCommandPost(cp2)
conquest:AddCommandPost(cp3)
conquest:AddCommandPost(cp4)
conquest:AddCommandPost(cp5)
conquest:AddCommandPost(cp6)

conquest:Start()

herosupport = AIHeroSupport:New{AIATTHeroHealth = 2500, AIDEFHeroHealth = 3000, gameMode = "conquest",}
herosupport:SetHeroClass(CIS, "cis_hero_jangofett")
herosupport:AddSpawnCP("cp1","cp1spawn")
herosupport:AddSpawnCP("cp2","cp2spawn")
herosupport:AddSpawnCP("cp3","cp3spawn")
herosupport:AddSpawnCP("cp4","cp4spawn")
herosupport:AddSpawnCP("cp5","cp5spawn")
herosupport:AddSpawnCP("cp7","cp7spawn")
herosupport:Start()

EnableSPHeroRules()

AddDeathRegion("DeathRegion")
AddDeathRegion("DeathRegion2")

OnCharacterSpawn: function(player)

if GetEnityClass(player) == FindEnityClass("rep_clone9") then
ScriptCB_SndPlaySound("delta38_spawn")

end


---------------------------------------------------------------------------
-- FUNCTION: ScriptInit
-- PURPOSE: This function is only run once
-- INPUT:
-- OUTPUT:
-- NOTES: The name, 'ScriptInit' is a chosen convention, and each
-- mission script must contain a version of this function, as
-- it is called from C to start the mission.
---------------------------------------------------------------------------
function ScriptInit()

SetUberMode(1);
ReadDataFile("ingame.lvl")


SetMaxFlyHeight(-5)
SetMaxPlayerFlyHeight (-5)

SetMemoryPoolSize ("ClothData",20)
SetMemoryPoolSize ("Combo",50) -- should be ~ 2x number of jedi classes
SetMemoryPoolSize ("Combo::State",650) -- should be ~12x #Combo
SetMemoryPoolSize ("Combo::Transition",650) -- should be a bit bigger than #Combo::State
SetMemoryPoolSize ("Combo::Condition",650) -- should be a bit bigger than #Combo::State
SetMemoryPoolSize ("Combo::Attack",550) -- should be ~8-12x #Combo
SetMemoryPoolSize ("Combo::DamageSample",6000) -- should be ~8-12x #Combo::Attack
SetMemoryPoolSize ("Combo::Deflect",100) -- should be ~1x #combo

ReadDataFile("sound\\cor.lvl;cor1cw")
ReadDataFile("dc:sound\\ABC.lvl;ABCcw")

ReadDataFile("SIDE\\rep.lvl",
"rep_hero_obiwan")

ReadDataFile("SIDE\\cis.lvl",
"cis_hero_jangofett")

ReadDataFile("dc:SIDE\\dev.lvl",
"rep_clone1",
"rep_clone2",
"rep_clone3",
"rep_clone4",
"rep_clone5",
"rep_clone6",
"rep_clone7",
"rep_clone8",
"rep_clone9",
"rep_clone10")

ReadDataFile("dc:SIDE\\fed.lvl",
"cis_droid1",
"cis_droid2",
"cis_droid3",
"cis_droid4",
"cis_droid5",
"cis_droid6",
"cis_droid7",
"cis_droid8",
"cis_droid9",
"cis_hero")

ReadDataFile("SIDE\\tur.lvl",
"tur_weap_built_gunturret",
"tur_bldg_laser")

SetupTeams{
rep = {
team = REP,
units = 40,
reinforcements = 150,
soldier = { "rep_clone1",10, 15},
heavy = { "rep_clone2",3,4},
sniper = { "rep_clone3",3,4},
engineer = { "rep_clone4",3,4},
marine = { "rep_clone5",3,4},
recon = { "rep_clone6",3,4},
gunner = { "rep_clone7",3,4},
special = { "rep_clone8",3,4},
commando = { "rep_clone9",3,4},
commander = { "rep_clone10",1,2},

},
cis = {
team = CIS,
units = 40,
reinforcements = 150,
soldier = { "cis_droid1",8, 20},
heavy = { "cis_droid2",4,5},
sniper = { "cis_droid3",4,5},
engineer = { "cis_droid4",4,5},
marine = { "cis_droid5",7,9},
recon = { "cis_droid6",3,4},
gunner = { "cis_droid7",3,4},
special = { "cis_droid8",1,1},
commander = { "cis_droid9",2,3},
}
}

SetHeroClass(REP, "rep_hero_obiwan")


-- Level Stats
-- ClearWalkers()
AddWalkerType(0, 20) -- special -> droidekas
AddWalkerType(1, 0) -- 1x2 (1 pair of legs)
AddWalkerType(2, 0) -- 2x2 (2 pairs of legs)
AddWalkerType(3, 0) -- 3x2 (3 pairs of legs)
local weaponCnt = 1024
SetMemoryPoolSize("Aimer", 75)
SetMemoryPoolSize("AmmoCounter", weaponCnt)
SetMemoryPoolSize("BaseHint", 1024)
SetMemoryPoolSize("EnergyBar", weaponCnt)
SetMemoryPoolSize("EntityCloth", 32)
SetMemoryPoolSize("EntityFlyer", 32)
SetMemoryPoolSize("EntityHover", 32)
SetMemoryPoolSize("EntityLight", 200)
SetMemoryPoolSize("EntitySoundStream", 4)
SetMemoryPoolSize("EntitySoundStatic", 32)
SetMemoryPoolSize("MountedTurret", 32)
SetMemoryPoolSize("Navigator", 128)
SetMemoryPoolSize("Obstacle", 1024)
SetMemoryPoolSize("PathNode", 1024)
SetMemoryPoolSize("SoldierAnimation", 370)
SetMemoryPoolSize("SoundSpaceRegion", 64)
SetMemoryPoolSize("TreeGridStack", 1024)
SetMemoryPoolSize("UnitAgent", 128)
SetMemoryPoolSize("UnitController", 128)
SetMemoryPoolSize("Weapon", weaponCnt)

SetSpawnDelay(10.0, 0.25)
ReadDataFile("dc:ABC\\bes2.lvl", "bespin2_conquest")
SetDenseEnvironment("false")

-- Sound Stats

voiceSlow = OpenAudioStream("sound\\global.lvl", "rep_unit_vo_slow")
AudioStreamAppendSegments("sound\\global.lvl", "cis_unit_vo_slow", voiceSlow)
AudioStreamAppendSegments("sound\\global.lvl", "global_vo_slow", voiceSlow)

voiceQuick = OpenAudioStream("sound\\global.lvl", "rep_unit_vo_quick")
AudioStreamAppendSegments("sound\\global.lvl", "cis_unit_vo_quick", voiceQuick)

OpenAudioStream("sound\\global.lvl", "cw_music")
OpenAudioStream("dc:sound\\ABC.lvl", "ABC_stream")
-- OpenAudioStream("sound\\global.lvl", "global_vo_quick")
-- OpenAudioStream("sound\\global.lvl", "global_vo_slow")
OpenAudioStream("sound\\cor.lvl", "cor1")
OpenAudioStream("sound\\cor.lvl", "cor1")
-- OpenAudioStream("sound\\cor.lvl", "cor1_emt")

SetBleedingVoiceOver(REP, REP, "rep_off_com_report_us_overwhelmed", 1)
SetBleedingVoiceOver(REP, CIS, "rep_off_com_report_enemy_losing", 1)
SetBleedingVoiceOver(CIS, REP, "cis_off_com_report_enemy_losing", 1)
SetBleedingVoiceOver(CIS, CIS, "cis_off_com_report_us_overwhelmed", 1)

SetLowReinforcementsVoiceOver(REP, REP, "rep_off_defeat_im", .1, 1)
SetLowReinforcementsVoiceOver(REP, CIS, "rep_off_victory_im", .1, 1)
SetLowReinforcementsVoiceOver(CIS, CIS, "cis_off_defeat_im", .1, 1)
SetLowReinforcementsVoiceOver(CIS, REP, "cis_off_victory_im", .1, 1)

SetOutOfBoundsVoiceOver(2, "Repleaving")
SetOutOfBoundsVoiceOver(1, "Cisleaving")

SetAmbientMusic(REP, 1.0, "rep_cor_amb_start", 0,1)
SetAmbientMusic(REP, 0.8, "rep_cor_amb_middle", 1,1)
SetAmbientMusic(REP, 0.2, "rep_cor_amb_end", 2,1)
SetAmbientMusic(CIS, 1.0, "cis_cor_amb_start", 0,1)
SetAmbientMusic(CIS, 0.8, "cis_cor_amb_middle", 1,1)
SetAmbientMusic(CIS, 0.2, "cis_cor_amb_end", 2,1)

SetVictoryMusic(REP, "rep_cor_amb_victory")
SetDefeatMusic (REP, "rep_cor_amb_defeat")
SetVictoryMusic(CIS, "cis_cor_amb_victory")
SetDefeatMusic (CIS, "cis_cor_amb_defeat")

SetSoundEffect("ScopeDisplayZoomIn", "binocularzoomin")
SetSoundEffect("ScopeDisplayZoomOut", "binocularzoomout")
--SetSoundEffect("WeaponUnableSelect", "com_weap_inf_weaponchange_null")
--SetSoundEffect("WeaponModeUnableSelect", "com_weap_inf_modechange_null")
SetSoundEffect("SpawnDisplayUnitChange", "shell_select_unit")
SetSoundEffect("SpawnDisplayUnitAccept", "shell_menu_enter")
SetSoundEffect("SpawnDisplaySpawnPointChange", "shell_select_change")
SetSoundEffect("SpawnDisplaySpawnPointAccept", "shell_menu_enter")
SetSoundEffect("SpawnDisplayBack", "shell_menu_exit")


-- Camera Stats
--Bespin 2
--Courtyard
AddCameraShot(0.364258, -0.004224, -0.931226, -0.010797, -206.270294, -44.204708, 88.837059);
--Carbon Chamber
AddCameraShot(0.327508, 0.002799, -0.944810, 0.008076, -184.781006, -59.802036, -28.118919);
--Wind Tunnel
AddCameraShot(0.572544, -0.013560, -0.819532, -0.019410, -244.788055, -61.541622, -44.260509);
end
but any strange reason always say lua error XD
MercuryNoodles
Jedi
Jedi
Posts: 1003
Joined: Sun Mar 12, 2006 7:16 pm
Projects :: Space - Boarding Action
xbox live or psn: No gamertag set

Re: Player spawn sound (no hero)

Post by MercuryNoodles »

Just as a quick note: you can't simply make up odf parameters. You can only use ones that already exist. This is a video game, not a T-800 with a neural net processor. :P
User avatar
StarkillerMarek
Rebel Colonel
Rebel Colonel
Posts: 611
Joined: Wed Aug 12, 2009 4:42 pm
Location: I may be back.

Re: Player spawn sound (no hero)

Post by StarkillerMarek »

Deviss wrote:
StarkillerMarek wrote:If I understand correctly, you do not need that line at all in the odf, if you use the code I gave you. You just need to be loading(in a req) the commando spawn sound, and change the two lines in the Lua to your commando class name, and the commando spawn sound.
bes2x_con
Hidden/Spoiler:
--
-- Copyright (c) 2005 Pandemic Studios, LLC. All rights reserved.
--

-- load the gametype script
ScriptCB_DoFile("ObjectiveConquest")
ScriptCB_DoFile("setup_teams")
ScriptCB_DoFile("AIHeroSupport")

-- REP Attacking (attacker is always #1)
REP = 1;
CIS = 2;
-- These variables do not change
ATT = REP;
DEF = CIS;


function ScriptPostLoad()


--This defines the CPs. These need to happen first
cp1 = CommandPost:New{name = "CP1"}
cp2 = CommandPost:New{name = "CP2"}
cp3 = CommandPost:New{name = "CP3"}
cp4 = CommandPost:New{name = "CP4"}
cp5 = CommandPost:New{name = "CP5"}
cp6 = CommandPost:New{name = "CP7"}



--This sets up the actual objective. This needs to happen after cp's are defined
conquest = ObjectiveConquest:New{teamATT = ATT, teamDEF = DEF,
textATT = "game.modes.con",
textDEF = "game.modes.con2",
multiplayerRules = true}

--This adds the CPs to the objective. This needs to happen after the objective is set up
conquest:AddCommandPost(cp1)
conquest:AddCommandPost(cp2)
conquest:AddCommandPost(cp3)
conquest:AddCommandPost(cp4)
conquest:AddCommandPost(cp5)
conquest:AddCommandPost(cp6)

conquest:Start()

herosupport = AIHeroSupport:New{AIATTHeroHealth = 2500, AIDEFHeroHealth = 3000, gameMode = "conquest",}
herosupport:SetHeroClass(CIS, "cis_hero_jangofett")
herosupport:AddSpawnCP("cp1","cp1spawn")
herosupport:AddSpawnCP("cp2","cp2spawn")
herosupport:AddSpawnCP("cp3","cp3spawn")
herosupport:AddSpawnCP("cp4","cp4spawn")
herosupport:AddSpawnCP("cp5","cp5spawn")
herosupport:AddSpawnCP("cp7","cp7spawn")
herosupport:Start()

EnableSPHeroRules()

AddDeathRegion("DeathRegion")
AddDeathRegion("DeathRegion2")

OnCharacterSpawn: function(player)

if GetEnityClass(player) == FindEnityClass("rep_clone9") then
ScriptCB_SndPlaySound("delta38_spawn")

end


---------------------------------------------------------------------------
-- FUNCTION: ScriptInit
-- PURPOSE: This function is only run once
-- INPUT:
-- OUTPUT:
-- NOTES: The name, 'ScriptInit' is a chosen convention, and each
-- mission script must contain a version of this function, as
-- it is called from C to start the mission.
---------------------------------------------------------------------------
function ScriptInit()

SetUberMode(1);
ReadDataFile("ingame.lvl")


SetMaxFlyHeight(-5)
SetMaxPlayerFlyHeight (-5)

SetMemoryPoolSize ("ClothData",20)
SetMemoryPoolSize ("Combo",50) -- should be ~ 2x number of jedi classes
SetMemoryPoolSize ("Combo::State",650) -- should be ~12x #Combo
SetMemoryPoolSize ("Combo::Transition",650) -- should be a bit bigger than #Combo::State
SetMemoryPoolSize ("Combo::Condition",650) -- should be a bit bigger than #Combo::State
SetMemoryPoolSize ("Combo::Attack",550) -- should be ~8-12x #Combo
SetMemoryPoolSize ("Combo::DamageSample",6000) -- should be ~8-12x #Combo::Attack
SetMemoryPoolSize ("Combo::Deflect",100) -- should be ~1x #combo

ReadDataFile("sound\\cor.lvl;cor1cw")
ReadDataFile("dc:sound\\ABC.lvl;ABCcw")

ReadDataFile("SIDE\\rep.lvl",
"rep_hero_obiwan")

ReadDataFile("SIDE\\cis.lvl",
"cis_hero_jangofett")

ReadDataFile("dc:SIDE\\dev.lvl",
"rep_clone1",
"rep_clone2",
"rep_clone3",
"rep_clone4",
"rep_clone5",
"rep_clone6",
"rep_clone7",
"rep_clone8",
"rep_clone9",
"rep_clone10")

ReadDataFile("dc:SIDE\\fed.lvl",
"cis_droid1",
"cis_droid2",
"cis_droid3",
"cis_droid4",
"cis_droid5",
"cis_droid6",
"cis_droid7",
"cis_droid8",
"cis_droid9",
"cis_hero")

ReadDataFile("SIDE\\tur.lvl",
"tur_weap_built_gunturret",
"tur_bldg_laser")

SetupTeams{
rep = {
team = REP,
units = 40,
reinforcements = 150,
soldier = { "rep_clone1",10, 15},
heavy = { "rep_clone2",3,4},
sniper = { "rep_clone3",3,4},
engineer = { "rep_clone4",3,4},
marine = { "rep_clone5",3,4},
recon = { "rep_clone6",3,4},
gunner = { "rep_clone7",3,4},
special = { "rep_clone8",3,4},
commando = { "rep_clone9",3,4},
commander = { "rep_clone10",1,2},

},
cis = {
team = CIS,
units = 40,
reinforcements = 150,
soldier = { "cis_droid1",8, 20},
heavy = { "cis_droid2",4,5},
sniper = { "cis_droid3",4,5},
engineer = { "cis_droid4",4,5},
marine = { "cis_droid5",7,9},
recon = { "cis_droid6",3,4},
gunner = { "cis_droid7",3,4},
special = { "cis_droid8",1,1},
commander = { "cis_droid9",2,3},
}
}

SetHeroClass(REP, "rep_hero_obiwan")


-- Level Stats
-- ClearWalkers()
AddWalkerType(0, 20) -- special -> droidekas
AddWalkerType(1, 0) -- 1x2 (1 pair of legs)
AddWalkerType(2, 0) -- 2x2 (2 pairs of legs)
AddWalkerType(3, 0) -- 3x2 (3 pairs of legs)
local weaponCnt = 1024
SetMemoryPoolSize("Aimer", 75)
SetMemoryPoolSize("AmmoCounter", weaponCnt)
SetMemoryPoolSize("BaseHint", 1024)
SetMemoryPoolSize("EnergyBar", weaponCnt)
SetMemoryPoolSize("EntityCloth", 32)
SetMemoryPoolSize("EntityFlyer", 32)
SetMemoryPoolSize("EntityHover", 32)
SetMemoryPoolSize("EntityLight", 200)
SetMemoryPoolSize("EntitySoundStream", 4)
SetMemoryPoolSize("EntitySoundStatic", 32)
SetMemoryPoolSize("MountedTurret", 32)
SetMemoryPoolSize("Navigator", 128)
SetMemoryPoolSize("Obstacle", 1024)
SetMemoryPoolSize("PathNode", 1024)
SetMemoryPoolSize("SoldierAnimation", 370)
SetMemoryPoolSize("SoundSpaceRegion", 64)
SetMemoryPoolSize("TreeGridStack", 1024)
SetMemoryPoolSize("UnitAgent", 128)
SetMemoryPoolSize("UnitController", 128)
SetMemoryPoolSize("Weapon", weaponCnt)

SetSpawnDelay(10.0, 0.25)
ReadDataFile("dc:ABC\\bes2.lvl", "bespin2_conquest")
SetDenseEnvironment("false")

-- Sound Stats

voiceSlow = OpenAudioStream("sound\\global.lvl", "rep_unit_vo_slow")
AudioStreamAppendSegments("sound\\global.lvl", "cis_unit_vo_slow", voiceSlow)
AudioStreamAppendSegments("sound\\global.lvl", "global_vo_slow", voiceSlow)

voiceQuick = OpenAudioStream("sound\\global.lvl", "rep_unit_vo_quick")
AudioStreamAppendSegments("sound\\global.lvl", "cis_unit_vo_quick", voiceQuick)

OpenAudioStream("sound\\global.lvl", "cw_music")
OpenAudioStream("dc:sound\\ABC.lvl", "ABC_stream")
-- OpenAudioStream("sound\\global.lvl", "global_vo_quick")
-- OpenAudioStream("sound\\global.lvl", "global_vo_slow")
OpenAudioStream("sound\\cor.lvl", "cor1")
OpenAudioStream("sound\\cor.lvl", "cor1")
-- OpenAudioStream("sound\\cor.lvl", "cor1_emt")

SetBleedingVoiceOver(REP, REP, "rep_off_com_report_us_overwhelmed", 1)
SetBleedingVoiceOver(REP, CIS, "rep_off_com_report_enemy_losing", 1)
SetBleedingVoiceOver(CIS, REP, "cis_off_com_report_enemy_losing", 1)
SetBleedingVoiceOver(CIS, CIS, "cis_off_com_report_us_overwhelmed", 1)

SetLowReinforcementsVoiceOver(REP, REP, "rep_off_defeat_im", .1, 1)
SetLowReinforcementsVoiceOver(REP, CIS, "rep_off_victory_im", .1, 1)
SetLowReinforcementsVoiceOver(CIS, CIS, "cis_off_defeat_im", .1, 1)
SetLowReinforcementsVoiceOver(CIS, REP, "cis_off_victory_im", .1, 1)

SetOutOfBoundsVoiceOver(2, "Repleaving")
SetOutOfBoundsVoiceOver(1, "Cisleaving")

SetAmbientMusic(REP, 1.0, "rep_cor_amb_start", 0,1)
SetAmbientMusic(REP, 0.8, "rep_cor_amb_middle", 1,1)
SetAmbientMusic(REP, 0.2, "rep_cor_amb_end", 2,1)
SetAmbientMusic(CIS, 1.0, "cis_cor_amb_start", 0,1)
SetAmbientMusic(CIS, 0.8, "cis_cor_amb_middle", 1,1)
SetAmbientMusic(CIS, 0.2, "cis_cor_amb_end", 2,1)

SetVictoryMusic(REP, "rep_cor_amb_victory")
SetDefeatMusic (REP, "rep_cor_amb_defeat")
SetVictoryMusic(CIS, "cis_cor_amb_victory")
SetDefeatMusic (CIS, "cis_cor_amb_defeat")

SetSoundEffect("ScopeDisplayZoomIn", "binocularzoomin")
SetSoundEffect("ScopeDisplayZoomOut", "binocularzoomout")
--SetSoundEffect("WeaponUnableSelect", "com_weap_inf_weaponchange_null")
--SetSoundEffect("WeaponModeUnableSelect", "com_weap_inf_modechange_null")
SetSoundEffect("SpawnDisplayUnitChange", "shell_select_unit")
SetSoundEffect("SpawnDisplayUnitAccept", "shell_menu_enter")
SetSoundEffect("SpawnDisplaySpawnPointChange", "shell_select_change")
SetSoundEffect("SpawnDisplaySpawnPointAccept", "shell_menu_enter")
SetSoundEffect("SpawnDisplayBack", "shell_menu_exit")


-- Camera Stats
--Bespin 2
--Courtyard
AddCameraShot(0.364258, -0.004224, -0.931226, -0.010797, -206.270294, -44.204708, 88.837059);
--Carbon Chamber
AddCameraShot(0.327508, 0.002799, -0.944810, 0.008076, -184.781006, -59.802036, -28.118919);
--Wind Tunnel
AddCameraShot(0.572544, -0.013560, -0.819532, -0.019410, -244.788055, -61.541622, -44.260509);
end
but any strange reason always say lua error XD
You ed another "end" after my code.
Deviss
Master of the Force
Master of the Force
Posts: 3772
Joined: Tue Aug 12, 2008 7:59 pm
Projects :: Clone Wars Extended
Games I'm Playing :: BF2

Re: Player spawn sound (no hero)

Post by Deviss »

StarkillerMarek wrote: You ed another "end" after my code.
i munged unles 30 times lol new but anywat dont work :S
Hidden/Spoiler:
--
-- Copyright (c) 2005 Pandemic Studios, LLC. All rights reserved.
--

-- load the gametype script
ScriptCB_DoFile("ObjectiveConquest")
ScriptCB_DoFile("setup_teams")
ScriptCB_DoFile("AIHeroSupport")

-- REP Attacking (attacker is always #1)
REP = 1;
CIS = 2;
-- These variables do not change
ATT = REP;
DEF = CIS;


function ScriptPostLoad()


--This defines the CPs. These need to happen first
cp1 = CommandPost:New{name = "CP1"}
cp2 = CommandPost:New{name = "CP2"}
cp3 = CommandPost:New{name = "CP3"}
cp4 = CommandPost:New{name = "CP4"}
cp5 = CommandPost:New{name = "CP5"}
cp6 = CommandPost:New{name = "CP7"}



--This sets up the actual objective. This needs to happen after cp's are defined
conquest = ObjectiveConquest:New{teamATT = ATT, teamDEF = DEF,
textATT = "game.modes.con",
textDEF = "game.modes.con2",
multiplayerRules = true}

--This adds the CPs to the objective. This needs to happen after the objective is set up
conquest:AddCommandPost(cp1)
conquest:AddCommandPost(cp2)
conquest:AddCommandPost(cp3)
conquest:AddCommandPost(cp4)
conquest:AddCommandPost(cp5)
conquest:AddCommandPost(cp6)

conquest:Start()

herosupport = AIHeroSupport:New{AIATTHeroHealth = 2500, AIDEFHeroHealth = 3000, gameMode = "conquest",}
herosupport:SetHeroClass(CIS, "cis_hero_jangofett")
herosupport:AddSpawnCP("cp1","cp1spawn")
herosupport:AddSpawnCP("cp2","cp2spawn")
herosupport:AddSpawnCP("cp3","cp3spawn")
herosupport:AddSpawnCP("cp4","cp4spawn")
herosupport:AddSpawnCP("cp5","cp5spawn")
herosupport:AddSpawnCP("cp7","cp7spawn")
herosupport:Start()

EnableSPHeroRules()

AddDeathRegion("DeathRegion")
AddDeathRegion("DeathRegion2")


OnCharacterSpawn = function(player)
if GetEnityClass(player) == FindEnityClass("rep_clone9") then
scriptCB_SndPlaySound("delta38_spawn")
end
end


---------------------------------------------------------------------------
-- FUNCTION: ScriptInit
-- PURPOSE: This function is only run once
-- INPUT:
-- OUTPUT:
-- NOTES: The name, 'ScriptInit' is a chosen convention, and each
-- mission script must contain a version of this function, as
-- it is called from C to start the mission.
---------------------------------------------------------------------------
function ScriptInit()

SetUberMode(1);
ReadDataFile("ingame.lvl")


SetMaxFlyHeight(-5)
SetMaxPlayerFlyHeight (-5)

SetMemoryPoolSize ("ClothData",20)
SetMemoryPoolSize ("Combo",50) -- should be ~ 2x number of jedi classes
SetMemoryPoolSize ("Combo::State",650) -- should be ~12x #Combo
SetMemoryPoolSize ("Combo::Transition",650) -- should be a bit bigger than #Combo::State
SetMemoryPoolSize ("Combo::Condition",650) -- should be a bit bigger than #Combo::State
SetMemoryPoolSize ("Combo::Attack",550) -- should be ~8-12x #Combo
SetMemoryPoolSize ("Combo::DamageSample",6000) -- should be ~8-12x #Combo::Attack
SetMemoryPoolSize ("Combo::Deflect",100) -- should be ~1x #combo

ReadDataFile("sound\\cor.lvl;cor1cw")
ReadDataFile("dc:sound\\ABC.lvl;ABCcw")

ReadDataFile("SIDE\\rep.lvl",
"rep_hero_obiwan")

ReadDataFile("SIDE\\cis.lvl",
"cis_hero_jangofett")

ReadDataFile("dc:SIDE\\dev.lvl",
"rep_clone1",
"rep_clone2",
"rep_clone3",
"rep_clone4",
"rep_clone5",
"rep_clone6",
"rep_clone7",
"rep_clone8",
"rep_clone9",
"rep_clone10")

ReadDataFile("dc:SIDE\\fed.lvl",
"cis_droid1",
"cis_droid2",
"cis_droid3",
"cis_droid4",
"cis_droid5",
"cis_droid6",
"cis_droid7",
"cis_droid8",
"cis_droid9",
"cis_hero")

ReadDataFile("SIDE\\tur.lvl",
"tur_weap_built_gunturret",
"tur_bldg_laser")

SetupTeams{
rep = {
team = REP,
units = 40,
reinforcements = 150,
soldier = { "rep_clone1",10, 15},
heavy = { "rep_clone2",3,4},
sniper = { "rep_clone3",3,4},
engineer = { "rep_clone4",3,4},
marine = { "rep_clone5",3,4},
recon = { "rep_clone6",3,4},
gunner = { "rep_clone7",3,4},
special = { "rep_clone8",3,4},
commando = { "rep_clone9",3,4},
commander = { "rep_clone10",1,2},

},
cis = {
team = CIS,
units = 40,
reinforcements = 150,
soldier = { "cis_droid1",8, 20},
heavy = { "cis_droid2",4,5},
sniper = { "cis_droid3",4,5},
engineer = { "cis_droid4",4,5},
marine = { "cis_droid5",7,9},
recon = { "cis_droid6",3,4},
gunner = { "cis_droid7",3,4},
special = { "cis_droid8",1,1},
commander = { "cis_droid9",2,3},
}
}

SetHeroClass(REP, "rep_hero_obiwan")


-- Level Stats
-- ClearWalkers()
AddWalkerType(0, 20) -- special -> droidekas
AddWalkerType(1, 0) -- 1x2 (1 pair of legs)
AddWalkerType(2, 0) -- 2x2 (2 pairs of legs)
AddWalkerType(3, 0) -- 3x2 (3 pairs of legs)
local weaponCnt = 1024
SetMemoryPoolSize("Aimer", 75)
SetMemoryPoolSize("AmmoCounter", weaponCnt)
SetMemoryPoolSize("BaseHint", 1024)
SetMemoryPoolSize("EnergyBar", weaponCnt)
SetMemoryPoolSize("EntityCloth", 32)
SetMemoryPoolSize("EntityFlyer", 32)
SetMemoryPoolSize("EntityHover", 32)
SetMemoryPoolSize("EntityLight", 200)
SetMemoryPoolSize("EntitySoundStream", 4)
SetMemoryPoolSize("EntitySoundStatic", 32)
SetMemoryPoolSize("MountedTurret", 32)
SetMemoryPoolSize("Navigator", 128)
SetMemoryPoolSize("Obstacle", 1024)
SetMemoryPoolSize("PathNode", 1024)
SetMemoryPoolSize("SoldierAnimation", 370)
SetMemoryPoolSize("SoundSpaceRegion", 64)
SetMemoryPoolSize("TreeGridStack", 1024)
SetMemoryPoolSize("UnitAgent", 128)
SetMemoryPoolSize("UnitController", 128)
SetMemoryPoolSize("Weapon", weaponCnt)

SetSpawnDelay(10.0, 0.25)
ReadDataFile("dc:ABC\\bes2.lvl", "bespin2_conquest")
SetDenseEnvironment("false")

-- Sound Stats

voiceSlow = OpenAudioStream("sound\\global.lvl", "rep_unit_vo_slow")
AudioStreamAppendSegments("sound\\global.lvl", "cis_unit_vo_slow", voiceSlow)
AudioStreamAppendSegments("sound\\global.lvl", "global_vo_slow", voiceSlow)

voiceQuick = OpenAudioStream("sound\\global.lvl", "rep_unit_vo_quick")
AudioStreamAppendSegments("sound\\global.lvl", "cis_unit_vo_quick", voiceQuick)

OpenAudioStream("sound\\global.lvl", "cw_music")
OpenAudioStream("dc:sound\\ABC.lvl", "ABC_stream")
-- OpenAudioStream("sound\\global.lvl", "global_vo_quick")
-- OpenAudioStream("sound\\global.lvl", "global_vo_slow")
OpenAudioStream("sound\\cor.lvl", "cor1")
OpenAudioStream("sound\\cor.lvl", "cor1")
-- OpenAudioStream("sound\\cor.lvl", "cor1_emt")

SetBleedingVoiceOver(REP, REP, "rep_off_com_report_us_overwhelmed", 1)
SetBleedingVoiceOver(REP, CIS, "rep_off_com_report_enemy_losing", 1)
SetBleedingVoiceOver(CIS, REP, "cis_off_com_report_enemy_losing", 1)
SetBleedingVoiceOver(CIS, CIS, "cis_off_com_report_us_overwhelmed", 1)

SetLowReinforcementsVoiceOver(REP, REP, "rep_off_defeat_im", .1, 1)
SetLowReinforcementsVoiceOver(REP, CIS, "rep_off_victory_im", .1, 1)
SetLowReinforcementsVoiceOver(CIS, CIS, "cis_off_defeat_im", .1, 1)
SetLowReinforcementsVoiceOver(CIS, REP, "cis_off_victory_im", .1, 1)

SetOutOfBoundsVoiceOver(2, "Repleaving")
SetOutOfBoundsVoiceOver(1, "Cisleaving")

SetAmbientMusic(REP, 1.0, "rep_cor_amb_start", 0,1)
SetAmbientMusic(REP, 0.8, "rep_cor_amb_middle", 1,1)
SetAmbientMusic(REP, 0.2, "rep_cor_amb_end", 2,1)
SetAmbientMusic(CIS, 1.0, "cis_cor_amb_start", 0,1)
SetAmbientMusic(CIS, 0.8, "cis_cor_amb_middle", 1,1)
SetAmbientMusic(CIS, 0.2, "cis_cor_amb_end", 2,1)

SetVictoryMusic(REP, "rep_cor_amb_victory")
SetDefeatMusic (REP, "rep_cor_amb_defeat")
SetVictoryMusic(CIS, "cis_cor_amb_victory")
SetDefeatMusic (CIS, "cis_cor_amb_defeat")

SetSoundEffect("ScopeDisplayZoomIn", "binocularzoomin")
SetSoundEffect("ScopeDisplayZoomOut", "binocularzoomout")
--SetSoundEffect("WeaponUnableSelect", "com_weap_inf_weaponchange_null")
--SetSoundEffect("WeaponModeUnableSelect", "com_weap_inf_modechange_null")
SetSoundEffect("SpawnDisplayUnitChange", "shell_select_unit")
SetSoundEffect("SpawnDisplayUnitAccept", "shell_menu_enter")
SetSoundEffect("SpawnDisplaySpawnPointChange", "shell_select_change")
SetSoundEffect("SpawnDisplaySpawnPointAccept", "shell_menu_enter")
SetSoundEffect("SpawnDisplayBack", "shell_menu_exit")


-- Camera Stats
--Bespin 2
--Courtyard
AddCameraShot(0.364258, -0.004224, -0.931226, -0.010797, -206.270294, -44.204708, 88.837059);
--Carbon Chamber
AddCameraShot(0.327508, 0.002799, -0.944810, 0.008076, -184.781006, -59.802036, -28.118919);
--Wind Tunnel
AddCameraShot(0.572544, -0.013560, -0.819532, -0.019410, -244.788055, -61.541622, -44.260509);
end
second
Hidden/Spoiler:
--
-- Copyright (c) 2005 Pandemic Studios, LLC. All rights reserved.
--

-- load the gametype script
ScriptCB_DoFile("ObjectiveConquest")
ScriptCB_DoFile("setup_teams")
ScriptCB_DoFile("AIHeroSupport")

-- REP Attacking (attacker is always #1)
REP = 1;
CIS = 2;
-- These variables do not change
ATT = REP;
DEF = CIS;


function ScriptPostLoad()


--This defines the CPs. These need to happen first
cp1 = CommandPost:New{name = "CP1"}
cp2 = CommandPost:New{name = "CP2"}
cp3 = CommandPost:New{name = "CP3"}
cp4 = CommandPost:New{name = "CP4"}
cp5 = CommandPost:New{name = "CP5"}
cp6 = CommandPost:New{name = "CP7"}



--This sets up the actual objective. This needs to happen after cp's are defined
conquest = ObjectiveConquest:New{teamATT = ATT, teamDEF = DEF,
textATT = "game.modes.con",
textDEF = "game.modes.con2",
multiplayerRules = true}

--This adds the CPs to the objective. This needs to happen after the objective is set up
conquest:AddCommandPost(cp1)
conquest:AddCommandPost(cp2)
conquest:AddCommandPost(cp3)
conquest:AddCommandPost(cp4)
conquest:AddCommandPost(cp5)
conquest:AddCommandPost(cp6)

conquest:Start()

herosupport = AIHeroSupport:New{AIATTHeroHealth = 2500, AIDEFHeroHealth = 3000, gameMode = "conquest",}
herosupport:SetHeroClass(CIS, "cis_hero_jangofett")
herosupport:AddSpawnCP("cp1","cp1spawn")
herosupport:AddSpawnCP("cp2","cp2spawn")
herosupport:AddSpawnCP("cp3","cp3spawn")
herosupport:AddSpawnCP("cp4","cp4spawn")
herosupport:AddSpawnCP("cp5","cp5spawn")
herosupport:AddSpawnCP("cp7","cp7spawn")
herosupport:Start()

EnableSPHeroRules()

AddDeathRegion("DeathRegion")
AddDeathRegion("DeathRegion2")


OnCharacterSpawn: function(player)
if GetEnityClass(player) == FindEnityClass("rep_clone9") then
ScriptCB_SndPlaySound("delta38_spawn")

end


---------------------------------------------------------------------------
-- FUNCTION: ScriptInit
-- PURPOSE: This function is only run once
-- INPUT:
-- OUTPUT:
-- NOTES: The name, 'ScriptInit' is a chosen convention, and each
-- mission script must contain a version of this function, as
-- it is called from C to start the mission.
---------------------------------------------------------------------------
function ScriptInit()

SetUberMode(1);
ReadDataFile("ingame.lvl")


SetMaxFlyHeight(-5)
SetMaxPlayerFlyHeight (-5)

SetMemoryPoolSize ("ClothData",20)
SetMemoryPoolSize ("Combo",50) -- should be ~ 2x number of jedi classes
SetMemoryPoolSize ("Combo::State",650) -- should be ~12x #Combo
SetMemoryPoolSize ("Combo::Transition",650) -- should be a bit bigger than #Combo::State
SetMemoryPoolSize ("Combo::Condition",650) -- should be a bit bigger than #Combo::State
SetMemoryPoolSize ("Combo::Attack",550) -- should be ~8-12x #Combo
SetMemoryPoolSize ("Combo::DamageSample",6000) -- should be ~8-12x #Combo::Attack
SetMemoryPoolSize ("Combo::Deflect",100) -- should be ~1x #combo

ReadDataFile("sound\\cor.lvl;cor1cw")
ReadDataFile("dc:sound\\ABC.lvl;ABCcw")

ReadDataFile("SIDE\\rep.lvl",
"rep_hero_obiwan")

ReadDataFile("SIDE\\cis.lvl",
"cis_hero_jangofett")

ReadDataFile("dc:SIDE\\dev.lvl",
"rep_clone1",
"rep_clone2",
"rep_clone3",
"rep_clone4",
"rep_clone5",
"rep_clone6",
"rep_clone7",
"rep_clone8",
"rep_clone9",
"rep_clone10")

ReadDataFile("dc:SIDE\\fed.lvl",
"cis_droid1",
"cis_droid2",
"cis_droid3",
"cis_droid4",
"cis_droid5",
"cis_droid6",
"cis_droid7",
"cis_droid8",
"cis_droid9",
"cis_hero")

ReadDataFile("SIDE\\tur.lvl",
"tur_weap_built_gunturret",
"tur_bldg_laser")

SetupTeams{
rep = {
team = REP,
units = 40,
reinforcements = 150,
soldier = { "rep_clone1",10, 15},
heavy = { "rep_clone2",3,4},
sniper = { "rep_clone3",3,4},
engineer = { "rep_clone4",3,4},
marine = { "rep_clone5",3,4},
recon = { "rep_clone6",3,4},
gunner = { "rep_clone7",3,4},
special = { "rep_clone8",3,4},
commando = { "rep_clone9",3,4},
commander = { "rep_clone10",1,2},

},
cis = {
team = CIS,
units = 40,
reinforcements = 150,
soldier = { "cis_droid1",8, 20},
heavy = { "cis_droid2",4,5},
sniper = { "cis_droid3",4,5},
engineer = { "cis_droid4",4,5},
marine = { "cis_droid5",7,9},
recon = { "cis_droid6",3,4},
gunner = { "cis_droid7",3,4},
special = { "cis_droid8",1,1},
commander = { "cis_droid9",2,3},
}
}

SetHeroClass(REP, "rep_hero_obiwan")


-- Level Stats
-- ClearWalkers()
AddWalkerType(0, 20) -- special -> droidekas
AddWalkerType(1, 0) -- 1x2 (1 pair of legs)
AddWalkerType(2, 0) -- 2x2 (2 pairs of legs)
AddWalkerType(3, 0) -- 3x2 (3 pairs of legs)
local weaponCnt = 1024
SetMemoryPoolSize("Aimer", 75)
SetMemoryPoolSize("AmmoCounter", weaponCnt)
SetMemoryPoolSize("BaseHint", 1024)
SetMemoryPoolSize("EnergyBar", weaponCnt)
SetMemoryPoolSize("EntityCloth", 32)
SetMemoryPoolSize("EntityFlyer", 32)
SetMemoryPoolSize("EntityHover", 32)
SetMemoryPoolSize("EntityLight", 200)
SetMemoryPoolSize("EntitySoundStream", 4)
SetMemoryPoolSize("EntitySoundStatic", 32)
SetMemoryPoolSize("MountedTurret", 32)
SetMemoryPoolSize("Navigator", 128)
SetMemoryPoolSize("Obstacle", 1024)
SetMemoryPoolSize("PathNode", 1024)
SetMemoryPoolSize("SoldierAnimation", 370)
SetMemoryPoolSize("SoundSpaceRegion", 64)
SetMemoryPoolSize("TreeGridStack", 1024)
SetMemoryPoolSize("UnitAgent", 128)
SetMemoryPoolSize("UnitController", 128)
SetMemoryPoolSize("Weapon", weaponCnt)

SetSpawnDelay(10.0, 0.25)
ReadDataFile("dc:ABC\\bes2.lvl", "bespin2_conquest")
SetDenseEnvironment("false")

-- Sound Stats

voiceSlow = OpenAudioStream("sound\\global.lvl", "rep_unit_vo_slow")
AudioStreamAppendSegments("sound\\global.lvl", "cis_unit_vo_slow", voiceSlow)
AudioStreamAppendSegments("sound\\global.lvl", "global_vo_slow", voiceSlow)

voiceQuick = OpenAudioStream("sound\\global.lvl", "rep_unit_vo_quick")
AudioStreamAppendSegments("sound\\global.lvl", "cis_unit_vo_quick", voiceQuick)

OpenAudioStream("sound\\global.lvl", "cw_music")
OpenAudioStream("dc:sound\\ABC.lvl", "ABC_stream")
-- OpenAudioStream("sound\\global.lvl", "global_vo_quick")
-- OpenAudioStream("sound\\global.lvl", "global_vo_slow")
OpenAudioStream("sound\\cor.lvl", "cor1")
OpenAudioStream("sound\\cor.lvl", "cor1")
-- OpenAudioStream("sound\\cor.lvl", "cor1_emt")

SetBleedingVoiceOver(REP, REP, "rep_off_com_report_us_overwhelmed", 1)
SetBleedingVoiceOver(REP, CIS, "rep_off_com_report_enemy_losing", 1)
SetBleedingVoiceOver(CIS, REP, "cis_off_com_report_enemy_losing", 1)
SetBleedingVoiceOver(CIS, CIS, "cis_off_com_report_us_overwhelmed", 1)

SetLowReinforcementsVoiceOver(REP, REP, "rep_off_defeat_im", .1, 1)
SetLowReinforcementsVoiceOver(REP, CIS, "rep_off_victory_im", .1, 1)
SetLowReinforcementsVoiceOver(CIS, CIS, "cis_off_defeat_im", .1, 1)
SetLowReinforcementsVoiceOver(CIS, REP, "cis_off_victory_im", .1, 1)

SetOutOfBoundsVoiceOver(2, "Repleaving")
SetOutOfBoundsVoiceOver(1, "Cisleaving")

SetAmbientMusic(REP, 1.0, "rep_cor_amb_start", 0,1)
SetAmbientMusic(REP, 0.8, "rep_cor_amb_middle", 1,1)
SetAmbientMusic(REP, 0.2, "rep_cor_amb_end", 2,1)
SetAmbientMusic(CIS, 1.0, "cis_cor_amb_start", 0,1)
SetAmbientMusic(CIS, 0.8, "cis_cor_amb_middle", 1,1)
SetAmbientMusic(CIS, 0.2, "cis_cor_amb_end", 2,1)

SetVictoryMusic(REP, "rep_cor_amb_victory")
SetDefeatMusic (REP, "rep_cor_amb_defeat")
SetVictoryMusic(CIS, "cis_cor_amb_victory")
SetDefeatMusic (CIS, "cis_cor_amb_defeat")

SetSoundEffect("ScopeDisplayZoomIn", "binocularzoomin")
SetSoundEffect("ScopeDisplayZoomOut", "binocularzoomout")
--SetSoundEffect("WeaponUnableSelect", "com_weap_inf_weaponchange_null")
--SetSoundEffect("WeaponModeUnableSelect", "com_weap_inf_modechange_null")
SetSoundEffect("SpawnDisplayUnitChange", "shell_select_unit")
SetSoundEffect("SpawnDisplayUnitAccept", "shell_menu_enter")
SetSoundEffect("SpawnDisplaySpawnPointChange", "shell_select_change")
SetSoundEffect("SpawnDisplaySpawnPointAccept", "shell_menu_enter")
SetSoundEffect("SpawnDisplayBack", "shell_menu_exit")


-- Camera Stats
--Bespin 2
--Courtyard
AddCameraShot(0.364258, -0.004224, -0.931226, -0.010797, -206.270294, -44.204708, 88.837059);
--Carbon Chamber
AddCameraShot(0.327508, 0.002799, -0.944810, 0.008076, -184.781006, -59.802036, -28.118919);
--Wind Tunnel
AddCameraShot(0.572544, -0.013560, -0.819532, -0.019410, -244.788055, -61.541622, -44.260509);
end
User avatar
StarkillerMarek
Rebel Colonel
Rebel Colonel
Posts: 611
Joined: Wed Aug 12, 2009 4:42 pm
Location: I may be back.

Re: Player spawn sound (no hero)

Post by StarkillerMarek »

The first lua you showed should be right. What are the munge errors?

Like I said before, I am not too sure this will work at all.
Deviss
Master of the Force
Master of the Force
Posts: 3772
Joined: Tue Aug 12, 2008 7:59 pm
Projects :: Clone Wars Extended
Games I'm Playing :: BF2

Re: Player spawn sound (no hero)

Post by Deviss »

StarkillerMarek wrote:The first lua you showed should be right. What are the munge errors?

Like I said before, I am not too sure this will work at all.
with this munge work perfect :D
Hidden/Spoiler:
--
-- Copyright (c) 2005 Pandemic Studios, LLC. All rights reserved.
--

-- load the gametype script
ScriptCB_DoFile("ObjectiveConquest")
ScriptCB_DoFile("setup_teams")
ScriptCB_DoFile("AIHeroSupport")

-- REP Attacking (attacker is always #1)
REP = 1;
CIS = 2;
-- These variables do not change
ATT = REP;
DEF = CIS;


function ScriptPostLoad()


OnCharacterSpawn = function(player)
if GetEnityClass(player) == FindEnityClass("rep_clone9") then
ScriptCB_SndPlaySound("delta38_spawn")
end
end


--This defines the CPs. These need to happen first
cp1 = CommandPost:New{name = "CP1"}
cp2 = CommandPost:New{name = "CP2"}
cp3 = CommandPost:New{name = "CP3"}
cp4 = CommandPost:New{name = "CP4"}
cp5 = CommandPost:New{name = "CP5"}
cp6 = CommandPost:New{name = "CP7"}



--This sets up the actual objective. This needs to happen after cp's are defined
conquest = ObjectiveConquest:New{teamATT = ATT, teamDEF = DEF,
textATT = "game.modes.con",
textDEF = "game.modes.con2",
multiplayerRules = true}

--This adds the CPs to the objective. This needs to happen after the objective is set up
conquest:AddCommandPost(cp1)
conquest:AddCommandPost(cp2)
conquest:AddCommandPost(cp3)
conquest:AddCommandPost(cp4)
conquest:AddCommandPost(cp5)
conquest:AddCommandPost(cp6)

conquest:Start()

herosupport = AIHeroSupport:New{AIATTHeroHealth = 2500, AIDEFHeroHealth = 3000, gameMode = "conquest",}
herosupport:SetHeroClass(CIS, "cis_hero_jangofett")
herosupport:AddSpawnCP("cp1","cp1spawn")
herosupport:AddSpawnCP("cp2","cp2spawn")
herosupport:AddSpawnCP("cp3","cp3spawn")
herosupport:AddSpawnCP("cp4","cp4spawn")
herosupport:AddSpawnCP("cp5","cp5spawn")
herosupport:AddSpawnCP("cp7","cp7spawn")
herosupport:Start()

EnableSPHeroRules()

AddDeathRegion("DeathRegion")
AddDeathRegion("DeathRegion2")

end


---------------------------------------------------------------------------
-- FUNCTION: ScriptInit
-- PURPOSE: This function is only run once
-- INPUT:
-- OUTPUT:
-- NOTES: The name, 'ScriptInit' is a chosen convention, and each
-- mission script must contain a version of this function, as
-- it is called from C to start the mission.
---------------------------------------------------------------------------
function ScriptInit()

SetUberMode(1);
ReadDataFile("ingame.lvl")


SetMaxFlyHeight(-5)
SetMaxPlayerFlyHeight (-5)

SetMemoryPoolSize ("ClothData",20)
SetMemoryPoolSize ("Combo",50) -- should be ~ 2x number of jedi classes
SetMemoryPoolSize ("Combo::State",650) -- should be ~12x #Combo
SetMemoryPoolSize ("Combo::Transition",650) -- should be a bit bigger than #Combo::State
SetMemoryPoolSize ("Combo::Condition",650) -- should be a bit bigger than #Combo::State
SetMemoryPoolSize ("Combo::Attack",550) -- should be ~8-12x #Combo
SetMemoryPoolSize ("Combo::DamageSample",6000) -- should be ~8-12x #Combo::Attack
SetMemoryPoolSize ("Combo::Deflect",100) -- should be ~1x #combo

ReadDataFile("sound\\cor.lvl;cor1cw")
ReadDataFile("dc:sound\\ABC.lvl;ABCcw")

ReadDataFile("SIDE\\rep.lvl",
"rep_hero_obiwan")

ReadDataFile("SIDE\\cis.lvl",
"cis_hero_jangofett")

ReadDataFile("dc:SIDE\\dev.lvl",
"rep_clone1",
"rep_clone2",
"rep_clone3",
"rep_clone4",
"rep_clone5",
"rep_clone6",
"rep_clone7",
"rep_clone8",
"rep_clone9",
"rep_clone10")

ReadDataFile("dc:SIDE\\fed.lvl",
"cis_droid1",
"cis_droid2",
"cis_droid3",
"cis_droid4",
"cis_droid5",
"cis_droid6",
"cis_droid7",
"cis_droid8",
"cis_droid9",
"cis_hero")

ReadDataFile("SIDE\\tur.lvl",
"tur_weap_built_gunturret",
"tur_bldg_laser")

SetupTeams{
rep = {
team = REP,
units = 40,
reinforcements = 150,
soldier = { "rep_clone1",10, 15},
heavy = { "rep_clone2",3,4},
sniper = { "rep_clone3",3,4},
engineer = { "rep_clone4",3,4},
marine = { "rep_clone5",3,4},
recon = { "rep_clone6",3,4},
gunner = { "rep_clone7",3,4},
special = { "rep_clone8",3,4},
commando = { "rep_clone9",3,4},
commander = { "rep_clone10",1,2},

},
cis = {
team = CIS,
units = 40,
reinforcements = 150,
soldier = { "cis_droid1",8, 20},
heavy = { "cis_droid2",4,5},
sniper = { "cis_droid3",4,5},
engineer = { "cis_droid4",4,5},
marine = { "cis_droid5",7,9},
recon = { "cis_droid6",3,4},
gunner = { "cis_droid7",3,4},
special = { "cis_droid8",1,1},
commander = { "cis_droid9",2,3},
}
}

SetHeroClass(REP, "rep_hero_obiwan")


-- Level Stats
-- ClearWalkers()
AddWalkerType(0, 20) -- special -> droidekas
AddWalkerType(1, 0) -- 1x2 (1 pair of legs)
AddWalkerType(2, 0) -- 2x2 (2 pairs of legs)
AddWalkerType(3, 0) -- 3x2 (3 pairs of legs)
local weaponCnt = 1024
SetMemoryPoolSize("Aimer", 75)
SetMemoryPoolSize("AmmoCounter", weaponCnt)
SetMemoryPoolSize("BaseHint", 1024)
SetMemoryPoolSize("EnergyBar", weaponCnt)
SetMemoryPoolSize("EntityCloth", 32)
SetMemoryPoolSize("EntityFlyer", 32)
SetMemoryPoolSize("EntityHover", 32)
SetMemoryPoolSize("EntityLight", 200)
SetMemoryPoolSize("EntitySoundStream", 4)
SetMemoryPoolSize("EntitySoundStatic", 32)
SetMemoryPoolSize("MountedTurret", 32)
SetMemoryPoolSize("Navigator", 128)
SetMemoryPoolSize("Obstacle", 1024)
SetMemoryPoolSize("PathNode", 1024)
SetMemoryPoolSize("SoldierAnimation", 370)
SetMemoryPoolSize("SoundSpaceRegion", 64)
SetMemoryPoolSize("TreeGridStack", 1024)
SetMemoryPoolSize("UnitAgent", 128)
SetMemoryPoolSize("UnitController", 128)
SetMemoryPoolSize("Weapon", weaponCnt)

SetSpawnDelay(10.0, 0.25)
ReadDataFile("dc:ABC\\bes2.lvl", "bespin2_conquest")
SetDenseEnvironment("false")

-- Sound Stats

voiceSlow = OpenAudioStream("sound\\global.lvl", "rep_unit_vo_slow")
AudioStreamAppendSegments("sound\\global.lvl", "cis_unit_vo_slow", voiceSlow)
AudioStreamAppendSegments("sound\\global.lvl", "global_vo_slow", voiceSlow)

voiceQuick = OpenAudioStream("sound\\global.lvl", "rep_unit_vo_quick")
AudioStreamAppendSegments("sound\\global.lvl", "cis_unit_vo_quick", voiceQuick)

OpenAudioStream("sound\\global.lvl", "cw_music")
OpenAudioStream("dc:sound\\ABC.lvl", "ABC_stream")
-- OpenAudioStream("sound\\global.lvl", "global_vo_quick")
-- OpenAudioStream("sound\\global.lvl", "global_vo_slow")
OpenAudioStream("sound\\cor.lvl", "cor1")
OpenAudioStream("sound\\cor.lvl", "cor1")
-- OpenAudioStream("sound\\cor.lvl", "cor1_emt")

SetBleedingVoiceOver(REP, REP, "rep_off_com_report_us_overwhelmed", 1)
SetBleedingVoiceOver(REP, CIS, "rep_off_com_report_enemy_losing", 1)
SetBleedingVoiceOver(CIS, REP, "cis_off_com_report_enemy_losing", 1)
SetBleedingVoiceOver(CIS, CIS, "cis_off_com_report_us_overwhelmed", 1)

SetLowReinforcementsVoiceOver(REP, REP, "rep_off_defeat_im", .1, 1)
SetLowReinforcementsVoiceOver(REP, CIS, "rep_off_victory_im", .1, 1)
SetLowReinforcementsVoiceOver(CIS, CIS, "cis_off_defeat_im", .1, 1)
SetLowReinforcementsVoiceOver(CIS, REP, "cis_off_victory_im", .1, 1)

SetOutOfBoundsVoiceOver(2, "Repleaving")
SetOutOfBoundsVoiceOver(1, "Cisleaving")

SetAmbientMusic(REP, 1.0, "rep_cor_amb_start", 0,1)
SetAmbientMusic(REP, 0.8, "rep_cor_amb_middle", 1,1)
SetAmbientMusic(REP, 0.2, "rep_cor_amb_end", 2,1)
SetAmbientMusic(CIS, 1.0, "cis_cor_amb_start", 0,1)
SetAmbientMusic(CIS, 0.8, "cis_cor_amb_middle", 1,1)
SetAmbientMusic(CIS, 0.2, "cis_cor_amb_end", 2,1)

SetVictoryMusic(REP, "rep_cor_amb_victory")
SetDefeatMusic (REP, "rep_cor_amb_defeat")
SetVictoryMusic(CIS, "cis_cor_amb_victory")
SetDefeatMusic (CIS, "cis_cor_amb_defeat")

SetSoundEffect("ScopeDisplayZoomIn", "binocularzoomin")
SetSoundEffect("ScopeDisplayZoomOut", "binocularzoomout")
--SetSoundEffect("WeaponUnableSelect", "com_weap_inf_weaponchange_null")
--SetSoundEffect("WeaponModeUnableSelect", "com_weap_inf_modechange_null")
SetSoundEffect("SpawnDisplayUnitChange", "shell_select_unit")
SetSoundEffect("SpawnDisplayUnitAccept", "shell_menu_enter")
SetSoundEffect("SpawnDisplaySpawnPointChange", "shell_select_change")
SetSoundEffect("SpawnDisplaySpawnPointAccept", "shell_menu_enter")
SetSoundEffect("SpawnDisplayBack", "shell_menu_exit")


-- Camera Stats
--Bespin 2
--Courtyard
AddCameraShot(0.364258, -0.004224, -0.931226, -0.010797, -206.270294, -44.204708, 88.837059);
--Carbon Chamber
AddCameraShot(0.327508, 0.002799, -0.944810, 0.008076, -184.781006, -59.802036, -28.118919);
--Wind Tunnel
AddCameraShot(0.572544, -0.013560, -0.819532, -0.019410, -244.788055, -61.541622, -44.260509);
end
but spawn sound dont work xD, anyway was great idea coding sir :D
myers73
Lieutenant General
Lieutenant General
Posts: 690
Joined: Fri Apr 03, 2009 11:04 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: Atlanta, GA xfire=myers73 IngameName=mYers

Re: Player spawn sound (no hero)

Post by myers73 »

you code is incorrect....

try

Code: Select all

playSound = OnCharacterSpawn(
    function(player)
        if GetEnityClass(player) == FindEnityClass("theunitclass") then
        ScriptCB_SndPlaySound("thesoundfile")
        end
    end


User avatar
Teancum
Jedi Admin
Jedi Admin
Posts: 11080
Joined: Wed Sep 07, 2005 11:42 pm
Projects :: No Mod project currently.
Games I'm Playing :: Destiny
xbox live or psn: No gamertag set
Location: Indiana

Re: Player spawn sound (no hero)

Post by Teancum »

Just remember that the sound will play for everyone, not just the person that spawns. So if your sound file says "WOW! A NEW PLAYER HAS SPAWNED!" it will play it for everyone every time a player (or AI) of that class spawns.
User avatar
StarkillerMarek
Rebel Colonel
Rebel Colonel
Posts: 611
Joined: Wed Aug 12, 2009 4:42 pm
Location: I may be back.

Re: Player spawn sound (no hero)

Post by StarkillerMarek »

myers73 wrote:you code is incorrect....

try

Code: Select all

playSound = OnCharacterSpawn(
    function(player)
        if GetEnityClass(player) == FindEnityClass("theunitclass") then
        ScriptCB_SndPlaySound("thesoundfile")
        end
    end


Well, at least I wasn't too far off. I almost had it.


And, also, to avoid the sound playing when the AI spawns, you could check to see if the player who spawned was human.
Deviss
Master of the Force
Master of the Force
Posts: 3772
Joined: Tue Aug 12, 2008 7:59 pm
Projects :: Clone Wars Extended
Games I'm Playing :: BF2

Re: Player spawn sound (no hero)

Post by Deviss »

for this reason i hate really lua again always munge log say error
Hidden/Spoiler:
--
-- Copyright (c) 2005 Pandemic Studios, LLC. All rights reserved.
--

-- load the gametype script
ScriptCB_DoFile("ObjectiveConquest")
ScriptCB_DoFile("setup_teams")
ScriptCB_DoFile("AIHeroSupport")

-- REP Attacking (attacker is always #1)
REP = 1;
CIS = 2;
-- These variables do not change
ATT = REP;
DEF = CIS;


function ScriptPostLoad()


playSound = OnCharacterSpawn(
function(player)
if GetEnityClass(player) == FindEnityClass("commando") then
ScriptCB_SndPlaySound("spawn_D38ZZ016")
end
end


--This defines the CPs. These need to happen first
cp1 = CommandPost:New{name = "CP1"}
cp2 = CommandPost:New{name = "CP2"}
cp3 = CommandPost:New{name = "CP3"}
cp4 = CommandPost:New{name = "CP4"}
cp5 = CommandPost:New{name = "CP5"}
cp6 = CommandPost:New{name = "CP7"}



--This sets up the actual objective. This needs to happen after cp's are defined
conquest = ObjectiveConquest:New{teamATT = ATT, teamDEF = DEF,
textATT = "game.modes.con",
textDEF = "game.modes.con2",
multiplayerRules = true}

--This adds the CPs to the objective. This needs to happen after the objective is set up
conquest:AddCommandPost(cp1)
conquest:AddCommandPost(cp2)
conquest:AddCommandPost(cp3)
conquest:AddCommandPost(cp4)
conquest:AddCommandPost(cp5)
conquest:AddCommandPost(cp6)

conquest:Start()

herosupport = AIHeroSupport:New{AIATTHeroHealth = 2500, AIDEFHeroHealth = 3000, gameMode = "conquest",}
herosupport:SetHeroClass(CIS, "cis_hero_jangofett")
herosupport:AddSpawnCP("cp1","cp1spawn")
herosupport:AddSpawnCP("cp2","cp2spawn")
herosupport:AddSpawnCP("cp3","cp3spawn")
herosupport:AddSpawnCP("cp4","cp4spawn")
herosupport:AddSpawnCP("cp5","cp5spawn")
herosupport:AddSpawnCP("cp7","cp7spawn")
herosupport:Start()

EnableSPHeroRules()

AddDeathRegion("DeathRegion")
AddDeathRegion("DeathRegion2")

end


---------------------------------------------------------------------------
-- FUNCTION: ScriptInit
-- PURPOSE: This function is only run once
-- INPUT:
-- OUTPUT:
-- NOTES: The name, 'ScriptInit' is a chosen convention, and each
-- mission script must contain a version of this function, as
-- it is called from C to start the mission.
---------------------------------------------------------------------------
function ScriptInit()

SetUberMode(1);
ReadDataFile("ingame.lvl")


SetMaxFlyHeight(-5)
SetMaxPlayerFlyHeight (-5)

SetMemoryPoolSize ("ClothData",20)
SetMemoryPoolSize ("Combo",50) -- should be ~ 2x number of jedi classes
SetMemoryPoolSize ("Combo::State",650) -- should be ~12x #Combo
SetMemoryPoolSize ("Combo::Transition",650) -- should be a bit bigger than #Combo::State
SetMemoryPoolSize ("Combo::Condition",650) -- should be a bit bigger than #Combo::State
SetMemoryPoolSize ("Combo::Attack",550) -- should be ~8-12x #Combo
SetMemoryPoolSize ("Combo::DamageSample",6000) -- should be ~8-12x #Combo::Attack
SetMemoryPoolSize ("Combo::Deflect",100) -- should be ~1x #combo

ReadDataFile("sound\\cor.lvl;cor1cw")
ReadDataFile("dc:sound\\ABC.lvl;ABCcw")

ReadDataFile("SIDE\\rep.lvl",
"rep_hero_obiwan")

ReadDataFile("SIDE\\cis.lvl",
"cis_hero_jangofett")

ReadDataFile("dc:SIDE\\dev.lvl",
"rep_clone1",
"rep_clone2",
"rep_clone3",
"rep_clone4",
"rep_clone5",
"rep_clone6",
"rep_clone7",
"rep_clone8",
"rep_clone9",
"rep_clone10")

ReadDataFile("dc:SIDE\\fed.lvl",
"cis_droid1",
"cis_droid2",
"cis_droid3",
"cis_droid4",
"cis_droid5",
"cis_droid6",
"cis_droid7",
"cis_droid8",
"cis_droid9",
"cis_hero")

ReadDataFile("SIDE\\tur.lvl",
"tur_weap_built_gunturret",
"tur_bldg_laser")

SetupTeams{
rep = {
team = REP,
units = 40,
reinforcements = 150,
soldier = { "rep_clone1",10, 15},
heavy = { "rep_clone2",3,4},
sniper = { "rep_clone3",3,4},
engineer = { "rep_clone4",3,4},
marine = { "rep_clone5",3,4},
recon = { "rep_clone6",3,4},
gunner = { "rep_clone7",3,4},
special = { "rep_clone8",3,4},
commando = { "rep_clone9",3,4},
commander = { "rep_clone10",1,2},

},
cis = {
team = CIS,
units = 40,
reinforcements = 150,
soldier = { "cis_droid1",8, 20},
heavy = { "cis_droid2",4,5},
sniper = { "cis_droid3",4,5},
engineer = { "cis_droid4",4,5},
marine = { "cis_droid5",7,9},
recon = { "cis_droid6",3,4},
gunner = { "cis_droid7",3,4},
special = { "cis_droid8",1,1},
commander = { "cis_droid9",2,3},
}
}

SetHeroClass(REP, "rep_hero_obiwan")


-- Level Stats
-- ClearWalkers()
AddWalkerType(0, 20) -- special -> droidekas
AddWalkerType(1, 0) -- 1x2 (1 pair of legs)
AddWalkerType(2, 0) -- 2x2 (2 pairs of legs)
AddWalkerType(3, 0) -- 3x2 (3 pairs of legs)
local weaponCnt = 1024
SetMemoryPoolSize("Aimer", 75)
SetMemoryPoolSize("AmmoCounter", weaponCnt)
SetMemoryPoolSize("BaseHint", 1024)
SetMemoryPoolSize("EnergyBar", weaponCnt)
SetMemoryPoolSize("EntityCloth", 32)
SetMemoryPoolSize("EntityFlyer", 32)
SetMemoryPoolSize("EntityHover", 32)
SetMemoryPoolSize("EntityLight", 200)
SetMemoryPoolSize("EntitySoundStream", 4)
SetMemoryPoolSize("EntitySoundStatic", 32)
SetMemoryPoolSize("MountedTurret", 32)
SetMemoryPoolSize("Navigator", 128)
SetMemoryPoolSize("Obstacle", 1024)
SetMemoryPoolSize("PathNode", 1024)
SetMemoryPoolSize("SoldierAnimation", 370)
SetMemoryPoolSize("SoundSpaceRegion", 64)
SetMemoryPoolSize("TreeGridStack", 1024)
SetMemoryPoolSize("UnitAgent", 128)
SetMemoryPoolSize("UnitController", 128)
SetMemoryPoolSize("Weapon", weaponCnt)

SetSpawnDelay(10.0, 0.25)
ReadDataFile("dc:ABC\\bes2.lvl", "bespin2_conquest")
SetDenseEnvironment("false")

-- Sound Stats

voiceSlow = OpenAudioStream("sound\\global.lvl", "rep_unit_vo_slow")
AudioStreamAppendSegments("sound\\global.lvl", "cis_unit_vo_slow", voiceSlow)
AudioStreamAppendSegments("sound\\global.lvl", "global_vo_slow", voiceSlow)

voiceQuick = OpenAudioStream("sound\\global.lvl", "rep_unit_vo_quick")
AudioStreamAppendSegments("sound\\global.lvl", "cis_unit_vo_quick", voiceQuick)

OpenAudioStream("sound\\global.lvl", "cw_music")
OpenAudioStream("dc:sound\\ABC.lvl", "ABC_stream")
-- OpenAudioStream("sound\\global.lvl", "global_vo_quick")
-- OpenAudioStream("sound\\global.lvl", "global_vo_slow")
OpenAudioStream("sound\\cor.lvl", "cor1")
OpenAudioStream("sound\\cor.lvl", "cor1")
-- OpenAudioStream("sound\\cor.lvl", "cor1_emt")

SetBleedingVoiceOver(REP, REP, "rep_off_com_report_us_overwhelmed", 1)
SetBleedingVoiceOver(REP, CIS, "rep_off_com_report_enemy_losing", 1)
SetBleedingVoiceOver(CIS, REP, "cis_off_com_report_enemy_losing", 1)
SetBleedingVoiceOver(CIS, CIS, "cis_off_com_report_us_overwhelmed", 1)

SetLowReinforcementsVoiceOver(REP, REP, "rep_off_defeat_im", .1, 1)
SetLowReinforcementsVoiceOver(REP, CIS, "rep_off_victory_im", .1, 1)
SetLowReinforcementsVoiceOver(CIS, CIS, "cis_off_defeat_im", .1, 1)
SetLowReinforcementsVoiceOver(CIS, REP, "cis_off_victory_im", .1, 1)

SetOutOfBoundsVoiceOver(2, "Repleaving")
SetOutOfBoundsVoiceOver(1, "Cisleaving")

SetAmbientMusic(REP, 1.0, "rep_cor_amb_start", 0,1)
SetAmbientMusic(REP, 0.8, "rep_cor_amb_middle", 1,1)
SetAmbientMusic(REP, 0.2, "rep_cor_amb_end", 2,1)
SetAmbientMusic(CIS, 1.0, "cis_cor_amb_start", 0,1)
SetAmbientMusic(CIS, 0.8, "cis_cor_amb_middle", 1,1)
SetAmbientMusic(CIS, 0.2, "cis_cor_amb_end", 2,1)

SetVictoryMusic(REP, "rep_cor_amb_victory")
SetDefeatMusic (REP, "rep_cor_amb_defeat")
SetVictoryMusic(CIS, "cis_cor_amb_victory")
SetDefeatMusic (CIS, "cis_cor_amb_defeat")

SetSoundEffect("ScopeDisplayZoomIn", "binocularzoomin")
SetSoundEffect("ScopeDisplayZoomOut", "binocularzoomout")
--SetSoundEffect("WeaponUnableSelect", "com_weap_inf_weaponchange_null")
--SetSoundEffect("WeaponModeUnableSelect", "com_weap_inf_modechange_null")
SetSoundEffect("SpawnDisplayUnitChange", "shell_select_unit")
SetSoundEffect("SpawnDisplayUnitAccept", "shell_menu_enter")
SetSoundEffect("SpawnDisplaySpawnPointChange", "shell_select_change")
SetSoundEffect("SpawnDisplaySpawnPointAccept", "shell_menu_enter")
SetSoundEffect("SpawnDisplayBack", "shell_menu_exit")


-- Camera Stats
--Bespin 2
--Courtyard
AddCameraShot(0.364258, -0.004224, -0.931226, -0.010797, -206.270294, -44.204708, 88.837059);
--Carbon Chamber
AddCameraShot(0.327508, 0.002799, -0.944810, 0.008076, -184.781006, -59.802036, -28.118919);
--Wind Tunnel
AddCameraShot(0.572544, -0.013560, -0.819532, -0.019410, -244.788055, -61.541622, -44.260509);
end
User avatar
StarkillerMarek
Rebel Colonel
Rebel Colonel
Posts: 611
Joined: Wed Aug 12, 2009 4:42 pm
Location: I may be back.

Re: Player spawn sound (no hero)

Post by StarkillerMarek »

Deviss wrote:for this reason i hate really lua again always munge log say error
Hidden/Spoiler:
--
-- Copyright (c) 2005 Pandemic Studios, LLC. All rights reserved.
--

-- load the gametype script
ScriptCB_DoFile("ObjectiveConquest")
ScriptCB_DoFile("setup_teams")
ScriptCB_DoFile("AIHeroSupport")

-- REP Attacking (attacker is always #1)
REP = 1;
CIS = 2;
-- These variables do not change
ATT = REP;
DEF = CIS;


function ScriptPostLoad()


playSound = OnCharacterSpawn(
function(player)
if GetEnityClass(player) == FindEnityClass("commando") then
ScriptCB_SndPlaySound("spawn_D38ZZ016")
end
end


--This defines the CPs. These need to happen first
cp1 = CommandPost:New{name = "CP1"}
cp2 = CommandPost:New{name = "CP2"}
cp3 = CommandPost:New{name = "CP3"}
cp4 = CommandPost:New{name = "CP4"}
cp5 = CommandPost:New{name = "CP5"}
cp6 = CommandPost:New{name = "CP7"}



--This sets up the actual objective. This needs to happen after cp's are defined
conquest = ObjectiveConquest:New{teamATT = ATT, teamDEF = DEF,
textATT = "game.modes.con",
textDEF = "game.modes.con2",
multiplayerRules = true}

--This adds the CPs to the objective. This needs to happen after the objective is set up
conquest:AddCommandPost(cp1)
conquest:AddCommandPost(cp2)
conquest:AddCommandPost(cp3)
conquest:AddCommandPost(cp4)
conquest:AddCommandPost(cp5)
conquest:AddCommandPost(cp6)

conquest:Start()

herosupport = AIHeroSupport:New{AIATTHeroHealth = 2500, AIDEFHeroHealth = 3000, gameMode = "conquest",}
herosupport:SetHeroClass(CIS, "cis_hero_jangofett")
herosupport:AddSpawnCP("cp1","cp1spawn")
herosupport:AddSpawnCP("cp2","cp2spawn")
herosupport:AddSpawnCP("cp3","cp3spawn")
herosupport:AddSpawnCP("cp4","cp4spawn")
herosupport:AddSpawnCP("cp5","cp5spawn")
herosupport:AddSpawnCP("cp7","cp7spawn")
herosupport:Start()

EnableSPHeroRules()

AddDeathRegion("DeathRegion")
AddDeathRegion("DeathRegion2")

end


---------------------------------------------------------------------------
-- FUNCTION: ScriptInit
-- PURPOSE: This function is only run once
-- INPUT:
-- OUTPUT:
-- NOTES: The name, 'ScriptInit' is a chosen convention, and each
-- mission script must contain a version of this function, as
-- it is called from C to start the mission.
---------------------------------------------------------------------------
function ScriptInit()

SetUberMode(1);
ReadDataFile("ingame.lvl")


SetMaxFlyHeight(-5)
SetMaxPlayerFlyHeight (-5)

SetMemoryPoolSize ("ClothData",20)
SetMemoryPoolSize ("Combo",50) -- should be ~ 2x number of jedi classes
SetMemoryPoolSize ("Combo::State",650) -- should be ~12x #Combo
SetMemoryPoolSize ("Combo::Transition",650) -- should be a bit bigger than #Combo::State
SetMemoryPoolSize ("Combo::Condition",650) -- should be a bit bigger than #Combo::State
SetMemoryPoolSize ("Combo::Attack",550) -- should be ~8-12x #Combo
SetMemoryPoolSize ("Combo::DamageSample",6000) -- should be ~8-12x #Combo::Attack
SetMemoryPoolSize ("Combo::Deflect",100) -- should be ~1x #combo

ReadDataFile("sound\\cor.lvl;cor1cw")
ReadDataFile("dc:sound\\ABC.lvl;ABCcw")

ReadDataFile("SIDE\\rep.lvl",
"rep_hero_obiwan")

ReadDataFile("SIDE\\cis.lvl",
"cis_hero_jangofett")

ReadDataFile("dc:SIDE\\dev.lvl",
"rep_clone1",
"rep_clone2",
"rep_clone3",
"rep_clone4",
"rep_clone5",
"rep_clone6",
"rep_clone7",
"rep_clone8",
"rep_clone9",
"rep_clone10")

ReadDataFile("dc:SIDE\\fed.lvl",
"cis_droid1",
"cis_droid2",
"cis_droid3",
"cis_droid4",
"cis_droid5",
"cis_droid6",
"cis_droid7",
"cis_droid8",
"cis_droid9",
"cis_hero")

ReadDataFile("SIDE\\tur.lvl",
"tur_weap_built_gunturret",
"tur_bldg_laser")

SetupTeams{
rep = {
team = REP,
units = 40,
reinforcements = 150,
soldier = { "rep_clone1",10, 15},
heavy = { "rep_clone2",3,4},
sniper = { "rep_clone3",3,4},
engineer = { "rep_clone4",3,4},
marine = { "rep_clone5",3,4},
recon = { "rep_clone6",3,4},
gunner = { "rep_clone7",3,4},
special = { "rep_clone8",3,4},
commando = { "rep_clone9",3,4},
commander = { "rep_clone10",1,2},

},
cis = {
team = CIS,
units = 40,
reinforcements = 150,
soldier = { "cis_droid1",8, 20},
heavy = { "cis_droid2",4,5},
sniper = { "cis_droid3",4,5},
engineer = { "cis_droid4",4,5},
marine = { "cis_droid5",7,9},
recon = { "cis_droid6",3,4},
gunner = { "cis_droid7",3,4},
special = { "cis_droid8",1,1},
commander = { "cis_droid9",2,3},
}
}

SetHeroClass(REP, "rep_hero_obiwan")


-- Level Stats
-- ClearWalkers()
AddWalkerType(0, 20) -- special -> droidekas
AddWalkerType(1, 0) -- 1x2 (1 pair of legs)
AddWalkerType(2, 0) -- 2x2 (2 pairs of legs)
AddWalkerType(3, 0) -- 3x2 (3 pairs of legs)
local weaponCnt = 1024
SetMemoryPoolSize("Aimer", 75)
SetMemoryPoolSize("AmmoCounter", weaponCnt)
SetMemoryPoolSize("BaseHint", 1024)
SetMemoryPoolSize("EnergyBar", weaponCnt)
SetMemoryPoolSize("EntityCloth", 32)
SetMemoryPoolSize("EntityFlyer", 32)
SetMemoryPoolSize("EntityHover", 32)
SetMemoryPoolSize("EntityLight", 200)
SetMemoryPoolSize("EntitySoundStream", 4)
SetMemoryPoolSize("EntitySoundStatic", 32)
SetMemoryPoolSize("MountedTurret", 32)
SetMemoryPoolSize("Navigator", 128)
SetMemoryPoolSize("Obstacle", 1024)
SetMemoryPoolSize("PathNode", 1024)
SetMemoryPoolSize("SoldierAnimation", 370)
SetMemoryPoolSize("SoundSpaceRegion", 64)
SetMemoryPoolSize("TreeGridStack", 1024)
SetMemoryPoolSize("UnitAgent", 128)
SetMemoryPoolSize("UnitController", 128)
SetMemoryPoolSize("Weapon", weaponCnt)

SetSpawnDelay(10.0, 0.25)
ReadDataFile("dc:ABC\\bes2.lvl", "bespin2_conquest")
SetDenseEnvironment("false")

-- Sound Stats

voiceSlow = OpenAudioStream("sound\\global.lvl", "rep_unit_vo_slow")
AudioStreamAppendSegments("sound\\global.lvl", "cis_unit_vo_slow", voiceSlow)
AudioStreamAppendSegments("sound\\global.lvl", "global_vo_slow", voiceSlow)

voiceQuick = OpenAudioStream("sound\\global.lvl", "rep_unit_vo_quick")
AudioStreamAppendSegments("sound\\global.lvl", "cis_unit_vo_quick", voiceQuick)

OpenAudioStream("sound\\global.lvl", "cw_music")
OpenAudioStream("dc:sound\\ABC.lvl", "ABC_stream")
-- OpenAudioStream("sound\\global.lvl", "global_vo_quick")
-- OpenAudioStream("sound\\global.lvl", "global_vo_slow")
OpenAudioStream("sound\\cor.lvl", "cor1")
OpenAudioStream("sound\\cor.lvl", "cor1")
-- OpenAudioStream("sound\\cor.lvl", "cor1_emt")

SetBleedingVoiceOver(REP, REP, "rep_off_com_report_us_overwhelmed", 1)
SetBleedingVoiceOver(REP, CIS, "rep_off_com_report_enemy_losing", 1)
SetBleedingVoiceOver(CIS, REP, "cis_off_com_report_enemy_losing", 1)
SetBleedingVoiceOver(CIS, CIS, "cis_off_com_report_us_overwhelmed", 1)

SetLowReinforcementsVoiceOver(REP, REP, "rep_off_defeat_im", .1, 1)
SetLowReinforcementsVoiceOver(REP, CIS, "rep_off_victory_im", .1, 1)
SetLowReinforcementsVoiceOver(CIS, CIS, "cis_off_defeat_im", .1, 1)
SetLowReinforcementsVoiceOver(CIS, REP, "cis_off_victory_im", .1, 1)

SetOutOfBoundsVoiceOver(2, "Repleaving")
SetOutOfBoundsVoiceOver(1, "Cisleaving")

SetAmbientMusic(REP, 1.0, "rep_cor_amb_start", 0,1)
SetAmbientMusic(REP, 0.8, "rep_cor_amb_middle", 1,1)
SetAmbientMusic(REP, 0.2, "rep_cor_amb_end", 2,1)
SetAmbientMusic(CIS, 1.0, "cis_cor_amb_start", 0,1)
SetAmbientMusic(CIS, 0.8, "cis_cor_amb_middle", 1,1)
SetAmbientMusic(CIS, 0.2, "cis_cor_amb_end", 2,1)

SetVictoryMusic(REP, "rep_cor_amb_victory")
SetDefeatMusic (REP, "rep_cor_amb_defeat")
SetVictoryMusic(CIS, "cis_cor_amb_victory")
SetDefeatMusic (CIS, "cis_cor_amb_defeat")

SetSoundEffect("ScopeDisplayZoomIn", "binocularzoomin")
SetSoundEffect("ScopeDisplayZoomOut", "binocularzoomout")
--SetSoundEffect("WeaponUnableSelect", "com_weap_inf_weaponchange_null")
--SetSoundEffect("WeaponModeUnableSelect", "com_weap_inf_modechange_null")
SetSoundEffect("SpawnDisplayUnitChange", "shell_select_unit")
SetSoundEffect("SpawnDisplayUnitAccept", "shell_menu_enter")
SetSoundEffect("SpawnDisplaySpawnPointChange", "shell_select_change")
SetSoundEffect("SpawnDisplaySpawnPointAccept", "shell_menu_enter")
SetSoundEffect("SpawnDisplayBack", "shell_menu_exit")


-- Camera Stats
--Bespin 2
--Courtyard
AddCameraShot(0.364258, -0.004224, -0.931226, -0.010797, -206.270294, -44.204708, 88.837059);
--Carbon Chamber
AddCameraShot(0.327508, 0.002799, -0.944810, 0.008076, -184.781006, -59.802036, -28.118919);
--Wind Tunnel
AddCameraShot(0.572544, -0.013560, -0.819532, -0.019410, -244.788055, -61.541622, -44.260509);
end
Is the units class name commando? Could you post your munge error log?
Deviss
Master of the Force
Master of the Force
Posts: 3772
Joined: Tue Aug 12, 2008 7:59 pm
Projects :: Clone Wars Extended
Games I'm Playing :: BF2

Re: Player spawn sound (no hero)

Post by Deviss »

StarkillerMarek wrote:
Deviss wrote:for this reason i hate really lua again always munge log say error
Hidden/Spoiler:
--
-- Copyright (c) 2005 Pandemic Studios, LLC. All rights reserved.
--

-- load the gametype script
ScriptCB_DoFile("ObjectiveConquest")
ScriptCB_DoFile("setup_teams")
ScriptCB_DoFile("AIHeroSupport")

-- REP Attacking (attacker is always #1)
REP = 1;
CIS = 2;
-- These variables do not change
ATT = REP;
DEF = CIS;


function ScriptPostLoad()


playSound = OnCharacterSpawn(
function(player)
if GetEnityClass(player) == FindEnityClass("commando") then
ScriptCB_SndPlaySound("spawn_D38ZZ016")
end
end


--This defines the CPs. These need to happen first
cp1 = CommandPost:New{name = "CP1"}
cp2 = CommandPost:New{name = "CP2"}
cp3 = CommandPost:New{name = "CP3"}
cp4 = CommandPost:New{name = "CP4"}
cp5 = CommandPost:New{name = "CP5"}
cp6 = CommandPost:New{name = "CP7"}



--This sets up the actual objective. This needs to happen after cp's are defined
conquest = ObjectiveConquest:New{teamATT = ATT, teamDEF = DEF,
textATT = "game.modes.con",
textDEF = "game.modes.con2",
multiplayerRules = true}

--This adds the CPs to the objective. This needs to happen after the objective is set up
conquest:AddCommandPost(cp1)
conquest:AddCommandPost(cp2)
conquest:AddCommandPost(cp3)
conquest:AddCommandPost(cp4)
conquest:AddCommandPost(cp5)
conquest:AddCommandPost(cp6)

conquest:Start()

herosupport = AIHeroSupport:New{AIATTHeroHealth = 2500, AIDEFHeroHealth = 3000, gameMode = "conquest",}
herosupport:SetHeroClass(CIS, "cis_hero_jangofett")
herosupport:AddSpawnCP("cp1","cp1spawn")
herosupport:AddSpawnCP("cp2","cp2spawn")
herosupport:AddSpawnCP("cp3","cp3spawn")
herosupport:AddSpawnCP("cp4","cp4spawn")
herosupport:AddSpawnCP("cp5","cp5spawn")
herosupport:AddSpawnCP("cp7","cp7spawn")
herosupport:Start()

EnableSPHeroRules()

AddDeathRegion("DeathRegion")
AddDeathRegion("DeathRegion2")

end


---------------------------------------------------------------------------
-- FUNCTION: ScriptInit
-- PURPOSE: This function is only run once
-- INPUT:
-- OUTPUT:
-- NOTES: The name, 'ScriptInit' is a chosen convention, and each
-- mission script must contain a version of this function, as
-- it is called from C to start the mission.
---------------------------------------------------------------------------
function ScriptInit()

SetUberMode(1);
ReadDataFile("ingame.lvl")


SetMaxFlyHeight(-5)
SetMaxPlayerFlyHeight (-5)

SetMemoryPoolSize ("ClothData",20)
SetMemoryPoolSize ("Combo",50) -- should be ~ 2x number of jedi classes
SetMemoryPoolSize ("Combo::State",650) -- should be ~12x #Combo
SetMemoryPoolSize ("Combo::Transition",650) -- should be a bit bigger than #Combo::State
SetMemoryPoolSize ("Combo::Condition",650) -- should be a bit bigger than #Combo::State
SetMemoryPoolSize ("Combo::Attack",550) -- should be ~8-12x #Combo
SetMemoryPoolSize ("Combo::DamageSample",6000) -- should be ~8-12x #Combo::Attack
SetMemoryPoolSize ("Combo::Deflect",100) -- should be ~1x #combo

ReadDataFile("sound\\cor.lvl;cor1cw")
ReadDataFile("dc:sound\\ABC.lvl;ABCcw")

ReadDataFile("SIDE\\rep.lvl",
"rep_hero_obiwan")

ReadDataFile("SIDE\\cis.lvl",
"cis_hero_jangofett")

ReadDataFile("dc:SIDE\\dev.lvl",
"rep_clone1",
"rep_clone2",
"rep_clone3",
"rep_clone4",
"rep_clone5",
"rep_clone6",
"rep_clone7",
"rep_clone8",
"rep_clone9",
"rep_clone10")

ReadDataFile("dc:SIDE\\fed.lvl",
"cis_droid1",
"cis_droid2",
"cis_droid3",
"cis_droid4",
"cis_droid5",
"cis_droid6",
"cis_droid7",
"cis_droid8",
"cis_droid9",
"cis_hero")

ReadDataFile("SIDE\\tur.lvl",
"tur_weap_built_gunturret",
"tur_bldg_laser")

SetupTeams{
rep = {
team = REP,
units = 40,
reinforcements = 150,
soldier = { "rep_clone1",10, 15},
heavy = { "rep_clone2",3,4},
sniper = { "rep_clone3",3,4},
engineer = { "rep_clone4",3,4},
marine = { "rep_clone5",3,4},
recon = { "rep_clone6",3,4},
gunner = { "rep_clone7",3,4},
special = { "rep_clone8",3,4},
commando = { "rep_clone9",3,4},
commander = { "rep_clone10",1,2},

},
cis = {
team = CIS,
units = 40,
reinforcements = 150,
soldier = { "cis_droid1",8, 20},
heavy = { "cis_droid2",4,5},
sniper = { "cis_droid3",4,5},
engineer = { "cis_droid4",4,5},
marine = { "cis_droid5",7,9},
recon = { "cis_droid6",3,4},
gunner = { "cis_droid7",3,4},
special = { "cis_droid8",1,1},
commander = { "cis_droid9",2,3},
}
}

SetHeroClass(REP, "rep_hero_obiwan")


-- Level Stats
-- ClearWalkers()
AddWalkerType(0, 20) -- special -> droidekas
AddWalkerType(1, 0) -- 1x2 (1 pair of legs)
AddWalkerType(2, 0) -- 2x2 (2 pairs of legs)
AddWalkerType(3, 0) -- 3x2 (3 pairs of legs)
local weaponCnt = 1024
SetMemoryPoolSize("Aimer", 75)
SetMemoryPoolSize("AmmoCounter", weaponCnt)
SetMemoryPoolSize("BaseHint", 1024)
SetMemoryPoolSize("EnergyBar", weaponCnt)
SetMemoryPoolSize("EntityCloth", 32)
SetMemoryPoolSize("EntityFlyer", 32)
SetMemoryPoolSize("EntityHover", 32)
SetMemoryPoolSize("EntityLight", 200)
SetMemoryPoolSize("EntitySoundStream", 4)
SetMemoryPoolSize("EntitySoundStatic", 32)
SetMemoryPoolSize("MountedTurret", 32)
SetMemoryPoolSize("Navigator", 128)
SetMemoryPoolSize("Obstacle", 1024)
SetMemoryPoolSize("PathNode", 1024)
SetMemoryPoolSize("SoldierAnimation", 370)
SetMemoryPoolSize("SoundSpaceRegion", 64)
SetMemoryPoolSize("TreeGridStack", 1024)
SetMemoryPoolSize("UnitAgent", 128)
SetMemoryPoolSize("UnitController", 128)
SetMemoryPoolSize("Weapon", weaponCnt)

SetSpawnDelay(10.0, 0.25)
ReadDataFile("dc:ABC\\bes2.lvl", "bespin2_conquest")
SetDenseEnvironment("false")

-- Sound Stats

voiceSlow = OpenAudioStream("sound\\global.lvl", "rep_unit_vo_slow")
AudioStreamAppendSegments("sound\\global.lvl", "cis_unit_vo_slow", voiceSlow)
AudioStreamAppendSegments("sound\\global.lvl", "global_vo_slow", voiceSlow)

voiceQuick = OpenAudioStream("sound\\global.lvl", "rep_unit_vo_quick")
AudioStreamAppendSegments("sound\\global.lvl", "cis_unit_vo_quick", voiceQuick)

OpenAudioStream("sound\\global.lvl", "cw_music")
OpenAudioStream("dc:sound\\ABC.lvl", "ABC_stream")
-- OpenAudioStream("sound\\global.lvl", "global_vo_quick")
-- OpenAudioStream("sound\\global.lvl", "global_vo_slow")
OpenAudioStream("sound\\cor.lvl", "cor1")
OpenAudioStream("sound\\cor.lvl", "cor1")
-- OpenAudioStream("sound\\cor.lvl", "cor1_emt")

SetBleedingVoiceOver(REP, REP, "rep_off_com_report_us_overwhelmed", 1)
SetBleedingVoiceOver(REP, CIS, "rep_off_com_report_enemy_losing", 1)
SetBleedingVoiceOver(CIS, REP, "cis_off_com_report_enemy_losing", 1)
SetBleedingVoiceOver(CIS, CIS, "cis_off_com_report_us_overwhelmed", 1)

SetLowReinforcementsVoiceOver(REP, REP, "rep_off_defeat_im", .1, 1)
SetLowReinforcementsVoiceOver(REP, CIS, "rep_off_victory_im", .1, 1)
SetLowReinforcementsVoiceOver(CIS, CIS, "cis_off_defeat_im", .1, 1)
SetLowReinforcementsVoiceOver(CIS, REP, "cis_off_victory_im", .1, 1)

SetOutOfBoundsVoiceOver(2, "Repleaving")
SetOutOfBoundsVoiceOver(1, "Cisleaving")

SetAmbientMusic(REP, 1.0, "rep_cor_amb_start", 0,1)
SetAmbientMusic(REP, 0.8, "rep_cor_amb_middle", 1,1)
SetAmbientMusic(REP, 0.2, "rep_cor_amb_end", 2,1)
SetAmbientMusic(CIS, 1.0, "cis_cor_amb_start", 0,1)
SetAmbientMusic(CIS, 0.8, "cis_cor_amb_middle", 1,1)
SetAmbientMusic(CIS, 0.2, "cis_cor_amb_end", 2,1)

SetVictoryMusic(REP, "rep_cor_amb_victory")
SetDefeatMusic (REP, "rep_cor_amb_defeat")
SetVictoryMusic(CIS, "cis_cor_amb_victory")
SetDefeatMusic (CIS, "cis_cor_amb_defeat")

SetSoundEffect("ScopeDisplayZoomIn", "binocularzoomin")
SetSoundEffect("ScopeDisplayZoomOut", "binocularzoomout")
--SetSoundEffect("WeaponUnableSelect", "com_weap_inf_weaponchange_null")
--SetSoundEffect("WeaponModeUnableSelect", "com_weap_inf_modechange_null")
SetSoundEffect("SpawnDisplayUnitChange", "shell_select_unit")
SetSoundEffect("SpawnDisplayUnitAccept", "shell_menu_enter")
SetSoundEffect("SpawnDisplaySpawnPointChange", "shell_select_change")
SetSoundEffect("SpawnDisplaySpawnPointAccept", "shell_menu_enter")
SetSoundEffect("SpawnDisplayBack", "shell_menu_exit")


-- Camera Stats
--Bespin 2
--Courtyard
AddCameraShot(0.364258, -0.004224, -0.931226, -0.010797, -206.270294, -44.204708, 88.837059);
--Carbon Chamber
AddCameraShot(0.327508, 0.002799, -0.944810, 0.008076, -184.781006, -59.802036, -28.118919);
--Wind Tunnel
AddCameraShot(0.572544, -0.013560, -0.819532, -0.019410, -244.788055, -61.541622, -44.260509);
end
Is the units class name commando? Could you post your munge error log?
my unit req is called rep_clone9 is class commando in odf unittype support and rep_inf_ep3_rifleman is soldier class

munge log
Hidden/Spoiler:
C:\BF2_ModTools\ToolsFL\Bin\luac.exe: ..\..\common\scripts\BES\bes2x_con.lua:30: `)' expected (to close `(' at line 21) near `cp1'
ERROR[scriptmunge scripts\BES\bes2x_con.lua]:Could not read input file.ERROR[scriptmunge scripts\BES\bes2x_con.lua]:Could not read input file. [continuing]
C:\BF2_ModTools\ToolsFL\Bin\luac.exe: cannot read ..\..\common\scripts\BES\Copia: No such file or directory
ERROR[scriptmunge scripts\BES\Copia (2) de bes2x_con.lua]:Could not read input file.ERROR[scriptmunge scripts\BES\Copia (2) de bes2x_con.lua]:Could not read input file. [continuing]
4 Errors 0 Warnings

ERROR[levelpack mission\bes2x_con.req]:Expecting bracket, but none was found.
File : munged\pc\bes2x_con.script.req(1)...

ucft <--
ERROR[levelpack mission\bes2x_con.req]:Expecting bracket, but none was found.
File : munged\pc\bes2x_con.script.req(1)...

ucft <--

2 Errors 0 Warnings
EDIT: munge log fixed but anyway sound dont work this is my line

playSound = OnCharacterSpawn(
function(player)
if GetEnityClass(player) == FindEnityClass("support (unittype)") then
ScriptCB_SndPlaySound("lala.wav")
end
end
)
that is right xD?
myers73
Lieutenant General
Lieutenant General
Posts: 690
Joined: Fri Apr 03, 2009 11:04 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: Atlanta, GA xfire=myers73 IngameName=mYers

Re: Player spawn sound (no hero)

Post by myers73 »

Always write your code in

Code: Select all

tags

Code: Select all


playSound = OnCharacterSpawn(
    function(player)
        if GetEnityClass(player) == FindEnityClass("rep_inf_rifleman") then
        ScriptCB_SndPlaySound("asoundfile")
        end
    end
)


Deviss
Master of the Force
Master of the Force
Posts: 3772
Joined: Tue Aug 12, 2008 7:59 pm
Projects :: Clone Wars Extended
Games I'm Playing :: BF2

Re: Player spawn sound (no hero)

Post by Deviss »

myers73 wrote:Always write your code in

Code: Select all

tags

Code: Select all


playSound = OnCharacterSpawn(
    function(player)
        if GetEnityClass(player) == FindEnityClass("rep_inf_rifleman") then
        ScriptCB_SndPlaySound("asoundfile")
        end
    end
)


dont work xD (usual in me lol) and sorry i never understood whole GT codes :P
Hidden/Spoiler:
[code]--
-- Copyright (c) 2005 Pandemic Studios, LLC. All rights reserved.
--

-- load the gametype script
ScriptCB_DoFile("ObjectiveConquest")
ScriptCB_DoFile("setup_teams")
ScriptCB_DoFile("AIHeroSupport")

-- REP Attacking (attacker is always #1)
REP = 1;
CIS = 2;
-- These variables do not change
ATT = REP;
DEF = CIS;


function ScriptPostLoad()


playSound = OnCharacterSpawn(
function(player)
if GetEnityClass(player) == FindEnityClass("rep_clone9") then
ScriptCB_SndPlaySound("death_D38X3002")
end
end
)


--This defines the CPs. These need to happen first
cp1 = CommandPost:New{name = "CP1"}
cp2 = CommandPost:New{name = "CP2"}
cp3 = CommandPost:New{name = "CP3"}
cp4 = CommandPost:New{name = "CP4"}
cp5 = CommandPost:New{name = "CP5"}
cp6 = CommandPost:New{name = "CP7"}



--This sets up the actual objective. This needs to happen after cp's are defined
conquest = ObjectiveConquest:New{teamATT = ATT, teamDEF = DEF,
textATT = "game.modes.con",
textDEF = "game.modes.con2",
multiplayerRules = true}

--This adds the CPs to the objective. This needs to happen after the objective is set up
conquest:AddCommandPost(cp1)
conquest:AddCommandPost(cp2)
conquest:AddCommandPost(cp3)
conquest:AddCommandPost(cp4)
conquest:AddCommandPost(cp5)
conquest:AddCommandPost(cp6)

conquest:Start()

herosupport = AIHeroSupport:New{AIATTHeroHealth = 2500, AIDEFHeroHealth = 3000, gameMode = "conquest",}
herosupport:SetHeroClass(CIS, "cis_hero_jangofett")
herosupport:AddSpawnCP("cp1","cp1spawn")
herosupport:AddSpawnCP("cp2","cp2spawn")
herosupport:AddSpawnCP("cp3","cp3spawn")
herosupport:AddSpawnCP("cp4","cp4spawn")
herosupport:AddSpawnCP("cp5","cp5spawn")
herosupport:AddSpawnCP("cp7","cp7spawn")
herosupport:Start()

EnableSPHeroRules()

AddDeathRegion("DeathRegion")
AddDeathRegion("DeathRegion2")

end


---------------------------------------------------------------------------
-- FUNCTION: ScriptInit
-- PURPOSE: This function is only run once
-- INPUT:
-- OUTPUT:
-- NOTES: The name, 'ScriptInit' is a chosen convention, and each
-- mission script must contain a version of this function, as
-- it is called from C to start the mission.
---------------------------------------------------------------------------
function ScriptInit()

SetUberMode(1);
ReadDataFile("ingame.lvl")


SetMaxFlyHeight(-5)
SetMaxPlayerFlyHeight (-5)

SetMemoryPoolSize ("ClothData",20)
SetMemoryPoolSize ("Combo",50) -- should be ~ 2x number of jedi classes
SetMemoryPoolSize ("Combo::State",650) -- should be ~12x #Combo
SetMemoryPoolSize ("Combo::Transition",650) -- should be a bit bigger than #Combo::State
SetMemoryPoolSize ("Combo::Condition",650) -- should be a bit bigger than #Combo::State
SetMemoryPoolSize ("Combo::Attack",550) -- should be ~8-12x #Combo
SetMemoryPoolSize ("Combo::DamageSample",6000) -- should be ~8-12x #Combo::Attack
SetMemoryPoolSize ("Combo::Deflect",100) -- should be ~1x #combo

ReadDataFile("sound\\cor.lvl;cor1cw")
ReadDataFile("dc:sound\\ABC.lvl;ABCcw")

ReadDataFile("SIDE\\rep.lvl",
"rep_hero_obiwan")

ReadDataFile("SIDE\\cis.lvl",
"cis_hero_jangofett")

ReadDataFile("dc:SIDE\\dev.lvl",
"rep_clone1",
"rep_clone2",
"rep_clone3",
"rep_clone4",
"rep_clone5",
"rep_clone6",
"rep_clone7",
"rep_clone8",
"rep_clone9",
"rep_clone10")

ReadDataFile("dc:SIDE\\fed.lvl",
"cis_droid1",
"cis_droid2",
"cis_droid3",
"cis_droid4",
"cis_droid5",
"cis_droid6",
"cis_droid7",
"cis_droid8",
"cis_droid9",
"cis_hero")

ReadDataFile("SIDE\\tur.lvl",
"tur_weap_built_gunturret",
"tur_bldg_laser")

SetupTeams{
rep = {
team = REP,
units = 40,
reinforcements = 150,
soldier = { "rep_clone1",10, 15},
heavy = { "rep_clone2",3,4},
sniper = { "rep_clone3",3,4},
engineer = { "rep_clone4",3,4},
marine = { "rep_clone5",3,4},
recon = { "rep_clone6",3,4},
gunner = { "rep_clone7",3,4},
special = { "rep_clone8",3,4},
commando = { "rep_clone9",3,4},
commander = { "rep_clone10",1,2},

},
cis = {
team = CIS,
units = 40,
reinforcements = 150,
soldier = { "cis_droid1",8, 20},
heavy = { "cis_droid2",4,5},
sniper = { "cis_droid3",4,5},
engineer = { "cis_droid4",4,5},
marine = { "cis_droid5",7,9},
recon = { "cis_droid6",3,4},
gunner = { "cis_droid7",3,4},
special = { "cis_droid8",1,1},
commander = { "cis_droid9",2,3},
}
}

SetHeroClass(REP, "rep_hero_obiwan")


-- Level Stats
-- ClearWalkers()
AddWalkerType(0, 20) -- special -> droidekas
AddWalkerType(1, 0) -- 1x2 (1 pair of legs)
AddWalkerType(2, 0) -- 2x2 (2 pairs of legs)
AddWalkerType(3, 0) -- 3x2 (3 pairs of legs)
local weaponCnt = 1024
SetMemoryPoolSize("Aimer", 75)
SetMemoryPoolSize("AmmoCounter", weaponCnt)
SetMemoryPoolSize("BaseHint", 1024)
SetMemoryPoolSize("EnergyBar", weaponCnt)
SetMemoryPoolSize("EntityCloth", 32)
SetMemoryPoolSize("EntityFlyer", 32)
SetMemoryPoolSize("EntityHover", 32)
SetMemoryPoolSize("EntityLight", 200)
SetMemoryPoolSize("EntitySoundStream", 4)
SetMemoryPoolSize("EntitySoundStatic", 32)
SetMemoryPoolSize("MountedTurret", 32)
SetMemoryPoolSize("Navigator", 128)
SetMemoryPoolSize("Obstacle", 1024)
SetMemoryPoolSize("PathNode", 1024)
SetMemoryPoolSize("SoldierAnimation", 370)
SetMemoryPoolSize("SoundSpaceRegion", 64)
SetMemoryPoolSize("TreeGridStack", 1024)
SetMemoryPoolSize("UnitAgent", 128)
SetMemoryPoolSize("UnitController", 128)
SetMemoryPoolSize("Weapon", weaponCnt)

SetSpawnDelay(10.0, 0.25)
ReadDataFile("dc:ABC\\bes2.lvl", "bespin2_conquest")
SetDenseEnvironment("false")

-- Sound Stats

voiceSlow = OpenAudioStream("sound\\global.lvl", "rep_unit_vo_slow")
AudioStreamAppendSegments("sound\\global.lvl", "cis_unit_vo_slow", voiceSlow)
AudioStreamAppendSegments("sound\\global.lvl", "global_vo_slow", voiceSlow)

voiceQuick = OpenAudioStream("sound\\global.lvl", "rep_unit_vo_quick")
AudioStreamAppendSegments("sound\\global.lvl", "cis_unit_vo_quick", voiceQuick)

OpenAudioStream("sound\\global.lvl", "cw_music")
OpenAudioStream("dc:sound\\ABC.lvl", "ABC_stream")
-- OpenAudioStream("sound\\global.lvl", "global_vo_quick")
-- OpenAudioStream("sound\\global.lvl", "global_vo_slow")
OpenAudioStream("sound\\cor.lvl", "cor1")
OpenAudioStream("sound\\cor.lvl", "cor1")
-- OpenAudioStream("sound\\cor.lvl", "cor1_emt")

SetBleedingVoiceOver(REP, REP, "rep_off_com_report_us_overwhelmed", 1)
SetBleedingVoiceOver(REP, CIS, "rep_off_com_report_enemy_losing", 1)
SetBleedingVoiceOver(CIS, REP, "cis_off_com_report_enemy_losing", 1)
SetBleedingVoiceOver(CIS, CIS, "cis_off_com_report_us_overwhelmed", 1)

SetLowReinforcementsVoiceOver(REP, REP, "rep_off_defeat_im", .1, 1)
SetLowReinforcementsVoiceOver(REP, CIS, "rep_off_victory_im", .1, 1)
SetLowReinforcementsVoiceOver(CIS, CIS, "cis_off_defeat_im", .1, 1)
SetLowReinforcementsVoiceOver(CIS, REP, "cis_off_victory_im", .1, 1)

SetOutOfBoundsVoiceOver(2, "Repleaving")
SetOutOfBoundsVoiceOver(1, "Cisleaving")

SetAmbientMusic(REP, 1.0, "rep_cor_amb_start", 0,1)
SetAmbientMusic(REP, 0.8, "rep_cor_amb_middle", 1,1)
SetAmbientMusic(REP, 0.2, "rep_cor_amb_end", 2,1)
SetAmbientMusic(CIS, 1.0, "cis_cor_amb_start", 0,1)
SetAmbientMusic(CIS, 0.8, "cis_cor_amb_middle", 1,1)
SetAmbientMusic(CIS, 0.2, "cis_cor_amb_end", 2,1)

SetVictoryMusic(REP, "rep_cor_amb_victory")
SetDefeatMusic (REP, "rep_cor_amb_defeat")
SetVictoryMusic(CIS, "cis_cor_amb_victory")
SetDefeatMusic (CIS, "cis_cor_amb_defeat")

SetSoundEffect("ScopeDisplayZoomIn", "binocularzoomin")
SetSoundEffect("ScopeDisplayZoomOut", "binocularzoomout")
--SetSoundEffect("WeaponUnableSelect", "com_weap_inf_weaponchange_null")
--SetSoundEffect("WeaponModeUnableSelect", "com_weap_inf_modechange_null")
SetSoundEffect("SpawnDisplayUnitChange", "shell_select_unit")
SetSoundEffect("SpawnDisplayUnitAccept", "shell_menu_enter")
SetSoundEffect("SpawnDisplaySpawnPointChange", "shell_select_change")
SetSoundEffect("SpawnDisplaySpawnPointAccept", "shell_menu_enter")
SetSoundEffect("SpawnDisplayBack", "shell_menu_exit")


-- Camera Stats
--Bespin 2
--Courtyard
AddCameraShot(0.364258, -0.004224, -0.931226, -0.010797, -206.270294, -44.204708, 88.837059);
--Carbon Chamber
AddCameraShot(0.327508, 0.002799, -0.944810, 0.008076, -184.781006, -59.802036, -28.118919);
--Wind Tunnel
AddCameraShot(0.572544, -0.013560, -0.819532, -0.019410, -244.788055, -61.541622, -44.260509);
end

[/code]
myers73
Lieutenant General
Lieutenant General
Posts: 690
Joined: Fri Apr 03, 2009 11:04 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: Atlanta, GA xfire=myers73 IngameName=mYers

Re: Player spawn sound (no hero)

Post by myers73 »

what didnt work, the munge, or the sound didnt play? If the sound didnt play im pretty sure that you have to load the correct sound.lvl. post a debug log of anything related to sound thats not VO related.

you can still put hide tags on the outside of code tags if you are posting a whole LUA.

Hidden/Spoiler:
[code]MAGIC[/code]
[/color][/size]
Deviss
Master of the Force
Master of the Force
Posts: 3772
Joined: Tue Aug 12, 2008 7:59 pm
Projects :: Clone Wars Extended
Games I'm Playing :: BF2

Re: Player spawn sound (no hero)

Post by Deviss »

myers73 wrote:what didnt work, the munge, or the sound didnt play? If the sound didnt play im pretty sure that you have to load the correct sound.lvl. post a debug log of anything related to sound thats not VO related.

you can still put hide tags on the outside of code tags if you are posting a whole LUA.

Hidden/Spoiler:
[code]MAGIC[/code]
[/color][/size]
munge fine, sound didnt play :S, you mean this?
Hidden/Spoiler:
soundflmunge.exe : Error : Unable to open file ..\gcw\streams\PlayerCommands_vo\AI1COM474.wav - while munging C:\BF2_ModTools\data_ABC\Sound\global\all_unit_vo_quick.stm
soundflmunge.exe : Error : Unable to open file ..\gcw\streams\PlayerCommands_vo\AI1COM474.wav, format may be invalid - while munging C:\BF2_ModTools\data_ABC\Sound\global\all_unit_vo_quick.stm
soundflmunge.exe : Error : Unable to read file list C:\BF2_ModTools\data_ABC\Sound\global\all_unit_vo_quick.stm - while munging C:\BF2_ModTools\data_ABC\Sound\global\all_unit_vo_quick.stm
soundflmunge.exe : Error : Unable to open file ..\worlds\GAL\streams\metagame_vo\AOCOM0069.wav - while munging C:\BF2_ModTools\data_ABC\Sound\global\all_unit_vo_slow.stm
soundflmunge.exe : Error : Unable to open file ..\worlds\GAL\streams\metagame_vo\AOCOM0069.wav, format may be invalid - while munging C:\BF2_ModTools\data_ABC\Sound\global\all_unit_vo_slow.stm
soundflmunge.exe : Error : Unable to read file list C:\BF2_ModTools\data_ABC\Sound\global\all_unit_vo_slow.stm - while munging C:\BF2_ModTools\data_ABC\Sound\global\all_unit_vo_slow.stm
soundflmunge.exe : Error : Unable to open file ..\cw\streams\PlayerCommands_vo\CI1COM527.wav - while munging C:\BF2_ModTools\data_ABC\Sound\global\cis_unit_vo_quick.stm
soundflmunge.exe : Error : Unable to open file ..\cw\streams\PlayerCommands_vo\CI1COM527.wav, format may be invalid - while munging C:\BF2_ModTools\data_ABC\Sound\global\cis_unit_vo_quick.stm
soundflmunge.exe : Error : Unable to read file list C:\BF2_ModTools\data_ABC\Sound\global\cis_unit_vo_quick.stm - while munging C:\BF2_ModTools\data_ABC\Sound\global\cis_unit_vo_quick.stm
soundflmunge.exe : Error : Unable to open file ..\worlds\GAL\streams\metagame_vo\COCOM0076.wav - while munging C:\BF2_ModTools\data_ABC\Sound\global\cis_unit_vo_slow.stm
soundflmunge.exe : Error : Unable to open file ..\worlds\GAL\streams\metagame_vo\COCOM0076.wav, format may be invalid - while munging C:\BF2_ModTools\data_ABC\Sound\global\cis_unit_vo_slow.stm
soundflmunge.exe : Error : Unable to read file list C:\BF2_ModTools\data_ABC\Sound\global\cis_unit_vo_slow.stm - while munging C:\BF2_ModTools\data_ABC\Sound\global\cis_unit_vo_slow.stm
soundflmunge.exe : Error : Unable to open file ..\worlds\cor\streams\Objective_VO\ROCOR0006.wav - while munging C:\BF2_ModTools\data_ABC\Sound\global\cor_objective_vo_slow.stm
soundflmunge.exe : Error : Unable to open file ..\worlds\cor\streams\Objective_VO\ROCOR0006.wav, format may be invalid - while munging C:\BF2_ModTools\data_ABC\Sound\global\cor_objective_vo_slow.stm
soundflmunge.exe : Error : Unable to read file list C:\BF2_ModTools\data_ABC\Sound\global\cor_objective_vo_slow.stm - while munging C:\BF2_ModTools\data_ABC\Sound\global\cor_objective_vo_slow.stm
soundflmunge.exe : Error : Unable to open file ..\cw\streams\mxCISCor01_Act01_lp.wav - while munging C:\BF2_ModTools\data_ABC\Sound\global\cw_music.stm
soundflmunge.exe : Error : Unable to open file ..\cw\streams\mxCISCor01_Act01_lp.wav, format may be invalid - while munging C:\BF2_ModTools\data_ABC\Sound\global\cw_music.stm
soundflmunge.exe : Error : Unable to read file list C:\BF2_ModTools\data_ABC\Sound\global\cw_music.stm - while munging C:\BF2_ModTools\data_ABC\Sound\global\cw_music.stm
soundflmunge.exe : Error : Unable to open file ..\worlds\dea\streams\Objective_VO\IODEA0010.wav - while munging C:\BF2_ModTools\data_ABC\Sound\global\dea_objective_vo_slow.stm
soundflmunge.exe : Error : Unable to open file ..\worlds\dea\streams\Objective_VO\IODEA0010.wav, format may be invalid - while munging C:\BF2_ModTools\data_ABC\Sound\global\dea_objective_vo_slow.stm
soundflmunge.exe : Error : Unable to read file list C:\BF2_ModTools\data_ABC\Sound\global\dea_objective_vo_slow.stm - while munging C:\BF2_ModTools\data_ABC\Sound\global\dea_objective_vo_slow.stm
soundflmunge.exe : Error : Unable to open file streams\desert_battlechatter_vo\jawa_01.wav - while munging C:\BF2_ModTools\data_ABC\Sound\global\des_unit_vo_slow.stm
soundflmunge.exe : Error : Unable to open file streams\desert_battlechatter_vo\jawa_01.wav, format may be invalid - while munging C:\BF2_ModTools\data_ABC\Sound\global\des_unit_vo_slow.stm
soundflmunge.exe : Error : Unable to read file list C:\BF2_ModTools\data_ABC\Sound\global\des_unit_vo_slow.stm - while munging C:\BF2_ModTools\data_ABC\Sound\global\des_unit_vo_slow.stm
soundflmunge.exe : Error : Unable to open file ..\worlds\fel\streams\Objective_VO\ROFEL0005.wav - while munging C:\BF2_ModTools\data_ABC\Sound\global\fel_objective_vo_slow.stm
soundflmunge.exe : Error : Unable to open file ..\worlds\fel\streams\Objective_VO\ROFEL0005.wav, format may be invalid - while munging C:\BF2_ModTools\data_ABC\Sound\global\fel_objective_vo_slow.stm
soundflmunge.exe : Error : Unable to read file list C:\BF2_ModTools\data_ABC\Sound\global\fel_objective_vo_slow.stm - while munging C:\BF2_ModTools\data_ABC\Sound\global\fel_objective_vo_slow.stm
soundflmunge.exe : Error : Unable to open file streams\gamorian_guard_battlechatter_vo\gamoreanGuard_01.wav - while munging C:\BF2_ModTools\data_ABC\Sound\global\gam_unit_vo_slow.stm
soundflmunge.exe : Error : Unable to open file streams\gamorian_guard_battlechatter_vo\gamoreanGuard_01.wav, format may be invalid - while munging C:\BF2_ModTools\data_ABC\Sound\global\gam_unit_vo_slow.stm
soundflmunge.exe : Error : Unable to read file list C:\BF2_ModTools\data_ABC\Sound\global\gam_unit_vo_slow.stm - while munging C:\BF2_ModTools\data_ABC\Sound\global\gam_unit_vo_slow.stm
soundflmunge.exe : Error : Unable to open file ..\gcw\streams\mxAllDag01_Amb01_lp.wav - while munging C:\BF2_ModTools\data_ABC\Sound\global\gcw_music.stm
soundflmunge.exe : Error : Unable to open file ..\gcw\streams\mxAllDag01_Amb01_lp.wav, format may be invalid - while munging C:\BF2_ModTools\data_ABC\Sound\global\gcw_music.stm
soundflmunge.exe : Error : Unable to read file list C:\BF2_ModTools\data_ABC\Sound\global\gcw_music.stm - while munging C:\BF2_ModTools\data_ABC\Sound\global\gcw_music.stm
soundflmunge.exe : Error : Unable to open file ..\worlds\geo\streams\Objective_VO\ROGEO0011.wav - while munging C:\BF2_ModTools\data_ABC\Sound\global\geo_objective_vo_slow.stm
soundflmunge.exe : Error : Unable to open file ..\worlds\geo\streams\Objective_VO\ROGEO0011.wav, format may be invalid - while munging C:\BF2_ModTools\data_ABC\Sound\global\geo_objective_vo_slow.stm
soundflmunge.exe : Error : Unable to read file list C:\BF2_ModTools\data_ABC\Sound\global\geo_objective_vo_slow.stm - while munging C:\BF2_ModTools\data_ABC\Sound\global\geo_objective_vo_slow.stm
soundflmunge.exe : Error : Unable to open file streams\ui_objComplete_1.wav - while munging C:\BF2_ModTools\data_ABC\Sound\global\global_vo_quick.stm
soundflmunge.exe : Error : Unable to open file streams\ui_objComplete_1.wav, format may be invalid - while munging C:\BF2_ModTools\data_ABC\Sound\global\global_vo_quick.stm
soundflmunge.exe : Error : Unable to read file list C:\BF2_ModTools\data_ABC\Sound\global\global_vo_quick.stm - while munging C:\BF2_ModTools\data_ABC\Sound\global\global_vo_quick.stm
soundflmunge.exe : Error : Unable to open file ..\global\effects\crtr_wookiee_chatter_01.wav - while munging C:\BF2_ModTools\data_ABC\Sound\global\global_vo_slow.stm
soundflmunge.exe : Error : Unable to open file ..\global\effects\crtr_wookiee_chatter_01.wav, format may be invalid - while munging C:\BF2_ModTools\data_ABC\Sound\global\global_vo_slow.stm
soundflmunge.exe : Error : Unable to read file list C:\BF2_ModTools\data_ABC\Sound\global\global_vo_slow.stm - while munging C:\BF2_ModTools\data_ABC\Sound\global\global_vo_slow.stm
soundflmunge.exe : Error : Unable to open file streams\gungan_battlechatter_vo\GI1COM007.wav - while munging C:\BF2_ModTools\data_ABC\Sound\global\gun_unit_vo_slow.stm
soundflmunge.exe : Error : Unable to open file streams\gungan_battlechatter_vo\GI1COM007.wav, format may be invalid - while munging C:\BF2_ModTools\data_ABC\Sound\global\gun_unit_vo_slow.stm
soundflmunge.exe : Error : Unable to read file list C:\BF2_ModTools\data_ABC\Sound\global\gun_unit_vo_slow.stm - while munging C:\BF2_ModTools\data_ABC\Sound\global\gun_unit_vo_slow.stm
soundflmunge.exe : Error : Unable to open file ..\worlds\hot\streams\Objective_VO\CVHOT0004.wav - while munging C:\BF2_ModTools\data_ABC\Sound\global\hot_objective_vo_slow.stm
soundflmunge.exe : Error : Unable to open file ..\worlds\hot\streams\Objective_VO\CVHOT0004.wav, format may be invalid - while munging C:\BF2_ModTools\data_ABC\Sound\global\hot_objective_vo_slow.stm
soundflmunge.exe : Error : Unable to read file list C:\BF2_ModTools\data_ABC\Sound\global\hot_objective_vo_slow.stm - while munging C:\BF2_ModTools\data_ABC\Sound\global\hot_objective_vo_slow.stm
soundflmunge.exe : Error : Unable to open file ..\gcw\streams\PlayerCommands_vo\II1COM751.wav - while munging C:\BF2_ModTools\data_ABC\Sound\global\imp_unit_vo_quick.stm
soundflmunge.exe : Error : Unable to open file ..\gcw\streams\PlayerCommands_vo\II1COM751.wav, format may be invalid - while munging C:\BF2_ModTools\data_ABC\Sound\global\imp_unit_vo_quick.stm
soundflmunge.exe : Error : Unable to read file list C:\BF2_ModTools\data_ABC\Sound\global\imp_unit_vo_quick.stm - while munging C:\BF2_ModTools\data_ABC\Sound\global\imp_unit_vo_quick.stm
soundflmunge.exe : Error : Unable to open file ..\worlds\GAL\streams\metagame_vo\IOCOM0078.wav - while munging C:\BF2_ModTools\data_ABC\Sound\global\imp_unit_vo_slow.stm
soundflmunge.exe : Error : Unable to open file ..\worlds\GAL\streams\metagame_vo\IOCOM0078.wav, format may be invalid - while munging C:\BF2_ModTools\data_ABC\Sound\global\imp_unit_vo_slow.stm
soundflmunge.exe : Error : Unable to read file list C:\BF2_ModTools\data_ABC\Sound\global\imp_unit_vo_slow.stm - while munging C:\BF2_ModTools\data_ABC\Sound\global\imp_unit_vo_slow.stm
soundflmunge.exe : Error : Unable to open file ..\worlds\kam\streams\Objective_VO\IOKAM0002.wav - while munging C:\BF2_ModTools\data_ABC\Sound\global\kam_objective_vo_slow.stm
soundflmunge.exe : Error : Unable to open file ..\worlds\kam\streams\Objective_VO\IOKAM0002.wav, format may be invalid - while munging C:\BF2_ModTools\data_ABC\Sound\global\kam_objective_vo_slow.stm
soundflmunge.exe : Error : Unable to read file list C:\BF2_ModTools\data_ABC\Sound\global\kam_objective_vo_slow.stm - while munging C:\BF2_ModTools\data_ABC\Sound\global\kam_objective_vo_slow.stm
soundflmunge.exe : Error : Unable to open file ..\worlds\kas\streams\Objective_VO\ROKAS0001.wav - while munging C:\BF2_ModTools\data_ABC\Sound\global\KAS_objective_vo_slow.stm
soundflmunge.exe : Error : Unable to open file ..\worlds\kas\streams\Objective_VO\ROKAS0001.wav, format may be invalid - while munging C:\BF2_ModTools\data_ABC\Sound\global\KAS_objective_vo_slow.stm
soundflmunge.exe : Error : Unable to read file list C:\BF2_ModTools\data_ABC\Sound\global\KAS_objective_vo_slow.stm - while munging C:\BF2_ModTools\data_ABC\Sound\global\KAS_objective_vo_slow.stm
soundflmunge.exe : Error : Unable to open file ..\worlds\mus\streams\Objective_VO\IOMUS0001.wav - while munging C:\BF2_ModTools\data_ABC\Sound\global\mus_objective_vo_slow.stm
soundflmunge.exe : Error : Unable to open file ..\worlds\mus\streams\Objective_VO\IOMUS0001.wav, format may be invalid - while munging C:\BF2_ModTools\data_ABC\Sound\global\mus_objective_vo_slow.stm
soundflmunge.exe : Error : Unable to read file list C:\BF2_ModTools\data_ABC\Sound\global\mus_objective_vo_slow.stm - while munging C:\BF2_ModTools\data_ABC\Sound\global\mus_objective_vo_slow.stm
soundflmunge.exe : Error : Unable to open file ..\worlds\myg\streams\Objective_VO\ROMYG0001.wav - while munging C:\BF2_ModTools\data_ABC\Sound\global\myg_objective_vo_slow.stm
soundflmunge.exe : Error : Unable to open file ..\worlds\myg\streams\Objective_VO\ROMYG0001.wav, format may be invalid - while munging C:\BF2_ModTools\data_ABC\Sound\global\myg_objective_vo_slow.stm
soundflmunge.exe : Error : Unable to read file list C:\BF2_ModTools\data_ABC\Sound\global\myg_objective_vo_slow.stm - while munging C:\BF2_ModTools\data_ABC\Sound\global\myg_objective_vo_slow.stm
soundflmunge.exe : Error : Unable to open file ..\worlds\nab\streams\Objective_VO\IONAB0013.wav - while munging C:\BF2_ModTools\data_ABC\Sound\global\nab_objective_vo_slow.stm
soundflmunge.exe : Error : Unable to open file ..\worlds\nab\streams\Objective_VO\IONAB0013.wav, format may be invalid - while munging C:\BF2_ModTools\data_ABC\Sound\global\nab_objective_vo_slow.stm
soundflmunge.exe : Error : Unable to read file list C:\BF2_ModTools\data_ABC\Sound\global\nab_objective_vo_slow.stm - while munging C:\BF2_ModTools\data_ABC\Sound\global\nab_objective_vo_slow.stm
soundflmunge.exe : Error : Unable to open file ..\worlds\pol\streams\Objective_VO\IOPOL0001.wav - while munging C:\BF2_ModTools\data_ABC\Sound\global\pol_objective_vo_slow.stm
soundflmunge.exe : Error : Unable to open file ..\worlds\pol\streams\Objective_VO\IOPOL0001.wav, format may be invalid - while munging C:\BF2_ModTools\data_ABC\Sound\global\pol_objective_vo_slow.stm
soundflmunge.exe : Error : Unable to read file list C:\BF2_ModTools\data_ABC\Sound\global\pol_objective_vo_slow.stm - while munging C:\BF2_ModTools\data_ABC\Sound\global\pol_objective_vo_slow.stm
soundflmunge.exe : Error : Unable to open file ..\cw\streams\PlayerCommands_vo\RI1COM628.wav - while munging C:\BF2_ModTools\data_ABC\Sound\global\rep_unit_vo_quick.stm
soundflmunge.exe : Error : Unable to open file ..\cw\streams\PlayerCommands_vo\RI1COM628.wav, format may be invalid - while munging C:\BF2_ModTools\data_ABC\Sound\global\rep_unit_vo_quick.stm
soundflmunge.exe : Error : Unable to read file list C:\BF2_ModTools\data_ABC\Sound\global\rep_unit_vo_quick.stm - while munging C:\BF2_ModTools\data_ABC\Sound\global\rep_unit_vo_quick.stm
soundflmunge.exe : Error : Unable to open file ..\worlds\GAL\streams\metagame_vo\ROCOM0066.wav - while munging C:\BF2_ModTools\data_ABC\Sound\global\rep_unit_vo_slow.stm
soundflmunge.exe : Error : Unable to open file ..\worlds\GAL\streams\metagame_vo\ROCOM0066.wav, format may be invalid - while munging C:\BF2_ModTools\data_ABC\Sound\global\rep_unit_vo_slow.stm
soundflmunge.exe : Error : Unable to read file list C:\BF2_ModTools\data_ABC\Sound\global\rep_unit_vo_slow.stm - while munging C:\BF2_ModTools\data_ABC\Sound\global\rep_unit_vo_slow.stm
soundflmunge.exe : Error : Unable to open file ..\worlds\spa\streams\Objective_VO\IOSB50028.wav - while munging C:\BF2_ModTools\data_ABC\Sound\global\spa1_objective_vo_slow.stm
soundflmunge.exe : Error : Unable to open file ..\worlds\spa\streams\Objective_VO\IOSB50028.wav, format may be invalid - while munging C:\BF2_ModTools\data_ABC\Sound\global\spa1_objective_vo_slow.stm
soundflmunge.exe : Error : Unable to read file list C:\BF2_ModTools\data_ABC\Sound\global\spa1_objective_vo_slow.stm - while munging C:\BF2_ModTools\data_ABC\Sound\global\spa1_objective_vo_slow.stm
soundflmunge.exe : Error : Unable to open file ..\worlds\tan\streams\Objective_VO\IOTAN0001.wav - while munging C:\BF2_ModTools\data_ABC\Sound\global\tan_objective_vo_slow.stm
soundflmunge.exe : Error : Unable to open file ..\worlds\tan\streams\Objective_VO\IOTAN0001.wav, format may be invalid - while munging C:\BF2_ModTools\data_ABC\Sound\global\tan_objective_vo_slow.stm
soundflmunge.exe : Error : Unable to read file list C:\BF2_ModTools\data_ABC\Sound\global\tan_objective_vo_slow.stm - while munging C:\BF2_ModTools\data_ABC\Sound\global\tan_objective_vo_slow.stm
soundflmunge.exe : Error : Unable to open file ..\worlds\uta\streams\Objective_VO\ROUTA0020.wav - while munging C:\BF2_ModTools\data_ABC\Sound\global\uta_objective_vo_slow.stm
soundflmunge.exe : Error : Unable to open file ..\worlds\uta\streams\Objective_VO\ROUTA0020.wav, format may be invalid - while munging C:\BF2_ModTools\data_ABC\Sound\global\uta_objective_vo_slow.stm
soundflmunge.exe : Error : Unable to read file list C:\BF2_ModTools\data_ABC\Sound\global\uta_objective_vo_slow.stm - while munging C:\BF2_ModTools\data_ABC\Sound\global\uta_objective_vo_slow.stm
soundflmunge.exe : Error : Unable to open file streams\wookiee_battlechatter_vo\crtr_wookiee_babyCry_01.wav - while munging C:\BF2_ModTools\data_ABC\Sound\global\wok_unit_vo_slow.stm
soundflmunge.exe : Error : Unable to open file streams\wookiee_battlechatter_vo\crtr_wookiee_babyCry_01.wav, format may be invalid - while munging C:\BF2_ModTools\data_ABC\Sound\global\wok_unit_vo_slow.stm
soundflmunge.exe : Error : Unable to read file list C:\BF2_ModTools\data_ABC\Sound\global\wok_unit_vo_slow.stm - while munging C:\BF2_ModTools\data_ABC\Sound\global\wok_unit_vo_slow.stm
soundflmunge.exe : Error : Unable to open file streams\wookiee_battlechatter_vo\crtr_wookiee_die_07.wav - while munging C:\BF2_ModTools\data_ABC\Sound\global\wok_vo_quick.stm
soundflmunge.exe : Error : Unable to open file streams\wookiee_battlechatter_vo\crtr_wookiee_die_07.wav, format may be invalid - while munging C:\BF2_ModTools\data_ABC\Sound\global\wok_vo_quick.stm
soundflmunge.exe : Error : Unable to read file list C:\BF2_ModTools\data_ABC\Sound\global\wok_vo_quick.stm - while munging C:\BF2_ModTools\data_ABC\Sound\global\wok_vo_quick.stm
soundflmunge.exe : Error : Unable to open file ..\worlds\yav\streams\Objective_VO\IOYAV0008.wav - while munging C:\BF2_ModTools\data_ABC\Sound\global\yav_objective_vo_slow.stm
soundflmunge.exe : Error : Unable to open file ..\worlds\yav\streams\Objective_VO\IOYAV0008.wav, format may be invalid - while munging C:\BF2_ModTools\data_ABC\Sound\global\yav_objective_vo_slow.stm
soundflmunge.exe : Error : Unable to read file list C:\BF2_ModTools\data_ABC\Sound\global\yav_objective_vo_slow.stm - while munging C:\BF2_ModTools\data_ABC\Sound\global\yav_objective_vo_slow.stm
soundflmunge.exe : Warning : Files line 26 and 27 reference the same source file c:\windows\media\chord.wav. whooshl3 will alias whooshl4
- while munging C:\BF2_ModTools\data_ABC\Sound\shell\shell.sfx
soundflmunge.exe : Warning : Files line 26 and 29 reference the same source file c:\windows\media\chord.wav. whooshl3 will alias whooshr3
- while munging C:\BF2_ModTools\data_ABC\Sound\shell\shell.sfx
soundflmunge.exe : Warning : Files line 26 and 30 reference the same source file c:\windows\media\chord.wav. whooshl3 will alias whooshr4
- while munging C:\BF2_ModTools\data_ABC\Sound\shell\shell.sfx
soundflmunge.exe : Error : Unable to open file streams\shell_closing.wav - while munging C:\BF2_ModTools\data_ABC\Sound\shell\shell_music.stm
soundflmunge.exe : Error : Unable to open file streams\shell_closing.wav, format may be invalid - while munging C:\BF2_ModTools\data_ABC\Sound\shell\shell_music.stm
soundflmunge.exe : Error : Unable to read file list C:\BF2_ModTools\data_ABC\Sound\shell\shell_music.stm - while munging C:\BF2_ModTools\data_ABC\Sound\shell\shell_music.stm
soundflmunge.exe : Error : Unable to open file ..\global\effects\crtr_wookiee_chatter_01.wav - while munging C:\BF2_ModTools\data_ABC\Sound\shell\shell_vo.stm
soundflmunge.exe : Error : Unable to open file ..\global\effects\crtr_wookiee_chatter_01.wav, format may be invalid - while munging C:\BF2_ModTools\data_ABC\Sound\shell\shell_vo.stm
soundflmunge.exe : Error : Unable to read file list C:\BF2_ModTools\data_ABC\Sound\shell\shell_vo.stm - while munging C:\BF2_ModTools\data_ABC\Sound\shell\shell_vo.stm
soundflmunge.exe : Error : Unable to open file streams\ui_amb_cis_CtrlShip_lp_fnt.wav - while munging C:\BF2_ModTools\data_ABC\Sound\shell\shell_ui.st4
soundflmunge.exe : Error : Unable to open file streams\ui_amb_cis_CtrlShip_lp_fnt.wav, format may be invalid - while munging C:\BF2_ModTools\data_ABC\Sound\shell\shell_ui.st4
soundflmunge.exe : Error : Unable to read file list C:\BF2_ModTools\data_ABC\Sound\shell\shell_ui.st4 - while munging C:\BF2_ModTools\data_ABC\Sound\shell\shell_ui.st4
soundflmunge.exe : Error : Unable to open file list C:\BF2_ModTools\data_ABC\Sound\worlds\ABC\Copia - while munging C:\BF2_ModTools\data_ABC\Sound\worlds\ABC\Copia
soundflmunge.exe : Error : Unable to read file list C:\BF2_ModTools\data_ABC\Sound\worlds\ABC\Copia - while munging C:\BF2_ModTools\data_ABC\Sound\worlds\ABC\Copia
soundflmunge.exe : Error : Unable to open file list de - while munging de
soundflmunge.exe : Error : Unable to read file list de - while munging de
Unable to munge C:\BF2_ModTools\data_ABC\sound\worlds\SOU as it doesn't exist
Unable to munge C:\BF2_ModTools\data_ABC\sound\worlds\cor as it doesn't exist
Unable to munge C:\BF2_ModTools\data_ABC\sound\worlds\dag as it doesn't exist
Unable to munge C:\BF2_ModTools\data_ABC\sound\worlds\dea as it doesn't exist
Unable to munge C:\BF2_ModTools\data_ABC\sound\worlds\end as it doesn't exist
Unable to munge C:\BF2_ModTools\data_ABC\sound\worlds\fel as it doesn't exist
Unable to munge C:\BF2_ModTools\data_ABC\sound\worlds\gal as it doesn't exist
Unable to munge C:\BF2_ModTools\data_ABC\sound\worlds\geo as it doesn't exist
Unable to munge C:\BF2_ModTools\data_ABC\sound\worlds\hot as it doesn't exist
Unable to munge C:\BF2_ModTools\data_ABC\sound\worlds\kam as it doesn't exist
Unable to munge C:\BF2_ModTools\data_ABC\sound\worlds\kas as it doesn't exist
Unable to munge C:\BF2_ModTools\data_ABC\sound\worlds\mus as it doesn't exist
Unable to munge C:\BF2_ModTools\data_ABC\sound\worlds\myg as it doesn't exist
Unable to munge C:\BF2_ModTools\data_ABC\sound\worlds\nab as it doesn't exist
Unable to munge C:\BF2_ModTools\data_ABC\sound\worlds\pol as it doesn't exist
Unable to munge C:\BF2_ModTools\data_ABC\sound\worlds\spa as it doesn't exist
Unable to munge C:\BF2_ModTools\data_ABC\sound\worlds\tan as it doesn't exist
Unable to munge C:\BF2_ModTools\data_ABC\sound\worlds\tat as it doesn't exist
Unable to munge C:\BF2_ModTools\data_ABC\sound\worlds\uta as it doesn't exist
Unable to munge C:\BF2_ModTools\data_ABC\sound\worlds\yav as it doesn't exist
soundflmunge.exe : Warning : No files in file list 111cw - while munging C:\BF2_ModTools\data_ABC\Sound\worlds\111\111cw.sfx
soundflmunge.exe : Warning : No files in file list 111gcw - while munging C:\BF2_ModTools\data_ABC\Sound\worlds\111\111gcw.sfx
soundflmunge.exe : Error : Unable to open file effects\firedc15_1.wav - while munging C:\BF2_ModTools\data_ABC\Sound\worlds\111\111.asfx
soundflmunge.exe : Error : Unable to open file effects\firedc15_1.wav, format may be invalid - while munging C:\BF2_ModTools\data_ABC\Sound\worlds\111\111.asfx
soundflmunge.exe : Error : Unable to read file list C:\BF2_ModTools\data_ABC\Sound\worlds\111\111.asfx - while munging C:\BF2_ModTools\data_ABC\Sound\worlds\111\111.asfx
soundflmunge.exe : Error : Unable to open file C:\BF2_ModTools\data_ABC\Sound\shell\effects\whooshl3.wav - while munging C:\BF2_ModTools\data_ABC\Sound\shell\shell.sfx
soundflmunge.exe : Error : Unable to open file C:\BF2_ModTools\data_ABC\Sound\shell\effects\whooshl3.wav, format may be invalid - while munging C:\BF2_ModTools\data_ABC\Sound\shell\shell.sfx
soundflmunge.exe : Error : Unable to read file list C:\BF2_ModTools\data_ABC\Sound\shell\shell.sfx - while munging C:\BF2_ModTools\data_ABC\Sound\shell\shell.sfx
Post Reply