Page 1 of 3

AI Hero Support problem [Solved] but New problem :S

Posted: Thu Jan 21, 2010 8:01 pm
by Deviss
hello again, many time without bother a bit no? lol i am having any ideas so i tried put ai hero spawn in my map (geonosis original bf2) but not spawn and not error in bf2front log here my lua mission
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")

---------------------------------------------------------------------------
-- 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 ScriptPostLoad()
AddAIGoal(3, "Deathmatch", 100)
cp1 = CommandPost:New{name = "cp1"}
cp2 = CommandPost:New{name = "cp2"}
cp3 = CommandPost:New{name = "cp3"}
cp4 = CommandPost:New{name = "cp4"}
cp6 = CommandPost:New{name = "cp6"}
cp7 = CommandPost:New{name = "cp7"}
cp8 = CommandPost:New{name = "cp8"}

--This sets up the actual objective. This needs to happen after cp's are defined
conquest = ObjectiveConquest:New{teamATT = ATT, teamDEF = DEF, text = "level.geo1.objectives.conquest", 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(cp6)
conquest:AddCommandPost(cp7)
conquest:AddCommandPost(cp8)

conquest:Start()

herosupport = AIHeroSupport:New{AIATTHeroHealth = 3000, AIDEFHeroHealth = 3000, gameMode = "conquest",}
herosupport:SetHeroClass(REP, "rep_hero_macewindu")
herosupport:SetHeroClass(CIS, "cis_hero_jangofett")
herosupport:AddSpawnCP("cp1","cp1_spawn")
herosupport:AddSpawnCP("cp2","cp2_spawn")
herosupport:AddSpawnCP("cp3","cp3_spawn")
herosupport:AddSpawnCP("cp4","cp4_spawn")
herosupport:AddSpawnCP("cp6","cp6_spawn")
herosupport:AddSpawnCP("cp7","cp7_spawn")
herosupport:AddSpawnCP("cp8","cp8_spawn")
herosupport:Start()

EnableSPHeroRules()

AddDeathRegion("deathregion")
AddDeathRegion("deathregion2")
AddDeathRegion("deathregion3")
AddDeathRegion("deathregion4")
AddDeathRegion("deathregion5")

end
function ScriptInit()
StealArtistHeap(800*1024)
-- Designers, these two lines *MUST* be first.
SetPS2ModelMemory(3500000)
SetUberMode(1);
ReadDataFile("ingame.lvl")

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

SetTeamAggressiveness(CIS, 1.0)
SetTeamAggressiveness(REP, 1.0)

SetMemoryPoolSize("Music", 40)

ReadDataFile("sound\\geo.lvl;geo1cw")
ReadDataFile("dc:sound\\ABC.lvl;ABCcw")
ReadDataFile("SIDE\\rep.lvl",
--"rep_bldg_forwardcenter",
"rep_fly_assault_dome",
--"rep_fly_gunship",
"rep_fly_gunship_dome",
"rep_fly_jedifighter_dome",
"rep_hero_macewindu")

ReadDataFile("SIDE\\cis.lvl",
"cis_fly_droidfighter_dome",
"cis_hero_jangofett",
"cis_fly_geofighter",
"cis_hover_stap",
"cis_walk_spider")
ReadDataFile("SIDE\\geo.lvl",
"gen_inf_geonosian")

ReadDataFile("SIDE\\tur.lvl",
"tur_bldg_geoturret")

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_droid9",
"cis_hero")

ReadDataFile("dc:SIDE\\veh.lvl",
"cis_tread_hailfire",
"rep_fly_gunship",
"rep_hover_fightertank",
"rep_walk_atte")

-- Level Stats

ClearWalkers()
SetMemoryPoolSize("EntityWalker", -1)
AddWalkerType(0, 9) -- 8 droidekas (special case: 0 leg pairs)
AddWalkerType(2, 3) -- 2 spider walkers with 2 leg pairs each
AddWalkerType(3, 0) -- 2 attes with 3 leg pairs each
local weaponcnt = 240
SetMemoryPoolSize("Aimer", 50)
SetMemoryPoolSize("AmmoCounter", weaponcnt)
SetMemoryPoolSize("BaseHint", 100)
SetMemoryPoolSize("CommandWalker", 1)
SetMemoryPoolSize("EnergyBar", weaponcnt)
SetMemoryPoolSize("EntityFlyer", 6)
SetMemoryPoolSize("EntityHover", 9)
SetMemoryPoolSize("EntityLight", 50)
SetMemoryPoolSize("EntitySoundStream", 4)
SetMemoryPoolSize("MountedTurret", 10)
SetMemoryPoolSize("Navigator", 50)
SetMemoryPoolSize("Obstacle", 450)
SetMemoryPoolSize("PathFollower", 50)
SetMemoryPoolSize("PathNode", 100)
SetMemoryPoolSize("TreeGridStack", 300)
SetMemoryPoolSize("UnitAgent", 50)
SetMemoryPoolSize("UnitController", 50)
SetMemoryPoolSize("Weapon", weaponcnt)

