If there isn't a way, maybe someone can see an issue in my lua that could cause a crash:
Hidden/Spoiler:
[code]--
-- LUA Angruya Droid Invasion
--
-- Gametyp Scripts
ScriptCB_DoFile("ObjectiveConquest")
ScriptCB_DoFile("setup_teams")
ScriptCB_DoFile("AIHeroSupport")
-- REP Angreifer (1 = Angreifer)
REP = 1;
CIS = 2;
-- Nicht aendern
ATT = REP;
DEF = CIS;
function ScriptPostLoad()
--CP's
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"}
--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}
--CP Ziele
conquest:AddCommandPost(cp1)
conquest:AddCommandPost(cp2)
conquest:AddCommandPost(cp3)
conquest:AddCommandPost(cp4)
conquest:Start()
herosupport = AIHeroSupport:New{AIATTHeroHealth = 2800, AIDEFHeroHealth = 2800, gameMode = "NonConquest",}
herosupport:SetHeroClass(REP, "rep_inf_clone_commando")
herosupport:SetHeroClass(CIS, "cis_inf_ubd")
herosupport:AddSpawnCP("cp1","cp1_spawn")
herosupport:AddSpawnCP("cp2","cp2_spawn")
herosupport:AddSpawnCP("cp3","cp3_spawn")
herosupport:AddSpawnCP("cp4","cp4_spawn")
herosupport:Start()
EnableSPHeroRules()
end
function ScriptPreInit()
SetWorldExtents(1500)
end
-------------------------
function ScriptInit()
ReadDataFile("dc:load\\common.lvl")
ReadDataFile("ingame.lvl")
SetMaxFlyHeight(2000)
SetMaxPlayerFlyHeight(2000)
SetGroundFlyerMap(1);
SetMemoryPoolSize ("ClothData",20)
SetMemoryPoolSize ("Combo",50) -- should be ~ 2x number of jedi classes
SetMemoryPoolSize ("Combo::State",650) -- should be ~12x #Combo
SetMemoryPoolSize ("Combo::Transition",660) -- should be a bit bigger than #Combo::State
SetMemoryPoolSize ("Combo::Condition",660) -- should be a bit bigger than #Combo::State
SetMemoryPoolSize ("Combo::Attack",500) -- should be ~8-12x #Combo
SetMemoryPoolSize ("Combo::DamageSample",5500) -- should be ~8-12x #Combo::Attack
SetMemoryPoolSize ("Combo::Deflect",100) -- should be ~1x #combo
ReadDataFile("dc:sound\\ang.lvl;ANGcw")
ReadDataFile("dc:SIDE\\rep.lvl",
"rep_fly_arc170fighter_auto",
"rep_fly_gunship_auto",
"rep_fly_vwing_auto",
"rep_inf_ep3_rifleman",
"rep_inf_ep3_rocketeer",
"rep_inf_ep3_engineer",
"rep_inf_ep3_officer",
"rep_inf_ep3_sniper",
"rep_inf_ep3_specop",
"rep_inf_clone_assassin",
"rep_walk_atte",
"rep_walk_atxt")
ReadDataFile("dc:SIDE\\cis.lvl",
"cis_fly_droidfighter_auto",
"cis_fly_droidgunship_auto",
"cis_fly_scarab_auto",
"cis_inf_rifleman",
"cis_inf_rocketeer",
"cis_inf_droideka",
"cis_inf_engineer",
"cis_inf_sniper",
"cis_inf_grievousguard_con",
"cis_inf_kampfdroide",
"cis_inf_ubd",
"cis_hero_grievous_con",
"cis_walk_spider",
"cis_walk_dwarfspider")
ReadDataFile("dc:SIDE\\maj.lvl",
"rep_inf_clone_commando")
SetupTeams{
rep = {
team = REP,
units = 32,
reinforcements = 150,
soldier = { "rep_inf_ep3_rifleman",9, 25},
assault = { "rep_inf_ep3_rocketeer",1, 4},
engineer = { "rep_inf_ep3_engineer",1, 4},
sniper = { "rep_inf_ep3_sniper",1, 4},
specop = { "rep_inf_ep3_specop",1, 4},
officer = {"rep_inf_ep3_officer",1, 3},
special = { "rep_inf_clone_assassin",1, 2},
},
cis = {
team = CIS,
units = 32,
reinforcements = 150,
soldier = { "cis_inf_kampfdroide",9, 25},
assault = { "cis_inf_rocketeer",1, 4},
engineer = { "cis_inf_engineer",1, 4},
sniper = { "cis_inf_sniper",1, 4},
specop = {"cis_inf_rifleman",1, 4},
officer = {"cis_inf_droideka",1, 3},
special = { "cis_inf_grievousguard_con",1, 2},
}
}
--SetHeroClass(CIS, "cis_inf_ubd")
--SetHeroClass(REP, "rep_inf_clone_commando")
-- Level Stats
-- ClearWalkers()
AddWalkerType(0, 4) -- special -> droidekas
AddWalkerType(1, 0) -- 1x2 (1 pair of legs)
AddWalkerType(2, 0) -- 2x2 (2 pairs of legs)
AddWalkerType(4, 2) -- 3x2 (3 pairs of legs)
AddWalkerType(0, 3) -- 8 droidekas (special case: 0 leg pairs)
AddWalkerType(2, 3) -- 2 spider walkers with 2 leg pairs each
local weaponCnt = 1024
SetMemoryPoolSize("Aimer", 120)
SetMemoryPoolSize("AmmoCounter", weaponCnt)
SetMemoryPoolSize("SoldierAnimation", 550)
SetMemoryPoolSize("BaseHint", 1024)
SetMemoryPoolSize("EnergyBar", weaponCnt)
SetMemoryPoolSize("EntityCloth", 40)
SetMemoryPoolSize("EntityFlyer", 10)
SetMemoryPoolSize("EntityWalker", 25)
SetMemoryPoolSize("CommandFlyer", 1)
SetMemoryPoolSize("CommandWalker", 3)
SetMemoryPoolSize("EntityHover", 0)
SetMemoryPoolSize("EntityLight", 100)
SetMemoryPoolSize("EntitySoundStream", 4)
SetMemoryPoolSize("EntitySoundStatic", 32)
SetMemoryPoolSize("MountedTurret", 16)
SetMemoryPoolSize("Navigator", 128)
SetMemoryPoolSize("Obstacle", 1024)
SetMemoryPoolSize("PathNode", 100)
SetMemoryPoolSize("SoundSpaceRegion", 0)
SetMemoryPoolSize("TreeGridStack", 1024)
SetMemoryPoolSize("UnitAgent", 128)
SetMemoryPoolSize("UnitController", 128)
SetMemoryPoolSize("WalkerBlend", 50)
SetMemoryPoolSize("WalkerBlendUnit", 120)
SetMemoryPoolSize("WalkerLegPair", 30)
SetMemoryPoolSize("Weapon", weaponCnt)
SetSpawnDelay(10.0, 0.25)
--ReadDataFile("dc:ANG\\ASK.lvl", "ASK_conquest")
ReadDataFile("dc:ANG\\ASK.lvl", "ASK_conquest")
SetDenseEnvironment("false")
-- Sound
SetSoundEffect("ScopeDisplayZoomIn", "binocularzoomin")
SetSoundEffect("ScopeDisplayZoomOut", "binocularzoomout")
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("sound\\global.lvl", "global_vo_quick")
-- OpenAudioStream("sound\\global.lvl", "global_vo_slow")
OpenAudioStream("dc:sound\\ang.lvl", "ANGcw")
OpenAudioStream("sound\\ang.lvl", "ANGcw")
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(1, "repleaving")
SetOutOfBoundsVoiceOver(2, "cisleaving")
SetAmbientMusic(REP, 1.0, "rep_GEO_amb_start", 0,1)
SetAmbientMusic(REP, 0.8, "rep_GEO_amb_middle", 1,1)
SetAmbientMusic(REP, 0.2, "rep_GEO_amb_end", 2,1)
SetAmbientMusic(CIS, 1.0, "cis_GEO_amb_start", 0,1)
SetAmbientMusic(CIS, 0.8, "cis_GEO_amb_middle", 1,1)
SetAmbientMusic(CIS, 0.2, "cis_GEO_amb_end", 2,1)
SetVictoryMusic(REP, "rep_geo_amb_victory")
SetDefeatMusic (REP, "rep_geo_amb_defeat")
SetVictoryMusic(CIS, "cis_geo_amb_victory")
SetDefeatMusic (CIS, "cis_geo_amb_defeat")
SetSoundEffect("ScopeDisplayZoomIn", "binocularzoomin")
SetSoundEffect("ScopeDisplayZoomOut", "binocularzoomout")
--SetSoundEffect("BirdScatter", "birdsFlySeq1")
--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")
--OpeningSateliteShot
--CIS Lander animation
AddCameraShot(0.820732, 0.038776, 0.569360, -0.026900, -197.899017, 17.846483, 107.798492);
end
[/code]
-- LUA Angruya Droid Invasion
--
-- Gametyp Scripts
ScriptCB_DoFile("ObjectiveConquest")
ScriptCB_DoFile("setup_teams")
ScriptCB_DoFile("AIHeroSupport")
-- REP Angreifer (1 = Angreifer)
REP = 1;
CIS = 2;
-- Nicht aendern
ATT = REP;
DEF = CIS;
function ScriptPostLoad()
--CP's
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"}
--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}
--CP Ziele
conquest:AddCommandPost(cp1)
conquest:AddCommandPost(cp2)
conquest:AddCommandPost(cp3)
conquest:AddCommandPost(cp4)
conquest:Start()
herosupport = AIHeroSupport:New{AIATTHeroHealth = 2800, AIDEFHeroHealth = 2800, gameMode = "NonConquest",}
herosupport:SetHeroClass(REP, "rep_inf_clone_commando")
herosupport:SetHeroClass(CIS, "cis_inf_ubd")
herosupport:AddSpawnCP("cp1","cp1_spawn")
herosupport:AddSpawnCP("cp2","cp2_spawn")
herosupport:AddSpawnCP("cp3","cp3_spawn")
herosupport:AddSpawnCP("cp4","cp4_spawn")
herosupport:Start()
EnableSPHeroRules()
end
function ScriptPreInit()
SetWorldExtents(1500)
end
-------------------------
function ScriptInit()
ReadDataFile("dc:load\\common.lvl")
ReadDataFile("ingame.lvl")
SetMaxFlyHeight(2000)
SetMaxPlayerFlyHeight(2000)
SetGroundFlyerMap(1);
SetMemoryPoolSize ("ClothData",20)
SetMemoryPoolSize ("Combo",50) -- should be ~ 2x number of jedi classes
SetMemoryPoolSize ("Combo::State",650) -- should be ~12x #Combo
SetMemoryPoolSize ("Combo::Transition",660) -- should be a bit bigger than #Combo::State
SetMemoryPoolSize ("Combo::Condition",660) -- should be a bit bigger than #Combo::State
SetMemoryPoolSize ("Combo::Attack",500) -- should be ~8-12x #Combo
SetMemoryPoolSize ("Combo::DamageSample",5500) -- should be ~8-12x #Combo::Attack
SetMemoryPoolSize ("Combo::Deflect",100) -- should be ~1x #combo
ReadDataFile("dc:sound\\ang.lvl;ANGcw")
ReadDataFile("dc:SIDE\\rep.lvl",
"rep_fly_arc170fighter_auto",
"rep_fly_gunship_auto",
"rep_fly_vwing_auto",
"rep_inf_ep3_rifleman",
"rep_inf_ep3_rocketeer",
"rep_inf_ep3_engineer",
"rep_inf_ep3_officer",
"rep_inf_ep3_sniper",
"rep_inf_ep3_specop",
"rep_inf_clone_assassin",
"rep_walk_atte",
"rep_walk_atxt")
ReadDataFile("dc:SIDE\\cis.lvl",
"cis_fly_droidfighter_auto",
"cis_fly_droidgunship_auto",
"cis_fly_scarab_auto",
"cis_inf_rifleman",
"cis_inf_rocketeer",
"cis_inf_droideka",
"cis_inf_engineer",
"cis_inf_sniper",
"cis_inf_grievousguard_con",
"cis_inf_kampfdroide",
"cis_inf_ubd",
"cis_hero_grievous_con",
"cis_walk_spider",
"cis_walk_dwarfspider")
ReadDataFile("dc:SIDE\\maj.lvl",
"rep_inf_clone_commando")
SetupTeams{
rep = {
team = REP,
units = 32,
reinforcements = 150,
soldier = { "rep_inf_ep3_rifleman",9, 25},
assault = { "rep_inf_ep3_rocketeer",1, 4},
engineer = { "rep_inf_ep3_engineer",1, 4},
sniper = { "rep_inf_ep3_sniper",1, 4},
specop = { "rep_inf_ep3_specop",1, 4},
officer = {"rep_inf_ep3_officer",1, 3},
special = { "rep_inf_clone_assassin",1, 2},
},
cis = {
team = CIS,
units = 32,
reinforcements = 150,
soldier = { "cis_inf_kampfdroide",9, 25},
assault = { "cis_inf_rocketeer",1, 4},
engineer = { "cis_inf_engineer",1, 4},
sniper = { "cis_inf_sniper",1, 4},
specop = {"cis_inf_rifleman",1, 4},
officer = {"cis_inf_droideka",1, 3},
special = { "cis_inf_grievousguard_con",1, 2},
}
}
--SetHeroClass(CIS, "cis_inf_ubd")
--SetHeroClass(REP, "rep_inf_clone_commando")
-- Level Stats
-- ClearWalkers()
AddWalkerType(0, 4) -- special -> droidekas
AddWalkerType(1, 0) -- 1x2 (1 pair of legs)
AddWalkerType(2, 0) -- 2x2 (2 pairs of legs)
AddWalkerType(4, 2) -- 3x2 (3 pairs of legs)
AddWalkerType(0, 3) -- 8 droidekas (special case: 0 leg pairs)
AddWalkerType(2, 3) -- 2 spider walkers with 2 leg pairs each
local weaponCnt = 1024
SetMemoryPoolSize("Aimer", 120)
SetMemoryPoolSize("AmmoCounter", weaponCnt)
SetMemoryPoolSize("SoldierAnimation", 550)
SetMemoryPoolSize("BaseHint", 1024)
SetMemoryPoolSize("EnergyBar", weaponCnt)
SetMemoryPoolSize("EntityCloth", 40)
SetMemoryPoolSize("EntityFlyer", 10)
SetMemoryPoolSize("EntityWalker", 25)
SetMemoryPoolSize("CommandFlyer", 1)
SetMemoryPoolSize("CommandWalker", 3)
SetMemoryPoolSize("EntityHover", 0)
SetMemoryPoolSize("EntityLight", 100)
SetMemoryPoolSize("EntitySoundStream", 4)
SetMemoryPoolSize("EntitySoundStatic", 32)
SetMemoryPoolSize("MountedTurret", 16)
SetMemoryPoolSize("Navigator", 128)
SetMemoryPoolSize("Obstacle", 1024)
SetMemoryPoolSize("PathNode", 100)
SetMemoryPoolSize("SoundSpaceRegion", 0)
SetMemoryPoolSize("TreeGridStack", 1024)
SetMemoryPoolSize("UnitAgent", 128)
SetMemoryPoolSize("UnitController", 128)
SetMemoryPoolSize("WalkerBlend", 50)
SetMemoryPoolSize("WalkerBlendUnit", 120)
SetMemoryPoolSize("WalkerLegPair", 30)
SetMemoryPoolSize("Weapon", weaponCnt)
SetSpawnDelay(10.0, 0.25)
--ReadDataFile("dc:ANG\\ASK.lvl", "ASK_conquest")
ReadDataFile("dc:ANG\\ASK.lvl", "ASK_conquest")
SetDenseEnvironment("false")
-- Sound
SetSoundEffect("ScopeDisplayZoomIn", "binocularzoomin")
SetSoundEffect("ScopeDisplayZoomOut", "binocularzoomout")
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("sound\\global.lvl", "global_vo_quick")
-- OpenAudioStream("sound\\global.lvl", "global_vo_slow")
OpenAudioStream("dc:sound\\ang.lvl", "ANGcw")
OpenAudioStream("sound\\ang.lvl", "ANGcw")
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(1, "repleaving")
SetOutOfBoundsVoiceOver(2, "cisleaving")
SetAmbientMusic(REP, 1.0, "rep_GEO_amb_start", 0,1)
SetAmbientMusic(REP, 0.8, "rep_GEO_amb_middle", 1,1)
SetAmbientMusic(REP, 0.2, "rep_GEO_amb_end", 2,1)
SetAmbientMusic(CIS, 1.0, "cis_GEO_amb_start", 0,1)
SetAmbientMusic(CIS, 0.8, "cis_GEO_amb_middle", 1,1)
SetAmbientMusic(CIS, 0.2, "cis_GEO_amb_end", 2,1)
SetVictoryMusic(REP, "rep_geo_amb_victory")
SetDefeatMusic (REP, "rep_geo_amb_defeat")
SetVictoryMusic(CIS, "cis_geo_amb_victory")
SetDefeatMusic (CIS, "cis_geo_amb_defeat")
SetSoundEffect("ScopeDisplayZoomIn", "binocularzoomin")
SetSoundEffect("ScopeDisplayZoomOut", "binocularzoomout")
--SetSoundEffect("BirdScatter", "birdsFlySeq1")
--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")
--OpeningSateliteShot
--CIS Lander animation
AddCameraShot(0.820732, 0.038776, 0.569360, -0.026900, -197.899017, 17.846483, 107.798492);
end
[/code]




