Random AI hero crashes [Solved]

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

Post Reply
User avatar
skelltor
Sith
Sith
Posts: 1431
Joined: Fri Dec 11, 2009 6:24 pm
Projects :: BFSM
Games I'm Playing :: SWBFII
xbox live or psn: skelltor95
Location: minisnowta
Contact:

Random AI hero crashes [Solved]

Post by skelltor »

Ok so I followed the tut here forums/viewtopic.php?f=27&t=19003&hilit ... +ai+heroes

But I get this munge error which I have no idea what it means

Code: Select all

C:\BF2_ModTools\data_MAP\_BUILD\..\..\ToolsFL\Bin\luac.exe: ..\..\common\scripts\MAP\BCCr_con.lua:104: <eof> expected near `end'
ERROR[scriptmunge scripts\MAP\BCCr_con.lua]:Could not read input file.ERROR[scriptmunge scripts\MAP\BCCr_con.lua]:Could not read input file. [continuing]
   2 Errors    0 Warnings
Here is my lua
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")


ATT = 1
DEF = 2
--this never changes, ever, no really, i mean it, lol.

if not ScriptCB_InMultiplayer() then
CIS = math.random(1,2)
REP = (3 - CIS)
else
REP = 1
CIS = 2
end



function ScriptPostLoad()
herocisand = math.random(1, 4)


if herocisand == 1 then
heroCis = "cis_hero_countdooku"

elseif herocisand == 2 then
heroCis = "cis_hero_durge"

elseif herocisand == 3 then
heroCis = "cis_hero_grievous"

elseif herocisand == 4 then
heroCis = "cis_hero_ventress"

end


herorepand = math.random(1, 4)


if herorepand == 1 then
heroRep = "rep_hero_kolar"

elseif herorepand == 2 then
heroRep = "rep_hero_shaakti"

elseif herorepand == 3 then
heroRep = "rep_hero_aalya"

elseif herorepand == 4 then
heroRep = "rep_hero_kitfisto"

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()
if not ScriptCB_InMultiplayer() then
herosupport = AIHeroSupport:New{AIATTHeroHealth = 5000, AIDEFHeroHealth = 5000, gameMode = "conquest",minSpawnTime = 20,}
herosupport:SetHeroClass(CIS, "heroCis")
herosupport:SetHeroClass(REP, "heroRep")
herosupport:AddSpawnCP("cp1","CP1Spawn")
herosupport:AddSpawnCP("cp2","CP3Spawn")
herosupport:AddSpawnCP("cp3","CP4Spawn")
herosupport:AddSpawnCP("cp4","CP5Spawn")
herosupport:AddSpawnCP("cp5","CP7Spawn")
herosupport:AddSpawnCP("cp7","CP2Spawn")

herosupport:Start()
else
end
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()

ReadDataFile("..\\..\\addon\\BCC\\data\\_LVL_PC\\load\\common.lvl")

ReadDataFile("ingame.lvl")

if ScriptCB_InMultiplayer() then
heroCis = "cis_hero_countdooku"
heroRep = "rep_hero_aalya"
end




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("dc:sound\\ske.lvl;skecw")
ReadDataFile("..\\..\\addon\\BCC\\data\\_LVL_PC\\sound\\BCC.lvl;BCCcw")
ReadDataFile("sound\\dea.lvl;dea1cw")
ReadDataFile("sound\\hot.lvl;hot1gcw")

ReadDataFile("SIDE\\BFSM\\aut.lvl",
"com_weap_inf_health_det",
"com_bldg_inf_psg")

ReadDataFile("SIDE\\BFSM\\rep.lvl",
"rep_inf_212th_rifleman",
"rep_inf_212th_rocketeer",
"rep_inf_212th_engineer",
"rep_inf_212th_sniper",
"rep_inf_shadow",
"rep_hero_kolar",
"rep_hero_shaakti",
"rep_hero_kitfisto",
"rep_inf_212th_capt",
"rep_inf_ep3_Commander_cody",
"rep_inf_212th_paratrooper",
"rep_inf_212th_jettrooper",
"rep_hero_aalya",
"rep_fly_assault_dome")

ReadDataFile("SIDE\\BFSM\\cis.lvl",
"cis_inf_battledroid",
"cis_inf_assaultdroid",
"cis_inf_flamedroid",
"cis_inf_sniper",
"cis_hero_grievous",
"cis_hero_ventress",
"cis_hero_durge",
"cis_inf_neimoidian_officer",
"cis_inf_droideka",
"cis_inf_mando",
"cis_inf_sep_commando",
"cis_inf_commander",
"cis_hero_countdooku")


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

SetupTeams{
rep = {
team = REP,
units = 32,
reinforcements = 300,
soldier = { "rep_inf_212th_rifleman",20, 40},
assault = { "rep_inf_212th_rocketeer",2,5},
engineer = { "rep_inf_212th_engineer",2,5},
sniper = { "rep_inf_212th_sniper",2,5},
officer = {"rep_inf_212th_paratrooper",1,4},
special = { "rep_inf_shadow",1,4},

},
cis = {
team = CIS,
units = 32,
reinforcements = 300,
soldier = { "cis_inf_battledroid",20, 40},
assault = { "cis_inf_assaultdroid",2,5},
engineer = { "cis_inf_flamedroid",2,5},
sniper = { "cis_inf_sniper",2,5},
officer = {"cis_inf_neimoidian_officer",1,4},
special = { "cis_inf_droideka",1.4},
}
}

AddUnitClass(REP, "rep_inf_212th_jettrooper",1,3)
AddUnitClass(REP, "rep_inf_212th_capt",1,2)
AddUnitClass(REP, "rep_inf_ep3_Commander_cody",0,1)
AddUnitClass(CIS, "cis_inf_mando",1,3)
AddUnitClass(CIS, "cis_inf_sep_commando",1,2)
AddUnitClass(CIS, "cis_inf_commander",0,1)

if ScriptCB_InMultiplayer() then
SetHeroClass(CIS, heroCis)
SetHeroClass(REP, heroRep)
else
end

-- 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(3, 0) -- 3x2 (3 pairs of legs)
local weaponCnt = 1024
SetMemoryPoolSize("Aimer", 75)
SetMemoryPoolSize("AmmoCounter", weaponCnt)
SetMemoryPoolSize("BaseHint", 1024)
SetMemoryPoolSize ("CommandFlyer",5)
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", 1024)
SetMemoryPoolSize("SoundSpaceRegion", 64)
SetMemoryPoolSize("TreeGridStack", 1024)
SetMemoryPoolSize("UnitAgent", 128)
SetMemoryPoolSize("UnitController", 128)
SetMemoryPoolSize("Weapon", weaponCnt)

SetSpawnDelay(10.0, 0.25)
--ReadDataFile("dc:BCC\\BCC.lvl", "BCC_conquest")
ReadDataFile("..\\..\\addon\\BCC\\data\\_LVL_PC\\BCC\\bes2.lvl", "bespin2_conquest")
SetDenseEnvironment("true")

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


-- 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("sound\\dea.lvl", "dea1")
OpenAudioStream("sound\\dea.lvl", "dea1")
OpenAudioStream("sound\\hot.lvl", "hot1gcw")
OpenAudioStream("sound\\hot.lvl", "hot1gcw")

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, "cisleaving")
SetOutOfBoundsVoiceOver(1, "repleaving")

SetAmbientMusic(REP, 1.0, "rep_dea_amb_start", 0,1)
SetAmbientMusic(REP, 0.8, "rep_dea_amb_middle", 1,1)
SetAmbientMusic(REP, 0.2,"rep_dea_amb_end", 2,1)
SetAmbientMusic(CIS, 1.0, "cis_dea_amb_start", 0,1)
SetAmbientMusic(CIS, 0.8, "cis_dea_amb_middle", 1,1)
SetAmbientMusic(CIS, 0.2,"cis_dea_amb_end", 2,1)

SetVictoryMusic(REP, "rep_dea_amb_victory")
SetDefeatMusic (REP, "rep_dea_amb_defeat")
SetVictoryMusic(CIS, "cis_dea_amb_victory")
SetDefeatMusic (CIS, "cis_dea_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")


-- Camera Stats
-- Giz Shot
AddCameraShot(0.879348, -0.142046, 0.448684, 0.072478, -38.413761, 30.986401, 195.879623);
AddCameraShot(0.755143, 0.032624, 0.654137, -0.028260, -80.924103, -32.534859, 59.805065);
AddCameraShot(0.596514, -0.068856, -0.794372, -0.091695, -139.203629, -28.934868, 56.316780);
AddCameraShot(0.073602, -0.011602, -0.985060, -0.155272, -118.288239, -28.934868, 125.938355);
AddCameraShot(0.902687, 0.001274, 0.430295, -0.000607, -90.957382, -47.834820, 180.831787);
AddCameraShot(-0.418815, -0.024036, -0.906262, 0.052011, -162.066483, -47.234821, 80.504837);
AddCameraShot(0.988357, 0.062970, 0.138228, -0.008807, -173.774002, -55.334801, 142.567810);
AddCameraShot(-0.100554, 0.008160, -0.991639, -0.080476, -246.954437, -31.334862, 153.438812);
AddCameraShot(0.717164, -0.018075, 0.696449, 0.017553, -216.827194, -31.334862, 186.863648);
AddCameraShot(0.844850, -0.049702, 0.531770, 0.031284, -247.181458, -45.734825, 29.732487);
AddCameraShot(0.454881, 0.028302, -0.888384, 0.055273, -291.636658, -48.734818, 21.009203);
AddCameraShot(0.818322, -0.026150, -0.573874, -0.018339, -193.434647, -58.634792, -12.443044);
AddCameraShot(0.471109, 0.004691, -0.882018, 0.008783, -192.251679, -61.334786, -32.647247);

end
I get a fatel error when I try to play it. Please help :)
Last edited by skelltor on Sat Apr 09, 2011 5:55 pm, edited 1 time in total.
AQT
Gametoast Staff
Gametoast Staff
Posts: 4910
Joined: Sat Nov 03, 2007 4:55 pm
Location: SoCal, USA

Re: Random AI hero crashes

Post by AQT »

It says you have an error near line 104. You have an extra and unnecessary end rounding off function ScriptPostLoad(). Just remove line 104.
User avatar
skelltor
Sith
Sith
Posts: 1431
Joined: Fri Dec 11, 2009 6:24 pm
Projects :: BFSM
Games I'm Playing :: SWBFII
xbox live or psn: skelltor95
Location: minisnowta
Contact:

Re: Random AI hero crashes

Post by skelltor »

this one?
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")


ATT = 1
DEF = 2
--this never changes, ever, no really, i mean it, lol.

if not ScriptCB_InMultiplayer() then
CIS = math.random(1,2)
REP = (3 - CIS)
else
REP = 1
CIS = 2
end



function ScriptPostLoad()
herocisand = math.random(1, 4)


if herocisand == 1 then
heroCis = "cis_hero_countdooku"

elseif herocisand == 2 then
heroCis = "cis_hero_durge"

elseif herocisand == 3 then
heroCis = "cis_hero_grievous"

elseif herocisand == 4 then
heroCis = "cis_hero_ventress"

end


herorepand = math.random(1, 4)


if herorepand == 1 then
heroRep = "rep_hero_kolar"

elseif herorepand == 2 then
heroRep = "rep_hero_shaakti"

elseif herorepand == 3 then
heroRep = "rep_hero_aalya"

elseif herorepand == 4 then
heroRep = "rep_hero_kitfisto"

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()
if not ScriptCB_InMultiplayer() then
herosupport = AIHeroSupport:New{AIATTHeroHealth = 5000, AIDEFHeroHealth = 5000, gameMode = "conquest",minSpawnTime = 20,}
herosupport:SetHeroClass(CIS, "heroCis")
herosupport:SetHeroClass(REP, "heroRep")
herosupport:AddSpawnCP("cp1","CP1Spawn")
herosupport:AddSpawnCP("cp2","CP3Spawn")
herosupport:AddSpawnCP("cp3","CP4Spawn")
herosupport:AddSpawnCP("cp4","CP5Spawn")
herosupport:AddSpawnCP("cp5","CP7Spawn")
herosupport:AddSpawnCP("cp7","CP2Spawn")

herosupport:Start()
else
end
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()

ReadDataFile("..\\..\\addon\\BCC\\data\\_LVL_PC\\load\\common.lvl")

ReadDataFile("ingame.lvl")

if ScriptCB_InMultiplayer() then
heroCis = "cis_hero_countdooku"
heroRep = "rep_hero_aalya"
end




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("dc:sound\\ske.lvl;skecw")
ReadDataFile("..\\..\\addon\\BCC\\data\\_LVL_PC\\sound\\BCC.lvl;BCCcw")
ReadDataFile("sound\\dea.lvl;dea1cw")
ReadDataFile("sound\\hot.lvl;hot1gcw")

ReadDataFile("SIDE\\BFSM\\aut.lvl",
"com_weap_inf_health_det",
"com_bldg_inf_psg")

ReadDataFile("SIDE\\BFSM\\rep.lvl",
"rep_inf_212th_rifleman",
"rep_inf_212th_rocketeer",
"rep_inf_212th_engineer",
"rep_inf_212th_sniper",
"rep_inf_shadow",
"rep_hero_kolar",
"rep_hero_shaakti",
"rep_hero_kitfisto",
"rep_inf_212th_capt",
"rep_inf_ep3_Commander_cody",
"rep_inf_212th_paratrooper",
"rep_inf_212th_jettrooper",
"rep_hero_aalya",
"rep_fly_assault_dome")

ReadDataFile("SIDE\\BFSM\\cis.lvl",
"cis_inf_battledroid",
"cis_inf_assaultdroid",
"cis_inf_flamedroid",
"cis_inf_sniper",
"cis_hero_grievous",
"cis_hero_ventress",
"cis_hero_durge",
"cis_inf_neimoidian_officer",
"cis_inf_droideka",
"cis_inf_mando",
"cis_inf_sep_commando",
"cis_inf_commander",
"cis_hero_countdooku")


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

SetupTeams{
rep = {
team = REP,
units = 32,
reinforcements = 300,
soldier = { "rep_inf_212th_rifleman",20, 40},
assault = { "rep_inf_212th_rocketeer",2,5},
engineer = { "rep_inf_212th_engineer",2,5},
sniper = { "rep_inf_212th_sniper",2,5},
officer = {"rep_inf_212th_paratrooper",1,4},
special = { "rep_inf_shadow",1,4},

},
cis = {
team = CIS,
units = 32,
reinforcements = 300,
soldier = { "cis_inf_battledroid",20, 40},
assault = { "cis_inf_assaultdroid",2,5},
engineer = { "cis_inf_flamedroid",2,5},
sniper = { "cis_inf_sniper",2,5},
officer = {"cis_inf_neimoidian_officer",1,4},
special = { "cis_inf_droideka",1.4},
}
}

AddUnitClass(REP, "rep_inf_212th_jettrooper",1,3)
AddUnitClass(REP, "rep_inf_212th_capt",1,2)
AddUnitClass(REP, "rep_inf_ep3_Commander_cody",0,1)
AddUnitClass(CIS, "cis_inf_mando",1,3)
AddUnitClass(CIS, "cis_inf_sep_commando",1,2)
AddUnitClass(CIS, "cis_inf_commander",0,1)

if ScriptCB_InMultiplayer() then
SetHeroClass(CIS, heroCis)
SetHeroClass(REP, heroRep)
else
end

-- 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(3, 0) -- 3x2 (3 pairs of legs)
local weaponCnt = 1024
SetMemoryPoolSize("Aimer", 75)
SetMemoryPoolSize("AmmoCounter", weaponCnt)
SetMemoryPoolSize("BaseHint", 1024)
SetMemoryPoolSize ("CommandFlyer",5)
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", 1024)
SetMemoryPoolSize("SoundSpaceRegion", 64)
SetMemoryPoolSize("TreeGridStack", 1024)
SetMemoryPoolSize("UnitAgent", 128)
SetMemoryPoolSize("UnitController", 128)
SetMemoryPoolSize("Weapon", weaponCnt)

SetSpawnDelay(10.0, 0.25)
--ReadDataFile("dc:BCC\\BCC.lvl", "BCC_conquest")
ReadDataFile("..\\..\\addon\\BCC\\data\\_LVL_PC\\BCC\\bes2.lvl", "bespin2_conquest")
SetDenseEnvironment("true")

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


-- 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("sound\\dea.lvl", "dea1")
OpenAudioStream("sound\\dea.lvl", "dea1")
OpenAudioStream("sound\\hot.lvl", "hot1gcw")
OpenAudioStream("sound\\hot.lvl", "hot1gcw")

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, "cisleaving")
SetOutOfBoundsVoiceOver(1, "repleaving")

SetAmbientMusic(REP, 1.0, "rep_dea_amb_start", 0,1)
SetAmbientMusic(REP, 0.8, "rep_dea_amb_middle", 1,1)
SetAmbientMusic(REP, 0.2,"rep_dea_amb_end", 2,1)
SetAmbientMusic(CIS, 1.0, "cis_dea_amb_start", 0,1)
SetAmbientMusic(CIS, 0.8, "cis_dea_amb_middle", 1,1)
SetAmbientMusic(CIS, 0.2,"cis_dea_amb_end", 2,1)

SetVictoryMusic(REP, "rep_dea_amb_victory")
SetDefeatMusic (REP, "rep_dea_amb_defeat")
SetVictoryMusic(CIS, "cis_dea_amb_victory")
SetDefeatMusic (CIS, "cis_dea_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")


-- Camera Stats
-- Giz Shot
AddCameraShot(0.879348, -0.142046, 0.448684, 0.072478, -38.413761, 30.986401, 195.879623);
AddCameraShot(0.755143, 0.032624, 0.654137, -0.028260, -80.924103, -32.534859, 59.805065);
AddCameraShot(0.596514, -0.068856, -0.794372, -0.091695, -139.203629, -28.934868, 56.316780);
AddCameraShot(0.073602, -0.011602, -0.985060, -0.155272, -118.288239, -28.934868, 125.938355);
AddCameraShot(0.902687, 0.001274, 0.430295, -0.000607, -90.957382, -47.834820, 180.831787);
AddCameraShot(-0.418815, -0.024036, -0.906262, 0.052011, -162.066483, -47.234821, 80.504837);
AddCameraShot(0.988357, 0.062970, 0.138228, -0.008807, -173.774002, -55.334801, 142.567810);
AddCameraShot(-0.100554, 0.008160, -0.991639, -0.080476, -246.954437, -31.334862, 153.438812);
AddCameraShot(0.717164, -0.018075, 0.696449, 0.017553, -216.827194, -31.334862, 186.863648);
AddCameraShot(0.844850, -0.049702, 0.531770, 0.031284, -247.181458, -45.734825, 29.732487);
AddCameraShot(0.454881, 0.028302, -0.888384, 0.055273, -291.636658, -48.734818, 21.009203);
AddCameraShot(0.818322, -0.026150, -0.573874, -0.018339, -193.434647, -58.634792, -12.443044);
AddCameraShot(0.471109, 0.004691, -0.882018, 0.008783, -192.251679, -61.334786, -32.647247);

end
User avatar
Firefang
Major
Major
Posts: 518
Joined: Mon Nov 15, 2010 8:55 pm
Location: California

Re: Random AI hero crashes

Post by Firefang »

Yes
User avatar
AceMastermind
Gametoast Staff
Gametoast Staff
Posts: 3285
Joined: Mon Aug 21, 2006 6:23 am
Contact:

Re: Random AI hero crashes

Post by AceMastermind »

If you're going to make script edits use a proper code editor to check your work and identify mistakes.
If you get munge errors(not warnings) then your map is broken and there is no need to play it, fix the errors first.
User avatar
skelltor
Sith
Sith
Posts: 1431
Joined: Fri Dec 11, 2009 6:24 pm
Projects :: BFSM
Games I'm Playing :: SWBFII
xbox live or psn: skelltor95
Location: minisnowta
Contact:

Re: Random AI hero crashes

Post by skelltor »

What are some good code editors out there?

EDIT heroes don't show up ingame AI or normal here are a couple relevent errors in my error log
Hidden/Spoiler:
Message Severity: 3
C:\Battlefront2\main\Battlefront2\Platform\PC\pcFirstPerson.cpp(69)
FirstPerson::LoadLVLFile: Could not open FPM\CIS\CIS.lvl
uf_updateClassIndex(): Added class: heroCis

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\LuaCallbacks_Mission.cpp(1379)
Hero class "heroCis" not found for team 2 (check the side's .req file)

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\Team.cpp(658)
Team missing hero class "0x4a9b70a2" (check the side's .req file)
uf_updateClassIndex(): Added class: heroRep

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\LuaCallbacks_Mission.cpp(1379)
Hero class "heroRep" not found for team 1 (check the side's .req file)

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\Team.cpp(658)
Team missing hero class "0xf6cee724" (check the side's .req file)
ifs_sideselect_fnEnter(): Map does not support custom era teams
ifs_sideselect_fnEnter(): The award settings file exists
ifs_sideselect_fnEnter(): Starting to remove award effects...
ifs_sideselect_fnEnter(): Finished removing award effects.
ifs_sideselect_fnEnter(): Map does not support custom era teams
fakeconsole_functions: AddCommand: Not adding command: Unlock Vehicles
fakeconsole_functions: AddCommand: Not adding command: Force No Views
fakeconsole_functions: AddCommand: Not adding command: Allow CP Capture
fakeconsole_functions: AddCommand: Not adding command: Not Immune To Mines
fakeconsole_functions: AddCommand: Not adding command: Disable Tumble Recovery
fakeconsole_functions: AddCommand: Not adding command: Allow AI Spawn 1
fakeconsole_functions: AddCommand: Not adding command: Allow AI Spawn 2
fakeconsole_functions: AddCommand: Not adding command: Team Auto-assign On
fakeconsole_functions: AddCommand: Not adding command: Heros SP Rules Off
fakeconsole_functions: AddCommand: Not adding command: Heros SP Scripted Off
fakeconsole_functions: AddCommand: Not adding command: Menu Sounds On
fakeconsole_functions: AddCommand: Not adding command: No Flee Just Die
fakeconsole_functions: AddCommand: Not adding command: Remove Award Effects
fakeconsole_functions: AddCommand: Not adding command: Allow Victory
fakeconsole_functions: AddCommand: Not adding command: AI AutoBalance Off
fakeconsole_functions: AddCommand: Not adding command: AI BlindJetJumps Off
fakeconsole_functions: AddCommand: Not adding command: Hide Team Points
fakeconsole_functions: AddCommand: Not adding command: Remove JetPacks
ifs_fakeconsole: Is runnable: Unlock Hero for Team 1 function: 046471A4
ifs_fakeconsole: Is runnable: Unlock Hero for Team 2 function: 046472CC
AQT
Gametoast Staff
Gametoast Staff
Posts: 4910
Joined: Sat Nov 03, 2007 4:55 pm
Location: SoCal, USA

Re: Random AI hero crashes

Post by AQT »

skelltor wrote:

Code: Select all

if ScriptCB_InMultiplayer() then
SetHeroClass(CIS, heroCis) 
SetHeroClass(REP, heroRep)
else
end
With that function you won't have normal heroes for single player mode. Just use SetHeroClass(CIS, heroCis) and SetHeroClass(REP, heroRep) on their own since you already have the following taking care of the online issue:

Code: Select all

if ScriptCB_InMultiplayer() then
heroCis = "cis_hero_countdooku"
heroRep = "rep_hero_aalya"
end
As for AI heroes not showing up, make sure you referenced the correct CP's and spawn paths that they are supposed to spawn at.
User avatar
skelltor
Sith
Sith
Posts: 1431
Joined: Fri Dec 11, 2009 6:24 pm
Projects :: BFSM
Games I'm Playing :: SWBFII
xbox live or psn: skelltor95
Location: minisnowta
Contact:

Re: Random AI hero crashes

Post by skelltor »

But I had regular AI heroes on the same map just fine. Its when I tried to make random AI heroes that they don't spawn. Could it be their not showing up from this?
Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\LuaCallbacks_Mission.cpp(1379)
Hero class "heroCis" not found for team 2 (check the side's .req file)

and how would I fix that error?
THEWULFMAN
Space Ranger
Posts: 5557
Joined: Tue Aug 17, 2010 3:30 pm
Projects :: Evolved 2
Location: Columbus, Ohio
Contact:

Re: Random AI hero crashes

Post by THEWULFMAN »

skelltor wrote:But I had regular AI heroes on the same map just fine. Its when I tried to make random AI heroes that they don't spawn. Could it be their not showing up from this?
Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\LuaCallbacks_Mission.cpp(1379)
Hero class "heroCis" not found for team 2 (check the side's .req file)

and how would I fix that error?
If I were you, I would do what I did, Check to make sure every hero works fine, without the AI heroes. If they do, its not side related, its lua related.
User avatar
skelltor
Sith
Sith
Posts: 1431
Joined: Fri Dec 11, 2009 6:24 pm
Projects :: BFSM
Games I'm Playing :: SWBFII
xbox live or psn: skelltor95
Location: minisnowta
Contact:

Re: Random AI hero crashes

Post by skelltor »

Yea all those heroes I used work fine :S can you see anything wrong with my lua?
AQT
Gametoast Staff
Gametoast Staff
Posts: 4910
Joined: Sat Nov 03, 2007 4:55 pm
Location: SoCal, USA

Re: Random AI hero crashes

Post by AQT »

skelltor wrote:But I had regular AI heroes on the same map just fine.
Well then, what did your LUA look like before?

And is the following still in your LUA?

Code: Select all

if ScriptCB_InMultiplayer() then
SetHeroClass(CIS, heroCis) 
SetHeroClass(REP, heroRep)
else
end
Seriously, as I stated before, you're not going to have heroes at all in single player if you still have SetHeroClass(CIS, heroCis) and SetHeroClass(REP, heroRep) in that function.

Your LUA also seems to be missing the function EnableSPHeroRules().
User avatar
skelltor
Sith
Sith
Posts: 1431
Joined: Fri Dec 11, 2009 6:24 pm
Projects :: BFSM
Games I'm Playing :: SWBFII
xbox live or psn: skelltor95
Location: minisnowta
Contact:

Re: Random AI hero crashes

Post by skelltor »

here is my most recent lua edit and @AQT my original lua in reguards to heroes was the same except that some AI hero support lines were at my luas end (cuz I have more units in the spawn screen)
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")


ATT = 1
DEF = 2
--this never changes, ever, no really, i mean it, lol.

if not ScriptCB_InMultiplayer() then
CIS = math.random(1,2)
REP = (3 - CIS)
else
REP = 1
CIS = 2
end



function ScriptPostLoad()
herocisand = math.random(1, 4)


if herocisand == 1 then
heroCis = "cis_hero_countdooku"

elseif herocisand == 2 then
heroCis = "cis_hero_durge"

elseif herocisand == 3 then
heroCis = "cis_hero_grievous"

elseif herocisand == 4 then
heroCis = "cis_hero_ventress"

end


herorepand = math.random(1, 4)


if herorepand == 1 then
heroRep = "rep_hero_kolar"

elseif herorepand == 2 then
heroRep = "rep_hero_shaakti"

elseif herorepand == 3 then
heroRep = "rep_hero_aalya"

elseif herorepand == 4 then
heroRep = "rep_hero_kitfisto"

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()
if not ScriptCB_InMultiplayer() then
herosupport = AIHeroSupport:New{AIATTHeroHealth = 5000, AIDEFHeroHealth = 5000, gameMode = "conquest",minSpawnTime = 20,}
herosupport:SetHeroClass(CIS, "heroCis")
herosupport:SetHeroClass(REP, "heroRep")
herosupport:AddSpawnCP("cp1","CP1Spawn")
herosupport:AddSpawnCP("cp2","CP3Spawn")
herosupport:AddSpawnCP("cp3","CP4Spawn")
herosupport:AddSpawnCP("cp4","CP5Spawn")
herosupport:AddSpawnCP("cp5","CP7Spawn")
herosupport:AddSpawnCP("cp7","CP2Spawn")

herosupport:Start()
else
end
EnableSPHeroRules()
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()

ReadDataFile("..\\..\\addon\\BCC\\data\\_LVL_PC\\load\\common.lvl")

ReadDataFile("ingame.lvl")

if ScriptCB_InMultiplayer() then
heroCis = "cis_hero_countdooku"
heroRep = "rep_hero_aalya"
end




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("dc:sound\\ske.lvl;skecw")
ReadDataFile("..\\..\\addon\\BCC\\data\\_LVL_PC\\sound\\BCC.lvl;BCCcw")
ReadDataFile("sound\\dea.lvl;dea1cw")
ReadDataFile("sound\\hot.lvl;hot1gcw")

ReadDataFile("SIDE\\BFSM\\aut.lvl",
"com_weap_inf_health_det",
"com_bldg_inf_psg")

ReadDataFile("SIDE\\BFSM\\rep.lvl",
"rep_inf_212th_rifleman",
"rep_inf_212th_rocketeer",
"rep_inf_212th_engineer",
"rep_inf_212th_sniper",
"rep_inf_shadow",
"rep_hero_kolar",
"rep_hero_shaakti",
"rep_hero_kitfisto",
"rep_inf_212th_capt",
"rep_inf_ep3_Commander_cody",
"rep_inf_212th_paratrooper",
"rep_inf_212th_jettrooper",
"rep_hero_aalya",
"rep_fly_assault_dome")

ReadDataFile("SIDE\\BFSM\\cis.lvl",
"cis_inf_battledroid",
"cis_inf_assaultdroid",
"cis_inf_flamedroid",
"cis_inf_sniper",
"cis_hero_grievous",
"cis_hero_ventress",
"cis_hero_durge",
"cis_inf_neimoidian_officer",
"cis_inf_droideka",
"cis_inf_mando",
"cis_inf_sep_commando",
"cis_inf_commander",
"cis_hero_countdooku")


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

SetupTeams{
rep = {
team = REP,
units = 32,
reinforcements = 300,
soldier = { "rep_inf_212th_rifleman",20, 40},
assault = { "rep_inf_212th_rocketeer",2,5},
engineer = { "rep_inf_212th_engineer",2,5},
sniper = { "rep_inf_212th_sniper",2,5},
officer = {"rep_inf_212th_paratrooper",1,4},
special = { "rep_inf_shadow",1,4},

},
cis = {
team = CIS,
units = 32,
reinforcements = 300,
soldier = { "cis_inf_battledroid",20, 40},
assault = { "cis_inf_assaultdroid",2,5},
engineer = { "cis_inf_flamedroid",2,5},
sniper = { "cis_inf_sniper",2,5},
officer = {"cis_inf_neimoidian_officer",1,4},
special = { "cis_inf_droideka",1.4},
}
}

AddUnitClass(REP, "rep_inf_212th_jettrooper",1,3)
AddUnitClass(REP, "rep_inf_212th_capt",1,2)
AddUnitClass(REP, "rep_inf_ep3_Commander_cody",0,1)
AddUnitClass(CIS, "cis_inf_mando",1,3)
AddUnitClass(CIS, "cis_inf_sep_commando",1,2)
AddUnitClass(CIS, "cis_inf_commander",0,1)


-- 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(3, 0) -- 3x2 (3 pairs of legs)
local weaponCnt = 1024
SetMemoryPoolSize("Aimer", 75)
SetMemoryPoolSize("AmmoCounter", weaponCnt)
SetMemoryPoolSize("BaseHint", 1024)
SetMemoryPoolSize ("CommandFlyer",5)
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", 1024)
SetMemoryPoolSize("SoundSpaceRegion", 64)
SetMemoryPoolSize("TreeGridStack", 1024)
SetMemoryPoolSize("UnitAgent", 128)
SetMemoryPoolSize("UnitController", 128)
SetMemoryPoolSize("Weapon", weaponCnt)

SetSpawnDelay(10.0, 0.25)
--ReadDataFile("dc:BCC\\BCC.lvl", "BCC_conquest")
ReadDataFile("..\\..\\addon\\BCC\\data\\_LVL_PC\\BCC\\bes2.lvl", "bespin2_conquest")
SetDenseEnvironment("true")

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


-- 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("sound\\dea.lvl", "dea1")
OpenAudioStream("sound\\dea.lvl", "dea1")
OpenAudioStream("sound\\hot.lvl", "hot1gcw")
OpenAudioStream("sound\\hot.lvl", "hot1gcw")

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, "cisleaving")
SetOutOfBoundsVoiceOver(1, "repleaving")

SetAmbientMusic(REP, 1.0, "rep_dea_amb_start", 0,1)
SetAmbientMusic(REP, 0.8, "rep_dea_amb_middle", 1,1)
SetAmbientMusic(REP, 0.2,"rep_dea_amb_end", 2,1)
SetAmbientMusic(CIS, 1.0, "cis_dea_amb_start", 0,1)
SetAmbientMusic(CIS, 0.8, "cis_dea_amb_middle", 1,1)
SetAmbientMusic(CIS, 0.2,"cis_dea_amb_end", 2,1)

SetVictoryMusic(REP, "rep_dea_amb_victory")
SetDefeatMusic (REP, "rep_dea_amb_defeat")
SetVictoryMusic(CIS, "cis_dea_amb_victory")
SetDefeatMusic (CIS, "cis_dea_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")


-- Camera Stats
-- Giz Shot
AddCameraShot(0.879348, -0.142046, 0.448684, 0.072478, -38.413761, 30.986401, 195.879623);
AddCameraShot(0.755143, 0.032624, 0.654137, -0.028260, -80.924103, -32.534859, 59.805065);
AddCameraShot(0.596514, -0.068856, -0.794372, -0.091695, -139.203629, -28.934868, 56.316780);
AddCameraShot(0.073602, -0.011602, -0.985060, -0.155272, -118.288239, -28.934868, 125.938355);
AddCameraShot(0.902687, 0.001274, 0.430295, -0.000607, -90.957382, -47.834820, 180.831787);
AddCameraShot(-0.418815, -0.024036, -0.906262, 0.052011, -162.066483, -47.234821, 80.504837);
AddCameraShot(0.988357, 0.062970, 0.138228, -0.008807, -173.774002, -55.334801, 142.567810);
AddCameraShot(-0.100554, 0.008160, -0.991639, -0.080476, -246.954437, -31.334862, 153.438812);
AddCameraShot(0.717164, -0.018075, 0.696449, 0.017553, -216.827194, -31.334862, 186.863648);
AddCameraShot(0.844850, -0.049702, 0.531770, 0.031284, -247.181458, -45.734825, 29.732487);
AddCameraShot(0.454881, 0.028302, -0.888384, 0.055273, -291.636658, -48.734818, 21.009203);
AddCameraShot(0.818322, -0.026150, -0.573874, -0.018339, -193.434647, -58.634792, -12.443044);
AddCameraShot(0.471109, 0.004691, -0.882018, 0.008783, -192.251679, -61.334786, -32.647247);

end
AQT
Gametoast Staff
Gametoast Staff
Posts: 4910
Joined: Sat Nov 03, 2007 4:55 pm
Location: SoCal, USA

Re: Random AI hero crashes

Post by AQT »

skelltor wrote:

Code: Select all

herosupport:SetHeroClass(CIS, "heroCis")
herosupport:SetHeroClass(REP, "heroRep")
You don't need quotation marks around heroRep and heroCis.

We also seem to be having a communication problem here: What happened to the lines

Code: Select all

SetHeroClass(CIS, heroCis) 
SetHeroClass(REP, heroRep)
being on their own? You weren't supposed to completely remove them but rather take them out of if ScriptCB_InMultiplayer() then function.
User avatar
skelltor
Sith
Sith
Posts: 1431
Joined: Fri Dec 11, 2009 6:24 pm
Projects :: BFSM
Games I'm Playing :: SWBFII
xbox live or psn: skelltor95
Location: minisnowta
Contact:

Re: Random AI hero crashes

Post by skelltor »

Having this

Code: Select all

SetHeroClass(CIS, heroCis) 
SetHeroClass(REP, heroRep)
cause no cps to show but I tried removing those quotetation marks and it works great :D thanks a ton guys :)
Post Reply