SetSpawnDelay(10.0, 0.25)

SetupTeams{

rep = {
team = REP,
units = 50,
reinforcements = 150,
soldier = { "rep_clone1",16, 20},
heavy = { "rep_clone2",4,5},
sniper = { "rep_clone3",4,5},
engineer = { "rep_clone4",4,5},
marine = { "rep_clone5",4,5},
recon = { "rep_clone6",4,5},
gunner = { "rep_clone7",4,5},
special = { "rep_clone8",4,5},
commando = { "rep_clone9",3,4},
commander = { "rep_clone10",2,3},

},
cis = {
team = CIS,
units = 50,
reinforcements = 150,
soldier = { "cis_droid1",10, 30},
heavy = { "cis_droid2",4,5},
sniper = { "cis_droid3",4,5},
engineer = { "cis_droid4",4,5},
marine = { "cis_droid5",10,15},
recon = { "cis_droid6",4,5},
gunner = { "cis_droid7",4,5},
special = { "cis_droid9",2,4},
}
}

SetHeroClass(REP, "rep_hero_macewindu")
SetHeroClass(CIS, "cis_hero_jangofett")


-- Attacker Stats

--teamATT = ConquestTeam:New{team = ATT}
--teamATT:AddBleedThreshold(21, 0.75)
--teamATT:AddBleedThreshold(11, 2.25)
--teamATT:AddBleedThreshold(1, 3.0)
--teamATT:Init()
SetTeamAsEnemy(ATT,3)
SetTeamAsEnemy(3,ATT)

-- Defender Stats

--teamDEF = ConquestTeam:New{team = DEF}
--teamDEF:AddBleedThreshold(21, 0.75)
--teamDEF:AddBleedThreshold(11, 2.25)
--teamDEF:AddBleedThreshold(1, 3.0)
--teamDEF:Init()
SetTeamAsFriend(DEF,3)

-- Local Stats
SetTeamName(3, "locals")
SetUnitCount(3, 7)
AddUnitClass(3, "geo_inf_geonosian", 7)
SetTeamAsFriend(3, DEF)
--SetTeamName(4, "locals")
--AddUnitClass(4, "rep_inf_jedimale",1)
--AddUnitClass(4, "rep_inf_jedimaleb",1)
--AddUnitClass(4, "rep_inf_jedimaley",1)
--SetUnitCount(4, 3)
--SetTeamAsFriend(4, ATT)

ReadDataFile("GEO\\geo1.lvl", "geo1_conquest")

SetDenseEnvironment("false")
SetMinFlyHeight(-65)
SetMaxFlyHeight(50)
SetMaxPlayerFlyHeight(50)



-- Birdies
--SetNumBirdTypes(1)
--SetBirdType(0.0,10.0,"dragon")
--SetBirdFlockMinHeight(90.0)

-- Sound

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\\geo.lvl", "geo1cw")
OpenAudioStream("sound\\geo.lvl", "geo1cw")

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("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")


--ActivateBonus(CIS, "SNEAK_ATTACK")
--ActivateBonus(REP, "SNEAK_ATTACK")

SetAttackingTeam(ATT)

--Opening Satalite Shot
--Geo
--Mountain
AddCameraShot(0.996091, 0.085528, -0.022005, 0.001889, -6.942698, -59.197201, 26.136919)
--Wrecked Ship
AddCameraShot(0.906778, 0.081875, -0.411906, 0.037192, 26.373968, -59.937874, 122.553581)
--War Room
--AddCameraShot(0.994219, 0.074374, 0.077228, -0.005777, 90.939568, -49.293945, -69.571136)
end
thanks in advance :D

Re: AIHeroSupport problem

Posted: Thu Jan 21, 2010 8:05 pm
by Maveritchell
Make sure to read through archer01's tutorial for adding this - you can't use the AddHeroClass command:

Code: Select all

SetHeroClass(REP, "rep_hero_macewindu")
SetHeroClass(CIS, "cis_hero_jangofett")

Re: AIHeroSupport problem

Posted: Thu Jan 21, 2010 8:09 pm
by Deviss
Maveritchell wrote:Make sure to read through archer01's tutorial for adding this - you can't use the AddHeroClass command:

Code: Select all

SetHeroClass(REP, "rep_hero_macewindu")
SetHeroClass(CIS, "cis_hero_jangofett")
thanks but there is a bit problem where i find that tutorial ?, i will try thanks Mav :D

Re: AIHeroSupport problem

Posted: Thu Jan 21, 2010 8:10 pm
by Maveritchell
It's part of the download for the scripts.

Re: AIHeroSupport problem

Posted: Thu Jan 21, 2010 8:16 pm
by Deviss
Maveritchell wrote:It's part of the download for the scripts.
Link please?? and not work XD

Re: AIHeroSupport problem

Posted: Thu Jan 21, 2010 10:33 pm
by lucasfart
DEVISS-REX wrote:
Maveritchell wrote:It's part of the download for the scripts.
Link please?? and not work XD
did you check the asset release thread?? tut tut :P

Download:
http://www.filefront.com/thankyou.php?f ... 4989e00228

Re: AIHeroSupport problem

Posted: Fri Jan 22, 2010 6:00 am
by Deviss
lucasfart wrote:
DEVISS-REX wrote:
Maveritchell wrote:It's part of the download for the scripts.
Link please?? and not work XD
did you check the asset release thread?? tut tut :P

Download:
http://www.filefront.com/thankyou.php?f ... 4989e00228
many thanks i downloaded and try modifing my lua but anyway don't work :S this is my new mission file
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")

---------------------------------------------------------------------------
-- 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 ScriptPostLoad()
AddAIGoal(3, "Deathmatch", 100)
cp1 = CommandPost:New{name = "cp1"}
cp2 = CommandPost:New{name = "cp2"}
cp3 = CommandPost:New{name = "cp3"}
cp4 = CommandPost:New{name = "cp4"}
cp6 = CommandPost:New{name = "cp6"}
cp7 = CommandPost:New{name = "cp7"}
cp8 = CommandPost:New{name = "cp8"}

--This sets up the actual objective. This needs to happen after cp's are defined
conquest = ObjectiveConquest:New{teamATT = ATT, teamDEF = DEF, text = "level.geo1.objectives.conquest", 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(cp6)
conquest:AddCommandPost(cp7)
conquest:AddCommandPost(cp8)

conquest:Start()

herosupport = AIHeroSupport:New{AIATTHeroHealth = 3000, AIDEFHeroHealth = 3000, gameMode = "conquest",}
herosupport:SetHeroClass(REP, "rep_hero_macewindu")
herosupport:SetHeroClass(CIS, "cis_hero_jangofett")
herosupport:AddSpawnCP("cp1","cp1_spawn")
herosupport:AddSpawnCP("cp2","cp2_spawn")
herosupport:AddSpawnCP("cp3","cp3_spawn")
herosupport:AddSpawnCP("cp4","cp4_spawn")
herosupport:AddSpawnCP("cp6","cp6_spawn")
herosupport:AddSpawnCP("cp7","cp7_spawn")
herosupport:AddSpawnCP("cp8","cp8_spawn")
herosupport:Start()

EnableSPHeroRules()

AddDeathRegion("deathregion")
AddDeathRegion("deathregion2")
AddDeathRegion("deathregion3")
AddDeathRegion("deathregion4")
AddDeathRegion("deathregion5")

end
function ScriptInit()
StealArtistHeap(800*1024)
-- Designers, these two lines *MUST* be first.
SetPS2ModelMemory(3500000)
SetUberMode(1);
ReadDataFile("ingame.lvl")

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

SetTeamAggressiveness(CIS, 1.0)
SetTeamAggressiveness(REP, 1.0)

SetMemoryPoolSize("Music", 40)

ReadDataFile("sound\\geo.lvl;geo1cw")
ReadDataFile("dc:sound\\ABC.lvl;ABCcw")
ReadDataFile("SIDE\\rep.lvl",
--"rep_bldg_forwardcenter",
"rep_fly_assault_dome",
--"rep_fly_gunship",
"rep_fly_gunship_dome",
"rep_fly_jedifighter_dome",
"rep_hero_macewindu")

ReadDataFile("SIDE\\cis.lvl",
"cis_fly_droidfighter_dome",
"cis_hero_jangofett",
"cis_fly_geofighter",
"cis_hover_stap",
"cis_walk_spider")
ReadDataFile("SIDE\\geo.lvl",
"gen_inf_geonosian")

ReadDataFile("SIDE\\tur.lvl",
"tur_bldg_geoturret")

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_droid9",
"cis_hero")

ReadDataFile("dc:SIDE\\veh.lvl",
"cis_tread_hailfire",
"rep_fly_gunship",
"rep_hover_fightertank",
"rep_walk_atte")

-- Level Stats

ClearWalkers()
SetMemoryPoolSize("EntityWalker", -1)
AddWalkerType(0, 9) -- 8 droidekas (special case: 0 leg pairs)
AddWalkerType(2, 3) -- 2 spider walkers with 2 leg pairs each
AddWalkerType(3, 0) -- 2 attes with 3 leg pairs each
local weaponcnt = 240
SetMemoryPoolSize("Aimer", 50)
SetMemoryPoolSize("AmmoCounter", weaponcnt)
SetMemoryPoolSize("BaseHint", 100)
SetMemoryPoolSize("CommandWalker", 1)
SetMemoryPoolSize("EnergyBar", weaponcnt)
SetMemoryPoolSize("EntityFlyer", 6)
SetMemoryPoolSize("EntityHover", 9)
SetMemoryPoolSize("EntityLight", 50)
SetMemoryPoolSize("EntitySoundStream", 4)
SetMemoryPoolSize("MountedTurret", 10)
SetMemoryPoolSize("Navigator", 50)
SetMemoryPoolSize("Obstacle", 450)
SetMemoryPoolSize("PathFollower", 50)
SetMemoryPoolSize("PathNode", 100)
SetMemoryPoolSize("TreeGridStack", 300)
SetMemoryPoolSize("UnitAgent", 50)
SetMemoryPoolSize("UnitController", 50)
SetMemoryPoolSize("Weapon", weaponcnt)

SetSpawnDelay(10.0, 0.25)

SetupTeams{

rep = {
team = REP,
units = 50,
reinforcements = 150,
soldier = { "rep_clone1",16, 20},
heavy = { "rep_clone2",4,5},
sniper = { "rep_clone3",4,5},
engineer = { "rep_clone4",4,5},
marine = { "rep_clone5",4,5},
recon = { "rep_clone6",4,5},
gunner = { "rep_clone7",4,5},
special = { "rep_clone8",4,5},
commando = { "rep_clone9",3,4},
commander = { "rep_clone10",2,3},

},
cis = {
team = CIS,
units = 50,
reinforcements = 150,
soldier = { "cis_droid1",10, 30},
heavy = { "cis_droid2",4,5},
sniper = { "cis_droid3",4,5},
engineer = { "cis_droid4",4,5},
marine = { "cis_droid5",10,15},
recon = { "cis_droid6",4,5},
gunner = { "cis_droid7",4,5},
special = { "cis_droid9",2,4},
}
}


-- Attacker Stats

--teamATT = ConquestTeam:New{team = ATT}
--teamATT:AddBleedThreshold(21, 0.75)
--teamATT:AddBleedThreshold(11, 2.25)
--teamATT:AddBleedThreshold(1, 3.0)
--teamATT:Init()
SetTeamAsEnemy(ATT,3)
SetTeamAsEnemy(3,ATT)

-- Defender Stats

--teamDEF = ConquestTeam:New{team = DEF}
--teamDEF:AddBleedThreshold(21, 0.75)
--teamDEF:AddBleedThreshold(11, 2.25)
--teamDEF:AddBleedThreshold(1, 3.0)
--teamDEF:Init()
SetTeamAsFriend(DEF,3)

-- Local Stats
SetTeamName(3, "locals")
SetUnitCount(3, 7)
AddUnitClass(3, "geo_inf_geonosian", 7)
SetTeamAsFriend(3, DEF)
--SetTeamName(4, "locals")
--AddUnitClass(4, "rep_inf_jedimale",1)
--AddUnitClass(4, "rep_inf_jedimaleb",1)
--AddUnitClass(4, "rep_inf_jedimaley",1)
--SetUnitCount(4, 3)
--SetTeamAsFriend(4, ATT)

ReadDataFile("GEO\\geo1.lvl", "geo1_conquest")

SetDenseEnvironment("false")
SetMinFlyHeight(-65)
SetMaxFlyHeight(50)
SetMaxPlayerFlyHeight(50)



-- Birdies
--SetNumBirdTypes(1)
--SetBirdType(0.0,10.0,"dragon")
--SetBirdFlockMinHeight(90.0)

-- Sound

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\\geo.lvl", "geo1cw")
OpenAudioStream("sound\\geo.lvl", "geo1cw")

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("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")


--ActivateBonus(CIS, "SNEAK_ATTACK")
--ActivateBonus(REP, "SNEAK_ATTACK")

SetAttackingTeam(ATT)

--Opening Satalite Shot
--Geo
--Mountain
AddCameraShot(0.996091, 0.085528, -0.022005, 0.001889, -6.942698, -59.197201, 26.136919)
--Wrecked Ship
AddCameraShot(0.906778, 0.081875, -0.411906, 0.037192, 26.373968, -59.937874, 122.553581)
--War Room
--AddCameraShot(0.994219, 0.074374, 0.077228, -0.005777, 90.939568, -49.293945, -69.571136)
end
please help :(

Re: AIHeroSupport problem

Posted: Fri Jan 22, 2010 6:20 am
by lucasfart
DEVISS-REX wrote:
lucasfart wrote:
DEVISS-REX wrote:
Maveritchell wrote:It's part of the download for the scripts.
Link please?? and not work XD
did you check the asset release thread?? tut tut :P

Download:
http://www.filefront.com/thankyou.php?f ... 4989e00228
many thanks i downloaded and try modifing my lua but anyway don't work :S this is my new mission file
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")

---------------------------------------------------------------------------
-- 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 ScriptPostLoad()
AddAIGoal(3, "Deathmatch", 100)
cp1 = CommandPost:New{name = "cp1"}
cp2 = CommandPost:New{name = "cp2"}
cp3 = CommandPost:New{name = "cp3"}
cp4 = CommandPost:New{name = "cp4"}
cp6 = CommandPost:New{name = "cp6"}
cp7 = CommandPost:New{name = "cp7"}
cp8 = CommandPost:New{name = "cp8"}

--This sets up the actual objective. This needs to happen after cp's are defined
conquest = ObjectiveConquest:New{teamATT = ATT, teamDEF = DEF, text = "level.geo1.objectives.conquest", 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(cp6)
conquest:AddCommandPost(cp7)
conquest:AddCommandPost(cp8)

conquest:Start()

herosupport = AIHeroSupport:New{AIATTHeroHealth = 3000, AIDEFHeroHealth = 3000, gameMode = "conquest",}
herosupport:SetHeroClass(REP, "rep_hero_macewindu")
herosupport:SetHeroClass(CIS, "cis_hero_jangofett")
herosupport:AddSpawnCP("cp1","cp1_spawn")
herosupport:AddSpawnCP("cp2","cp2_spawn")
herosupport:AddSpawnCP("cp3","cp3_spawn")
herosupport:AddSpawnCP("cp4","cp4_spawn")
herosupport:AddSpawnCP("cp6","cp6_spawn")
herosupport:AddSpawnCP("cp7","cp7_spawn")
herosupport:AddSpawnCP("cp8","cp8_spawn")
herosupport:Start()

EnableSPHeroRules()

AddDeathRegion("deathregion")
AddDeathRegion("deathregion2")
AddDeathRegion("deathregion3")
AddDeathRegion("deathregion4")
AddDeathRegion("deathregion5")

end
function ScriptInit()
StealArtistHeap(800*1024)
-- Designers, these two lines *MUST* be first.
SetPS2ModelMemory(3500000)
SetUberMode(1);
ReadDataFile("ingame.lvl")

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

SetTeamAggressiveness(CIS, 1.0)
SetTeamAggressiveness(REP, 1.0)

SetMemoryPoolSize("Music", 40)

ReadDataFile("sound\\geo.lvl;geo1cw")
ReadDataFile("dc:sound\\ABC.lvl;ABCcw")
ReadDataFile("SIDE\\rep.lvl",
--"rep_bldg_forwardcenter",
"rep_fly_assault_dome",
--"rep_fly_gunship",
"rep_fly_gunship_dome",
"rep_fly_jedifighter_dome",
"rep_hero_macewindu")

ReadDataFile("SIDE\\cis.lvl",
"cis_fly_droidfighter_dome",
"cis_hero_jangofett",
"cis_fly_geofighter",
"cis_hover_stap",
"cis_walk_spider")
ReadDataFile("SIDE\\geo.lvl",
"gen_inf_geonosian")

ReadDataFile("SIDE\\tur.lvl",
"tur_bldg_geoturret")

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_droid9",
"cis_hero")

ReadDataFile("dc:SIDE\\veh.lvl",
"cis_tread_hailfire",
"rep_fly_gunship",
"rep_hover_fightertank",
"rep_walk_atte")

-- Level Stats

ClearWalkers()
SetMemoryPoolSize("EntityWalker", -1)
AddWalkerType(0, 9) -- 8 droidekas (special case: 0 leg pairs)
AddWalkerType(2, 3) -- 2 spider walkers with 2 leg pairs each
AddWalkerType(3, 0) -- 2 attes with 3 leg pairs each
local weaponcnt = 240
SetMemoryPoolSize("Aimer", 50)
SetMemoryPoolSize("AmmoCounter", weaponcnt)
SetMemoryPoolSize("BaseHint", 100)
SetMemoryPoolSize("CommandWalker", 1)
SetMemoryPoolSize("EnergyBar", weaponcnt)
SetMemoryPoolSize("EntityFlyer", 6)
SetMemoryPoolSize("EntityHover", 9)
SetMemoryPoolSize("EntityLight", 50)
SetMemoryPoolSize("EntitySoundStream", 4)
SetMemoryPoolSize("MountedTurret", 10)
SetMemoryPoolSize("Navigator", 50)
SetMemoryPoolSize("Obstacle", 450)
SetMemoryPoolSize("PathFollower", 50)
SetMemoryPoolSize("PathNode", 100)
SetMemoryPoolSize("TreeGridStack", 300)
SetMemoryPoolSize("UnitAgent", 50)
SetMemoryPoolSize("UnitController", 50)
SetMemoryPoolSize("Weapon", weaponcnt)

SetSpawnDelay(10.0, 0.25)

SetupTeams{

rep = {
team = REP,
units = 50,
reinforcements = 150,
soldier = { "rep_clone1",16, 20},
heavy = { "rep_clone2",4,5},
sniper = { "rep_clone3",4,5},
engineer = { "rep_clone4",4,5},
marine = { "rep_clone5",4,5},
recon = { "rep_clone6",4,5},
gunner = { "rep_clone7",4,5},
special = { "rep_clone8",4,5},
commando = { "rep_clone9",3,4},
commander = { "rep_clone10",2,3},

},
cis = {
team = CIS,
units = 50,
reinforcements = 150,
soldier = { "cis_droid1",10, 30},
heavy = { "cis_droid2",4,5},
sniper = { "cis_droid3",4,5},
engineer = { "cis_droid4",4,5},
marine = { "cis_droid5",10,15},
recon = { "cis_droid6",4,5},
gunner = { "cis_droid7",4,5},
special = { "cis_droid9",2,4},
}
}


-- Attacker Stats

--teamATT = ConquestTeam:New{team = ATT}
--teamATT:AddBleedThreshold(21, 0.75)
--teamATT:AddBleedThreshold(11, 2.25)
--teamATT:AddBleedThreshold(1, 3.0)
--teamATT:Init()
SetTeamAsEnemy(ATT,3)
SetTeamAsEnemy(3,ATT)

-- Defender Stats

--teamDEF = ConquestTeam:New{team = DEF}
--teamDEF:AddBleedThreshold(21, 0.75)
--teamDEF:AddBleedThreshold(11, 2.25)
--teamDEF:AddBleedThreshold(1, 3.0)
--teamDEF:Init()
SetTeamAsFriend(DEF,3)

-- Local Stats
SetTeamName(3, "locals")
SetUnitCount(3, 7)
AddUnitClass(3, "geo_inf_geonosian", 7)
SetTeamAsFriend(3, DEF)
--SetTeamName(4, "locals")
--AddUnitClass(4, "rep_inf_jedimale",1)
--AddUnitClass(4, "rep_inf_jedimaleb",1)
--AddUnitClass(4, "rep_inf_jedimaley",1)
--SetUnitCount(4, 3)
--SetTeamAsFriend(4, ATT)

ReadDataFile("GEO\\geo1.lvl", "geo1_conquest")

SetDenseEnvironment("false")
SetMinFlyHeight(-65)
SetMaxFlyHeight(50)
SetMaxPlayerFlyHeight(50)



-- Birdies
--SetNumBirdTypes(1)
--SetBirdType(0.0,10.0,"dragon")
--SetBirdFlockMinHeight(90.0)

-- Sound

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\\geo.lvl", "geo1cw")
OpenAudioStream("sound\\geo.lvl", "geo1cw")

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("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")


--ActivateBonus(CIS, "SNEAK_ATTACK")
--ActivateBonus(REP, "SNEAK_ATTACK")

SetAttackingTeam(ATT)

--Opening Satalite Shot
--Geo
--Mountain
AddCameraShot(0.996091, 0.085528, -0.022005, 0.001889, -6.942698, -59.197201, 26.136919)
--Wrecked Ship
AddCameraShot(0.906778, 0.081875, -0.411906, 0.037192, 26.373968, -59.937874, 122.553581)
--War Room
--AddCameraShot(0.994219, 0.074374, 0.077228, -0.005777, 90.939568, -49.293945, -69.571136)
end
please help :(
5- First add this line:

herosupport = AIHeroSupport:New{AIATTHeroHealth = 5000, AIDEFHeroHealth = 3000, gameMode = "NonConquest",}

- Note: The stuff in the curly braces are the different settings the script uses. It is a list of variables seperated by commas. All the variables you can set here have default settings, so if you don't set a variable yourself the default setting is used. See below for a list of the variable names and what they do. Variable names ARE case sensitive.


step five, i'm not sure if this makes a difference but maybe because gameMode = conquest should be gameMode = Conquest??? capital C?? i dunno if that's your problem though....also did you add the aiherosupport script to your mission.req?

EDIT: also, after the gamemode conquest part get rid of the comma, i don't know why he has it there but i had to get rid of it because the munge said it was an error in the lua
also, is there any errors in the log this time?? it might help........and this may sound like a stupid question but did you actually copy the AIHeroSupport file into you script folder?

Re: AIHeroSupport problem

Posted: Fri Jan 22, 2010 6:25 am
by Deviss
lucasfart wrote:
5- First add this line:

herosupport = AIHeroSupport:New{AIATTHeroHealth = 5000, AIDEFHeroHealth = 3000, gameMode = "NonConquest",}

- Note: The stuff in the curly braces are the different settings the script uses. It is a list of variables seperated by commas. All the variables you can set here have default settings, so if you don't set a variable yourself the default setting is used. See below for a list of the variable names and what they do. Variable names ARE case sensitive.


step five, i'm not sure if this makes a difference but maybe because gameMode = conquest should be gameMode = Conquest??? capital C?? i dunno if that's your problem though....also did you add the aiherosupport script to your mission.req?
the FIVE step is made and showed in my mission, and this is my mission.req
Hidden/Spoiler:
ucft
{
REQN
{
"config"
"ingame_movies"
}

REQN
{
"script"
"AIHeroSupport"
"setup_teams"
"gametype_conquest"
"gametype_capture"
"Objective"
"MultiObjectiveContainer"
"ObjectiveCTF"
"ObjectiveAssault"
"ObjectiveSpaceAssault"
"ObjectiveConquest"
"ObjectiveTDM"
"ObjectiveOneFlagCTF"
"SoundEvent_ctf"
"ObjectiveGoto"
"LinkedShields"
"LinkedDestroyables"
"LinkedTurrets"
"Ambush"
"PlayMovieWithTransition"
}

REQN
{
"lvl"
"bes1x_con"
"bes1y_con"
"bes2c_con"
"bes2x_con"
"bes2y_con"
"BOTc_con"
"BOTx_con"
"BOTy_con"
"cor1c_xl"
"cor1x_con"
"cor1x_c"
"cor1x_xl"
"cor1y_con"
"cor1y_c"
"cor1y_xl"
"dag1x_con"
"dag1y_con"
"dea1x_con"
"dea1x_c"
"dea1y_con"
"dea1y_c"
"end1x_con"
"end1y_con"
"fel1x_con"
"fel1x_c"
"fel1y_con"
"fel1y_c"
"geo1x_con"
"geo1x_c"
"geo1x_hunt"
"geo1x_xl"
"geo1y_con"
"geo1y_c"
"geo1y_hunt"
"geo1y_xl"
"geo2x_con"
"geo2y_con"
"hot1c_con"
"hot1x_con"
"hot1x_c"
"hot1y_con"
"hot1y_c"
"kam1c_eli"
"kam1x_con"
"kam1x_c"
"kam1x_eli"
"kam1y_con"
"kam1y_c"
"kam1y_eli"
"kas1x_con"
"kas1y_con"
"kas2c_xl"
"kas2x_con"
"kas2x_c"
"kas2x_xl"
"kas2y_con"
"kas2y_c"
"kas2y_xl"
"mus1x_con"
"mus1x_c"
"mus1y_con"
"mus1y_c"
"myg1x_con"
"myg1x_c"
"myg1x_eli"
"myg1y_con"
"myg1y_c"
"myg1y_eli"
"nab2c_hunt"
"nab2c_xl"
"nab2x_con"
"nab2x_xl"
"nab2y_con"
"nab2y_c"
"nab2y_xl"
"pol1x_con"
"pol1x_c"
"pol1y_con"
"pol1y_c"
"rhn2c_con"
"rhn2x_con"
"rhn2y_con"
"tan1x_con"
"tan1x_c"
"tan1y_con"
"tan1y_c"
"tat1x_con"
"tat1y_con"
"tat2x_con"
"tat2x_xl"
"tat2y_con"
"tat2y_xl"
"tat3x_con"
"tat3y_con"
"uta1x_con"
"uta1x_c"
"uta1x_eli"
"uta1y_con"
"uta1y_c"
"uta1y_eli"
"yav1y_c"
"yav1x_c"
"yav1x_con"
"yav1y_con"
}
}
( yes added :P )

Re: AIHeroSupport problem

Posted: Fri Jan 22, 2010 1:13 pm
by Coley
Doesn´t it have to be at the end of the script list? (don´t know if it makes a difference).

Re: AIHeroSupport problem

Posted: Sat Jan 23, 2010 12:59 am
by Deviss
Coley wrote:Doesn´t it have to be at the end of the script list? (don´t know if it makes a difference).
yes i did it :D

i tried also only changging lines per line but anyway dont work :(

Don't doublepost, please edit your old post instead. -Staff

Re: AI Hero Support problem

Posted: Sat Jan 23, 2010 5:05 am
by Coley
Have you deleted that now??

SetHeroClass(REP, "rep_hero_macewindu")
SetHeroClass(CIS, "cis_hero_jangofett")

They aren´t allowed to be 3 times in the lua.
And have you found the readme/instructions now?

Re: AI Hero Support problem

Posted: Sat Jan 23, 2010 8:12 am
by lucasfart
Coley wrote:Have you deleted that now??

SetHeroClass(REP, "rep_hero_macewindu")
SetHeroClass(CIS, "cis_hero_jangofett")

They aren´t allowed to be 3 times in the lua.
And have you found the readme/instructions now?
Maveritchell wrote:Make sure to read through archer01's tutorial for adding this - you can't use the AddHeroClass command:
Code:
SetHeroClass(REP, "rep_hero_macewindu")
SetHeroClass(CIS, "cis_hero_jangofett")
lucasfart wrote:
DEVISS-REX wrote:
Maveritchell wrote:
It's part of the download for the scripts.

Link please?? and not work XD

did you check the asset release thread?? tut tut

Download:
http://www.filefront.com/thankyou.php?f ... 4989e00228

many thanks i downloaded and try modifing my lua but anyway don't work :S this is my new mission file
Hidden/Spoiler:
please help
@Coley - if you read the earlier posts you would notice that both of those problems have been addressed.
@Dev - Could you post your error log for us?

Re: AI Hero Support problem

Posted: Sat Jan 23, 2010 11:12 am
by Deviss
lucasfart wrote:@Coley - if you read the earlier posts you would notice that both of those problems have been addressed.
@Dev - Could you post your error log for us?
i understood good i can't use (so delete them) the setheroclass lines :P, and in error log there is nothing :S , i tried that first, also i follow the instructions many times and don't work, i though: maybe i set wrong cp spawn paths, so i tried putting on differents maps like felucia,geonosis but anyway don't work.
Only work on Toola Frozen Tundra :P

Re: AI Hero Support problem

Posted: Sat Jan 23, 2010 12:55 pm
by Coley
Sorry... :?

Re: AI Hero Support problem

Posted: Sat Jan 23, 2010 1:20 pm
by Deviss
Coley wrote:Sorry... :?
no problem you tried :wink: , you know anyone got it work ?

Re: AI Hero Support problem

Posted: Sat Jan 23, 2010 1:22 pm
by Coley
Before I say something wrong, I ask you, do you mean that it works for anyone?
If yes, then I can say you : yes.

Re: AI Hero Support problem

Posted: Sat Jan 23, 2010 1:36 pm
by Deviss
Coley wrote:Before I say something wrong, I ask you, do you mean that it works for anyone?
If yes, then I can say you : yes.
cool for who it worked fine xD? i would like Pm him :P

Re: AI Hero Support problem

Posted: Sat Jan 23, 2010 2:01 pm
by Coley
Erm. Me.
:D :D :D

Re: AI Hero Support problem

Posted: Sat Jan 23, 2010 2:03 pm
by Deviss
Coley wrote:Erm. Me.
:D :D :D
mm i must to be sherlock holmes :lol: , in which stock maps you got it work fine :D?