Custom Objective Help Needed! [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
LitFam
Sergeant Major
Sergeant Major
Posts: 234
Joined: Sat Feb 04, 2017 5:52 pm
Games I'm Playing :: SWBF II 2005
xbox live or psn: No gamertag set
Location: Milky Way, Solar System, Earth, Antarctica

Custom Objective Help Needed! [Solved]

Post by LitFam »

I am making a game mode that has all the enemy AI target the player, whoever I can't seem to find the code for it.

My .lua
Hidden/Spoiler:
[code]--
-- Copyright (c) 2005 Pandemic Studios, LLC. All rights reserved.
--

-- load the gametype script
ScriptCB_DoFile("ObjectiveBossBattle")
ScriptCB_DoFile("setup_teams")

-- CIS Attacking (attacker is always #1)
REP = 1;
CIS = 2;

-- These variables do not change
ATT = REP;
DEF = CIS;

function ScriptPostLoad()

BlockPlanningGraphArcs("Connection1");
BlockPlanningGraphArcs("Connection2");
BlockPlanningGraphArcs("Connection3");
BlockPlanningGraphArcs("Connection4");
BlockPlanningGraphArcs("Connection5");
BlockPlanningGraphArcs("Connection6");
BlockPlanningGraphArcs("Connection7");
BlockPlanningGraphArcs("Connection8");
BlockPlanningGraphArcs("Connection9");
BlockPlanningGraphArcs("Connection10");
BlockPlanningGraphArcs("Connection11");
BlockPlanningGraphArcs("Connection12");
BlockPlanningGraphArcs("Connection13");
BlockPlanningGraphArcs("Connection14");
BlockPlanningGraphArcs("Connection15");
BlockPlanningGraphArcs("Connection16");
BlockPlanningGraphArcs("Connection17");
BlockPlanningGraphArcs("Connection18");
BlockPlanningGraphArcs("Connection19");
BlockPlanningGraphArcs("Connection20");
BlockPlanningGraphArcs("Connection21");
BlockPlanningGraphArcs("Connection22");
BlockPlanningGraphArcs("Connection23");
BlockPlanningGraphArcs("Connection24");

ForceHumansOntoTeam1(0)

DisableAIAutoBalance()
SetAIDifficulty(10,10,"easy")
SetAIDifficulty(10,10,"medium")
SetAIDifficulty(10,10,"hard")
SetTeamAggressiveness(CIS, 1.0)
SetTeamAggressiveness(REP, 1.0)
SetDefenderSnipeRange(170)
SetAttackerSnipeRange(170)

-- This would go into ScriptPostLoad()
-- and you would have one for each team capturing CPs

--This defines the CPs. These need to happen first
bo1 = CommandPost:New{name = "bo1"}
bo2 = CommandPost:New{name = "bo2"}

--This sets up the actual objective. This needs to happen after cp's are defined
surv = ObjectiveBossBattle:New{teamATT = ATT, teamDEF = DEF,
textATT = "game.modes.surv",
textDEF = "game.modes.surv2",
modename = "modename.description.surv",
multiplayerRules = true}

--This adds the CPs to the objective. This needs to happen after the objective is set up
surv:AddCommandPost(bo1)
surv:AddCommandPost(bo2)

surv:Start()

SetUberMode(1);

EnableSPHeroRules()

AddDeathRegion("deathregion1")
AddDeathRegion("deathregion2")
AddDeathRegion("deathregion3")
AddDeathRegion("deathregion4")

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("dc:Load\\load1.lvl")

ReadDataFile("ingame.lvl")

ForceHumansOntoTeam1(0)

DisableAIAutoBalance()
SetAIDifficulty(10,10,"easy")
SetAIDifficulty(10,10,"medium")
SetAIDifficulty(10,10,"hard")
SetTeamAggressiveness(CIS, 1.0)
SetTeamAggressiveness(REP, 1.0)
SetDefenderSnipeRange(170)
SetAttackerSnipeRange(170)

SetMaxFlyHeight(300)
SetMaxPlayerFlyHeight (300)

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\\CHR.lvl")
ReadDataFile("dc:sound\\UW2.lvl;UW2cw")
ReadDataFile("sound\\yav.lvl;yav1cw")

ReadDataFile("SIDE\\cis.lvl",
"cis_inf_rifleman",
"cis_inf_rocketeer",
"cis_inf_engineer",
"cis_inf_sniper",
"cis_inf_officer",
"cis_inf_droideka",
"cis_hero_darthmaul")

ReadDataFile("SIDE\\rep.lvl",
"rep_inf_ep3_rifleman",
"rep_inf_ep3_rocketeer",
"rep_inf_ep3_engineer",
"rep_inf_ep3_sniper",
"rep_inf_ep3_officer",
"rep_inf_ep3_jettrooper",
"rep_hero_anakin")

ReadDataFile("dc:Load\\load2.lvl")

ReadDataFile("dc:SIDE\\rep.lvl",
"rep_inf_clone_trooper_C_boss",
"cis_walk_tridroid_boss",
"cis_inf_battle_droid_A")

SetupTeams{

cis = {
team = CIS,
units = 30,
reinforcements = -1,
soldier = {"cis_inf_battle_droid_A",5,5},

},

rep = {
team = REP,
units = 1,
reinforcements = 1,
soldier = {"rep_inf_clone_trooper_C_boss",1,1},

},

}

-- Level Stats
-- ClearWalkers()
AddWalkerType(0, 25) -- special -> droidekas
AddWalkerType(1, 25) -- 1x2 (1 pair of legs)
AddWalkerType(2, 25) -- 2x2 (2 pairs of legs)
AddWalkerType(3, 25) -- 3x2 (3 pairs of legs)

local weaponCnt = 1024
SetMemoryPoolSize("Aimer", 75)
SetMemoryPoolSize("AmmoCounter", weaponCnt)
SetMemoryPoolSize("BaseHint", 1024)
SetMemoryPoolSize("EnergyBar", weaponCnt)
SetMemoryPoolSize("EntityCloth", 32)
SetMemoryPoolSize("EntityFlyer", 32)
SetMemoryPoolSize("EntityHover", 32)
SetMemoryPoolSize("EntityLight", 200)
SetMemoryPoolSize("EntitySoundStream", 4)
SetMemoryPoolSize("EntitySoundStatic", 32)
SetMemoryPoolSize("MountedTurret", 32)
SetMemoryPoolSize("Navigator", weaponCnt)
SetMemoryPoolSize("Obstacle", 1024)
SetMemoryPoolSize("PathNode", 1024)
SetMemoryPoolSize("SoundSpaceRegion", 64)
SetMemoryPoolSize("TreeGridStack", 1024)
SetMemoryPoolSize("UnitAgent", weaponCnt)
SetMemoryPoolSize("UnitController", weaponCnt)
SetMemoryPoolSize("Weapon", weaponCnt)
SetMemoryPoolSize("Music",33)
SetMemoryPoolSize("SoldierAnimation",656)
SetMemoryPoolSize("PathFollower",weaponCnt)
SetMemoryPoolSize("FLEffectObject::OffsetMatrix",2000)
SetMemoryPoolSize("ParticleTransformer::ColorTrans",1648)
SetMemoryPoolSize("ParticleTransformer::PositionTr",2000)
SetMemoryPoolSize("ParticleTransformer::SizeTransf",1165)

SetSpawnDelay(10.0, 0.25)
--ReadDataFile("dc:CHR\\CHR.lvl", "CHR_death")
ReadDataFile("dc:CHR\\CHR.lvl", "CHR_death")
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\\CHR.lvl", "CHR_S")
OpenAudioStream("sound\\yav.lvl", "yav1")
OpenAudioStream("sound\\yav.lvl", "yav1")
--OpenAudioStream("sound\\yav.lvl", "yav1_emt")

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

SetOutOfBoundsVoiceOver(2, "cisleaving")
SetOutOfBoundsVoiceOver(1, "repleaving")

SetAmbientMusic(REP, 1.0, "Christophsis_Soundtrack", 0,1)
--SetAmbientMusic(REP, 0.8, "rep_yav_amb_middle", 1,1)
--SetAmbientMusic(REP, 0.2, "rep_yav_amb_end", 2,1)
SetAmbientMusic(CIS, 1.0, "Christophsis_Soundtrack", 0,1)
--SetAmbientMusic(CIS, 0.8, "cis_yav_amb_middle", 1,1)
--SetAmbientMusic(CIS, 0.2, "cis_yav_amb_end", 2,1)

SetVictoryMusic(REP, "rep_yav_amb_victory")
SetDefeatMusic (REP, "rep_yav_amb_defeat")
SetVictoryMusic(CIS, "cis_yav_amb_victory")
SetDefeatMusic (CIS, "cis_yav_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
AddCameraShot(0.716522, -0.015740, 0.697219, 0.015316, 511.727753, 14.296076, 2.373827);
end[/code]
Last edited by LitFam on Sat Aug 19, 2017 9:11 am, edited 2 times in total.
Marth8880
Resistance Leader
Posts: 5042
Joined: Tue Feb 09, 2010 8:43 pm
Projects :: DI2 + Psychosis
Games I'm Playing :: Silent Hill 2
xbox live or psn: Marth8880
Location: Edinburgh, UK
Contact:

Re: How would I make the all the enemy AI target the player?

Post by Marth8880 »

To set the goal:

Code: Select all

goalKillPlayer = AddAIGoal(enemyTeamID, "Destroy", 0)
To remove the goal when you're done with it:

Code: Select all

DeleteAIGoal(goalKillPlayer)
Resources:
http://www.secretsociety.com/forum/down ... IGoals.txt
http://www.secretsociety.com/forum/down ... F2Docs/AI/
LitFam
Sergeant Major
Sergeant Major
Posts: 234
Joined: Sat Feb 04, 2017 5:52 pm
Games I'm Playing :: SWBF II 2005
xbox live or psn: No gamertag set
Location: Milky Way, Solar System, Earth, Antarctica

Re: How would I make the all the enemy AI target the player?

Post by LitFam »

Thanks, Marth I have one more question though I have a unit called "cis_walk_tridroid_boss". The point of this game mode is to destroy the tri droid and if you do, then you win, however, if you die you lose.
Marth8880
Resistance Leader
Posts: 5042
Joined: Tue Feb 09, 2010 8:43 pm
Projects :: DI2 + Psychosis
Games I'm Playing :: Silent Hill 2
xbox live or psn: Marth8880
Location: Edinburgh, UK
Contact:

Re: How would I make the all the enemy AI target the player?

Post by Marth8880 »

And? What's the question? I can't read your mind. (or can I)
LitFam
Sergeant Major
Sergeant Major
Posts: 234
Joined: Sat Feb 04, 2017 5:52 pm
Games I'm Playing :: SWBF II 2005
xbox live or psn: No gamertag set
Location: Milky Way, Solar System, Earth, Antarctica

Re: How would I make the all the enemy AI target the player?

Post by LitFam »

My question is how do I make the AI stop trying to capture the command posts and follow me (I have ClearAIGoals(2) BTW and its not working) I posted my .lua below
Hidden/Spoiler:
[code]--
-- Copyright (c) 2005 Pandemic Studios, LLC. All rights reserved.
--

-- load the gametype script
ScriptCB_DoFile("ObjectiveBossBattle")
ScriptCB_DoFile("setup_teams")

-- CIS Attacking (attacker is always #1)
REP = 1;
CIS = 2;

-- These variables do not change
ATT = REP;
DEF = CIS;

function ScriptPostLoad()

BlockPlanningGraphArcs("Connection1");
BlockPlanningGraphArcs("Connection2");
BlockPlanningGraphArcs("Connection3");
BlockPlanningGraphArcs("Connection4");
BlockPlanningGraphArcs("Connection5");
BlockPlanningGraphArcs("Connection6");
BlockPlanningGraphArcs("Connection7");
BlockPlanningGraphArcs("Connection8");
BlockPlanningGraphArcs("Connection9");
BlockPlanningGraphArcs("Connection10");
BlockPlanningGraphArcs("Connection11");
BlockPlanningGraphArcs("Connection12");
BlockPlanningGraphArcs("Connection13");
BlockPlanningGraphArcs("Connection14");
BlockPlanningGraphArcs("Connection15");
BlockPlanningGraphArcs("Connection16");
BlockPlanningGraphArcs("Connection17");
BlockPlanningGraphArcs("Connection18");
BlockPlanningGraphArcs("Connection19");
BlockPlanningGraphArcs("Connection20");
BlockPlanningGraphArcs("Connection21");
BlockPlanningGraphArcs("Connection22");
BlockPlanningGraphArcs("Connection23");
BlockPlanningGraphArcs("Connection24");

ForceHumansOntoTeam1(0)

ClearAIGoals(1)
AddAIGoal(1,"Defend", 100, 0)
AddAIGoal(1,"Destroy", 100, cis_walk_tridroid_boss)
ClearAIGoals(2)
goalKillPlayer = AddAIGoal(2,"Destroy", 0)
--DeleteAIGoal(goalKillPlayer)

DisableAIAutoBalance()
SetAIDifficulty(10,10,"easy")
SetAIDifficulty(10,10,"medium")
SetAIDifficulty(10,10,"hard")
SetTeamAggressiveness(CIS, 1.0)
SetTeamAggressiveness(REP, 1.0)
SetDefenderSnipeRange(170)
SetAttackerSnipeRange(170)

-- This would go into ScriptPostLoad()
-- and you would have one for each team capturing CPs

--This defines the CPs. These need to happen first
bo1 = CommandPost:New{name = "bo1"}
bo2 = CommandPost:New{name = "bo2"}

--This sets up the actual objective. This needs to happen after cp's are defined
surv = ObjectiveBossBattle:New{teamATT = ATT, teamDEF = DEF,
textATT = "game.modes.surv",
textDEF = "game.modes.surv2",
modename = "modename.description.surv",
multiplayerRules = true}

--This adds the CPs to the objective. This needs to happen after the objective is set up
surv:AddCommandPost(bo1)
surv:AddCommandPost(bo2)

surv:Start()

SetUberMode(1);

EnableSPHeroRules()

AddDeathRegion("deathregion1")
AddDeathRegion("deathregion2")
AddDeathRegion("deathregion3")
AddDeathRegion("deathregion4")

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("dc:Load\\load1.lvl")

ReadDataFile("ingame.lvl")

SetMaxFlyHeight(300)
SetMaxPlayerFlyHeight (300)

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\\CHR.lvl")
ReadDataFile("dc:sound\\UW2.lvl;UW2cw")
ReadDataFile("sound\\yav.lvl;yav1cw")

ReadDataFile("SIDE\\cis.lvl",
"cis_inf_rifleman",
"cis_inf_rocketeer",
"cis_inf_engineer",
"cis_inf_sniper",
"cis_inf_officer",
"cis_inf_droideka",
"cis_hero_darthmaul")

ReadDataFile("SIDE\\rep.lvl",
"rep_inf_ep3_rifleman",
"rep_inf_ep3_rocketeer",
"rep_inf_ep3_engineer",
"rep_inf_ep3_sniper",
"rep_inf_ep3_officer",
"rep_inf_ep3_jettrooper",
"rep_hero_anakin")

ReadDataFile("dc:Load\\load2.lvl")

ReadDataFile("dc:SIDE\\rep.lvl",
"rep_inf_clone_trooper_C_boss",
"cis_walk_tridroid_boss",
"cis_inf_battle_droid_A")

SetupTeams{

cis = {
team = CIS,
units = 30,
reinforcements = -1,
soldier = {"cis_inf_battle_droid_A",5,5},

},

rep = {
team = REP,
units = 1,
reinforcements = 1,
soldier = {"rep_inf_clone_trooper_C_boss",1,1},

},

}

-- Level Stats
-- ClearWalkers()
AddWalkerType(0, 25) -- special -> droidekas
AddWalkerType(1, 25) -- 1x2 (1 pair of legs)
AddWalkerType(2, 25) -- 2x2 (2 pairs of legs)
AddWalkerType(3, 25) -- 3x2 (3 pairs of legs)

local weaponCnt = 1024
SetMemoryPoolSize("Aimer", 75)
SetMemoryPoolSize("AmmoCounter", weaponCnt)
SetMemoryPoolSize("BaseHint", 1024)
SetMemoryPoolSize("EnergyBar", weaponCnt)
SetMemoryPoolSize("EntityCloth", 32)
SetMemoryPoolSize("EntityFlyer", 32)
SetMemoryPoolSize("EntityHover", 32)
SetMemoryPoolSize("EntityLight", 200)
SetMemoryPoolSize("EntitySoundStream", 4)
SetMemoryPoolSize("EntitySoundStatic", 32)
SetMemoryPoolSize("MountedTurret", 32)
SetMemoryPoolSize("Navigator", weaponCnt)
SetMemoryPoolSize("Obstacle", 1024)
SetMemoryPoolSize("PathNode", 1024)
SetMemoryPoolSize("SoundSpaceRegion", 64)
SetMemoryPoolSize("TreeGridStack", 1024)
SetMemoryPoolSize("UnitAgent", weaponCnt)
SetMemoryPoolSize("UnitController", weaponCnt)
SetMemoryPoolSize("Weapon", weaponCnt)
SetMemoryPoolSize("Music",33)
SetMemoryPoolSize("SoldierAnimation",656)
SetMemoryPoolSize("PathFollower",weaponCnt)
SetMemoryPoolSize("FLEffectObject::OffsetMatrix",2000)
SetMemoryPoolSize("ParticleTransformer::ColorTrans",1648)
SetMemoryPoolSize("ParticleTransformer::PositionTr",2000)
SetMemoryPoolSize("ParticleTransformer::SizeTransf",1165)

SetSpawnDelay(10.0, 0.25)
--ReadDataFile("dc:CHR\\CHR.lvl", "CHR_death")
ReadDataFile("dc:CHR\\CHR.lvl", "CHR_death")
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\\CHR.lvl", "CHR_S")
OpenAudioStream("sound\\yav.lvl", "yav1")
OpenAudioStream("sound\\yav.lvl", "yav1")
--OpenAudioStream("sound\\yav.lvl", "yav1_emt")

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

SetOutOfBoundsVoiceOver(2, "cisleaving")
SetOutOfBoundsVoiceOver(1, "repleaving")

SetAmbientMusic(REP, 1.0, "Christophsis_Soundtrack", 0,1)
--SetAmbientMusic(REP, 0.8, "rep_yav_amb_middle", 1,1)
--SetAmbientMusic(REP, 0.2, "rep_yav_amb_end", 2,1)
SetAmbientMusic(CIS, 1.0, "Christophsis_Soundtrack", 0,1)
--SetAmbientMusic(CIS, 0.8, "cis_yav_amb_middle", 1,1)
--SetAmbientMusic(CIS, 0.2, "cis_yav_amb_end", 2,1)

SetVictoryMusic(REP, "rep_yav_amb_victory")
SetDefeatMusic (REP, "rep_yav_amb_defeat")
SetVictoryMusic(CIS, "cis_yav_amb_victory")
SetDefeatMusic (CIS, "cis_yav_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
AddCameraShot(0.716522, -0.015740, 0.697219, 0.015316, 511.727753, 14.296076, 2.373827);
end[/code]
Here is a video of the AI ignoring me even though I cleared the goals like this...
Hidden/Spoiler:
[code]ClearAIGoals(2)
goalKillPlayer = AddAIGoal(2,"Destroy", 0)
--DeleteAIGoal(goalKillPlayer)[/code]
Video: http://www.moddb.com/members/litfam/videos
Last edited by LitFam on Fri Aug 18, 2017 2:36 pm, edited 1 time in total.
Marth8880
Resistance Leader
Posts: 5042
Joined: Tue Feb 09, 2010 8:43 pm
Projects :: DI2 + Psychosis
Games I'm Playing :: Silent Hill 2
xbox live or psn: Marth8880
Location: Edinburgh, UK
Contact:

Re: How would I make the all the enemy AI target the player?

Post by Marth8880 »

Try commenting out these lines:

Code: Select all

    surv:AddCommandPost(bo1)
   surv:AddCommandPost(bo2)
LitFam
Sergeant Major
Sergeant Major
Posts: 234
Joined: Sat Feb 04, 2017 5:52 pm
Games I'm Playing :: SWBF II 2005
xbox live or psn: No gamertag set
Location: Milky Way, Solar System, Earth, Antarctica

Re: How would I make the all the enemy AI target the player?

Post by LitFam »

Marth8880 wrote:Try commenting out these lines:

Code: Select all

    surv:AddCommandPost(bo1)
   surv:AddCommandPost(bo2)
I just tried your suggestion. The results were the AI did not spawn at all...
Marth8880
Resistance Leader
Posts: 5042
Joined: Tue Feb 09, 2010 8:43 pm
Projects :: DI2 + Psychosis
Games I'm Playing :: Silent Hill 2
xbox live or psn: Marth8880
Location: Edinburgh, UK
Contact:

Re: How would I make the all the enemy AI target the player?

Post by Marth8880 »

Oh rip LOL, well in that case go ahead and post the ObjectiveBossBattle script so I can take a look at it.
LitFam
Sergeant Major
Sergeant Major
Posts: 234
Joined: Sat Feb 04, 2017 5:52 pm
Games I'm Playing :: SWBF II 2005
xbox live or psn: No gamertag set
Location: Milky Way, Solar System, Earth, Antarctica

Re: How would I make the all the enemy AI target the player?

Post by LitFam »

Marth8880 wrote:Oh rip LOL, well in that case go ahead and post the ObjectiveBossBattle script so I can take a look at it.
Here
Hidden/Spoiler:
[code]--
-- Copyright (c) 2005 Pandemic Studios, LLC. All rights reserved.
--

ScriptCB_DoFile("Objective")

--=============================
-- CommandPost
-- Class representing a specific CP, allowing some measure of customization
-- of what happens at each post when it is captured
--=============================
CommandPost =
{
-- fields that need to be specified when calling New()
name = "noname", --name of the CP

-- Overridable functions
OnCapture = function()
--override me to customize behavior when the command post is captured
end,
}

function CommandPost:New(o)
o = o or {}
setmetatable(o, self)
self.__index = self
return o
end

--=============================
-- ObjectiveBossBattle
-- Handles the logic for a conquest game (A.K.A. capture the command posts)
--=============================
ObjectiveBossBattle = Objective:New
{
-- external values
icon = "hud_objective_icon_circle",

-- internal values
defaultBleedRate = 0.3333333333, --how many units will be lost per second
defeatTimerSeconds = 20, --how long the defeat timer lasts after capping the all the CPs
}

function ObjectiveBossBattle:GetOpposingTeam(team)
if team == self.teamATT then
return self.teamDEF
else
return self.teamATT
end
end


function ObjectiveBossBattle:AddCommandPost(cp)
--make sure we have a table to add the cp to
self.commandPosts = self.commandPosts or {}

--do all the error checking we can on the cp
assert(cp.name, "WARNING: no name supplied for the command post")
cp.name = string.lower(cp.name)

self.commandPosts[cp.name] = cp

--keep a running tally of the bleedValue relative to each team
if not self.totalBleedValue then
self.totalBleedValue = {}
self.totalBleedValue[self.teamATT] = 0
self.totalBleedValue[self.teamDEF] = 0
end
self.totalBleedValue[self.teamATT] = self.totalBleedValue[self.teamATT] + GetCommandPostBleedValue(cp.name, self.teamATT)
self.totalBleedValue[self.teamDEF] = self.totalBleedValue[self.teamDEF] + GetCommandPostBleedValue(cp.name, self.teamDEF)
end


--Add a threshold value for bleeding. Basically
function ObjectiveBossBattle:AddBleedThreshold(team, threshold, rate)
--assert(team == self.teamATT or team == self.teamDEF, "invalid team!")

if not self.bleedRates then
--initialize the bleedRates two-dimensional array
self.bleedRates = {}
self.bleedRates[self.teamATT] = {}
self.bleedRates[self.teamDEF] = {}
end

self.bleedRates[team][threshold] = rate
end

-- Get game time limit as set in game options menu, if any. 0 if none.
function ObjectiveBossBattle:GetGameTimeLimit()
return ScriptCB_GetCONMaxTimeLimit()
end

function ObjectiveBossBattle:GameOptionsTimeLimitUp()
local team1pts = GetReinforcementCount(1)
local team2pts = GetReinforcementCount(2)
if ( team1pts > team2pts ) then
MissionVictory(1)
elseif ( team1pts < team2pts ) then
MissionVictory(2)
else
--tied, so victory for both
MissionVictory({1,2})
end
end

function ObjectiveBossBattle:Start()
--===============================
-- Local functions
--===============================


local UpdateBleedRate = function(team)
--count up the total bleedPoints (bleedPoints only count if they're on a CP owned by a different team)
local bleedPoints = 0
for i, cp in pairs(self.commandPosts) do
local cpTeam = GetObjectTeam(cp.name)
if cpTeam == self:GetOpposingTeam(team) then
--print("cp.name:", cp.name, "bleedPoints:", GetCommandPostBleedValue(cp.name, cpTeam)) --uncomment me for test output!
bleedPoints = bleedPoints + GetCommandPostBleedValue(cp.name, cpTeam)
end
end


--set the bleed rate based on the total accumulated bleedPoints
local bleedRate = 0.0
if self.bleedRates and self.bleedRates[team] then
--look through the unsorted list for the highest threshold that bleedPoints is higher than
local highestThresholdSoFar = 0
for threshold, rate in pairs(self.bleedRates[team]) do
if bleedPoints >= threshold and threshold > highestThresholdSoFar then
bleedRate = rate
highestThresholdSoFar = threshold
end
end
else
--default bleeding rule is to start bleeding when the team's bleed points are greater
--than half the total points
if bleedPoints > (self.totalBleedValue[team] / 2.0) then
bleedRate = self.defaultBleedRate
end
end

--print("totalbleedpts:", self.totalBleedValue[team]) --uncomment me for test output!
--print("team:", team, "bleedPoints:", bleedPoints, "bleedRate:", bleedRate) --uncomment me for test output!

--setup the bleedrate display (i.e. how fast the score flashes in the HUD)
SetBleedRate(team, bleedRate)

if bleedRate > 0.0 then
--start bleeding reinforcements
StopTimer(self.bleedTimer[team])
SetTimerValue(self.bleedTimer[team], 1.0)
SetTimerRate(self.bleedTimer[team], bleedRate)
StartTimer(self.bleedTimer[team])
else
--stop bleeding reinforcements
StopTimer(self.bleedTimer[team])
end
end


--turns off the timers and resets the winningTeam number
local DisableWinnerDoodads = function()
self.winningTeam = 0
StopTimer(self.defeatTimer)

--hide the timers (HACK: this way of displaying the lose timer should be updated to use new HUD code)
SetDefeatTimer(nil, self.teamATT)
SetVictoryTimer(nil, self.teamATT)
SetDefeatTimer(nil, self.teamDEF)
SetVictoryTimer(nil, self.teamDEF)
end


local UpdateState = function()
if self.multiplayerRules then
UpdateBleedRate(self.teamDEF)
UpdateBleedRate(self.teamATT)
end

--check to see if one team (the winningTeam) has all the CPs
self.winningTeam = 0
for i, cp in pairs(self.commandPosts) do
--NOTE: destroyed CP's aren't supposed to count against the win/loss accounting
if IsObjectAlive(cp.name) then
local cpTeam = GetObjectTeam(cp.name)

if cpTeam == 0 then
--can't have a winner if one of the CPs is still neutral
DisableWinnerDoodads()
return
elseif self.winningTeam == 0 then
--start tracking this team that might be winning
self.winningTeam = cpTeam
elseif self.winningTeam ~= cpTeam then
--there is no winner, since we just found two CP's that don't match
DisableWinnerDoodads()
return
end
end
end

if self.winningTeam ~= 0 then
if self.disallowDefensiveVictory and self.winningTeam ~= self.teamATT then
return
end

if self.multiplayerRules then
--start the defeat timer to end the game in a few seconds
SetTimerValue(self.defeatTimer, self.defeatTimerSeconds)
StartTimer(self.defeatTimer)

--tell the C++ code about the defeat/victory timer (which will display it on the HUD)
SetDefeatTimer(self.defeatTimer, self:GetOpposingTeam(self.winningTeam))
SetVictoryTimer(self.defeatTimer, self.winningTeam)
else
--end the objective immediately
self:Complete(self.winningTeam)
end
end
end


local InitBleedTimer = function(team)
self.bleedTimer[team] = CreateTimer("bleed" .. team)

OnTimerElapse(
function (timer)
if GetReinforcementCount(team) > GetNumTeamMembersAlive(team) then
--tick off a reinforcement when the timer elapses, and start it up again
if GetReinforcementCount(team) > 0 then
AddReinforcements(team, -1)
end
SetTimerValue(timer, GetTimerValue(timer) + 1.0)
StartTimer(timer)
else
--disallow bleeding when a team gets really low on reinforcements (so the team
--doesn't run entirely out of units due to bleedrate, as per designer request)
SetBleedRate(team, 0.0)
StopTimer(timer)
end
end,
self.bleedTimer[team]
)
end


local InitDefeatTimer = function()
self.defeatTimer = CreateTimer("defeat")
SetTimerRate(self.defeatTimer, 1.0)

OnTimerElapse(
function (timer)
StopTimer(timer)
SetReinforcementCount(self:GetOpposingTeam(self.winningTeam), 0)
self:Complete(self.winningTeam)
end,
self.defeatTimer
)
end


local UpdatePostMapMarker = function(postPtr)
if not self.multiplayerRules then
--check the team that capped the CP, and change the map marker accordingly
if GetObjectTeam(postPtr) == self.teamATT then
MapRemoveEntityMarker(postPtr, self.teamATT)
else
MapAddEntityMarker(postPtr, self.icon, 4.0, self.teamATT, "YELLOW", true)
end
end
end

--==========
-- Set the number of guys in the level to number in game options
--==========
ScriptCB_SetNumBots(ScriptCB_GetCONNumBots())

--===============================
-- Initialization logic
--===============================
--initialize the base objective data first
Objective.Start(self)

--initialize internal values
self.commandPosts = self.commandPosts or {}

self.bleedTimer = {}
InitBleedTimer(self.teamATT)
InitBleedTimer(self.teamDEF)

InitDefeatTimer()

if self.multiplayerRules then
self.disallowDefensiveVictory = false
else
self.disallowDefensiveVictory = true --in single player/co-op, the defense can't win by capping all the CPs
end

numCPs = 0
for i, cp in pairs(self.commandPosts) do
if not self.multiplayerRules then
MapAddEntityMarker(cp.name, self.icon, 4.0, self.teamATT, "YELLOW", true)
end
numCPs = numCPs + 1
end
if(numCPs == 0) then
print ("ERROR: no valid CommandPosts were added to the ObjectiveBossBattle")
return
end

--set AI goals
self.AIGoals = {}
if self.AIGoalWeight > 0.0 then
table.insert(self.AIGoals, AddAIGoal(self.teamATT, "Conquest", 100*self.AIGoalWeight))
table.insert(self.AIGoals, AddAIGoal(self.teamDEF, "Conquest", 100*self.AIGoalWeight))
end

--do an initial update on the state
UpdateState()

--=======================================
-- Event responses
--=======================================
-- command post captures
OnFinishCapture(
function (postPtr)
if self.isComplete then return end
if not self.commandPosts[GetEntityName(postPtr)] then return end

UpdatePostMapMarker(postPtr)
UpdateState()
end
)

-- command post neutralize
OnFinishNeutralize(
function (postPtr)
if self.isComplete then return end
if not self.commandPosts[GetEntityName(postPtr)] then return end

UpdatePostMapMarker(postPtr)
UpdateState()
end
)

-- command post spawn
OnCommandPostRespawn(
function (postPtr)
if self.isComplete then return end
if not self.commandPosts[GetEntityName(postPtr)] then return end

UpdatePostMapMarker(postPtr)
UpdateState()
end
)

-- command post kill
OnCommandPostKill(
function (postPtr)
if self.isComplete then return end
if not self.commandPosts[GetEntityName(postPtr)] then return end

if not self.multiplayerRules then
MapRemoveEntityMarker(postPtr, self.teamATT)
end

UpdateState()
end
)
end

function ObjectiveBossBattle:Complete(winningTeam)
if not self.multiplayerRules then
--remove all the cp markers
for i, cp in pairs(self.commandPosts) do
MapRemoveEntityMarker(cp.name)
end
end

--then call the default objective complete method
Objective.Complete(self, winningTeam)
end
[/code]
Marth8880
Resistance Leader
Posts: 5042
Joined: Tue Feb 09, 2010 8:43 pm
Projects :: DI2 + Psychosis
Games I'm Playing :: Silent Hill 2
xbox live or psn: Marth8880
Location: Edinburgh, UK
Contact:

Re: How would I make the all the enemy AI target the player?

Post by Marth8880 »

Wait, is this just ObjectiveConquest but with a different name?
LitFam
Sergeant Major
Sergeant Major
Posts: 234
Joined: Sat Feb 04, 2017 5:52 pm
Games I'm Playing :: SWBF II 2005
xbox live or psn: No gamertag set
Location: Milky Way, Solar System, Earth, Antarctica

Re: How would I make the all the enemy AI target the player?

Post by LitFam »

Yes, I did not have any other way of doing the game mode. Every time I used the stock read script the AI did nothing (meaning they just stood there)
Marth8880
Resistance Leader
Posts: 5042
Joined: Tue Feb 09, 2010 8:43 pm
Projects :: DI2 + Psychosis
Games I'm Playing :: Silent Hill 2
xbox live or psn: Marth8880
Location: Edinburgh, UK
Contact:

Re: How would I make the all the enemy AI target the player?

Post by Marth8880 »

Code: Select all

   ClearAIGoals(1)
   AddAIGoal(1,"Defend", 100, 0)
   AddAIGoal(1,"Destroy", 100, cis_walk_tridroid_boss)
   ClearAIGoals(2)
   goalKillPlayer = AddAIGoal(2,"Destroy", 0)
   --DeleteAIGoal(goalKillPlayer)
Well in any regard, you'll want to put all of that^ goal stuff under surv:Start(), since surv:Start() does goal work on its own. It should look something more like this:

Code: Select all

    --This adds the CPs to the objective.  This needs to happen after the objective is set up
    surv:AddCommandPost(bo1)
   surv:AddCommandPost(bo2)
    
    surv:Start()


   ClearAIGoals(1)
   AddAIGoal(1,"Defend", 100, 0)
   AddAIGoal(1,"Destroy", 100, cis_walk_tridroid_boss)
   ClearAIGoals(2)
   goalKillPlayer = AddAIGoal(2,"Destroy", 0)
   --DeleteAIGoal(goalKillPlayer)
LitFam
Sergeant Major
Sergeant Major
Posts: 234
Joined: Sat Feb 04, 2017 5:52 pm
Games I'm Playing :: SWBF II 2005
xbox live or psn: No gamertag set
Location: Milky Way, Solar System, Earth, Antarctica

Re: How would I make the all the enemy AI target the player?

Post by LitFam »

No AI spawn

my new updated .lua
Hidden/Spoiler:
[code]--
-- Copyright (c) 2005 Pandemic Studios, LLC. All rights reserved.
--

-- load the gametype script
ScriptCB_DoFile("ObjectiveBossBattle")
ScriptCB_DoFile("setup_teams")

-- CIS Attacking (attacker is always #1)
REP = 1;
CIS = 2;

-- These variables do not change
ATT = REP;
DEF = CIS;

function ScriptPostLoad()

-- This would go into ScriptPostLoad()
-- and you would have one for each team capturing CPs

--This defines the CPs. These need to happen first
bo1 = CommandPost:New{name = "bo1"}
bo2 = CommandPost:New{name = "bo2"}

--This sets up the actual objective. This needs to happen after cp's are defined
surv = ObjectiveBossBattle:New{teamATT = ATT, teamDEF = DEF,
textATT = "game.modes.surv",
textDEF = "game.modes.surv2",
modename = "modename.description.surv",
multiplayerRules = true}

--This adds the CPs to the objective. This needs to happen after the objective is set up
surv:AddCommandPost(bo1)
surv:AddCommandPost(bo2)

surv:Start()

ClearAIGoals(1)
AddAIGoal(1,"Defend", 100, 0)
AddAIGoal(1,"Destroy", 100, cis_walk_tridroid_boss)
ClearAIGoals(2)
goalKillPlayer = AddAIGoal(2,"Destroy", 0)
--DeleteAIGoal(goalKillPlayer)

ForceHumansOntoTeam1(0)

DisableAIAutoBalance()
SetAIDifficulty(10,10,"easy")
SetAIDifficulty(10,10,"medium")
SetAIDifficulty(10,10,"hard")
SetTeamAggressiveness(CIS, 1.0)
SetTeamAggressiveness(REP, 1.0)
SetDefenderSnipeRange(170)
SetAttackerSnipeRange(170)

BlockPlanningGraphArcs("Connection1");
BlockPlanningGraphArcs("Connection2");
BlockPlanningGraphArcs("Connection3");
BlockPlanningGraphArcs("Connection4");
BlockPlanningGraphArcs("Connection5");
BlockPlanningGraphArcs("Connection6");
BlockPlanningGraphArcs("Connection7");
BlockPlanningGraphArcs("Connection8");
BlockPlanningGraphArcs("Connection9");
BlockPlanningGraphArcs("Connection10");
BlockPlanningGraphArcs("Connection11");
BlockPlanningGraphArcs("Connection12");
BlockPlanningGraphArcs("Connection13");
BlockPlanningGraphArcs("Connection14");
BlockPlanningGraphArcs("Connection15");
BlockPlanningGraphArcs("Connection16");
BlockPlanningGraphArcs("Connection17");
BlockPlanningGraphArcs("Connection18");
BlockPlanningGraphArcs("Connection19");
BlockPlanningGraphArcs("Connection20");
BlockPlanningGraphArcs("Connection21");
BlockPlanningGraphArcs("Connection22");
BlockPlanningGraphArcs("Connection23");
BlockPlanningGraphArcs("Connection24");

AddDeathRegion("deathregion1")
AddDeathRegion("deathregion2")
AddDeathRegion("deathregion3")
AddDeathRegion("deathregion4")

SetUberMode(1);

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("dc:Load\\load1.lvl")

ReadDataFile("ingame.lvl")

SetMaxFlyHeight(300)
SetMaxPlayerFlyHeight (300)

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\\CHR.lvl")
ReadDataFile("dc:sound\\UW2.lvl;UW2cw")
ReadDataFile("sound\\yav.lvl;yav1cw")

ReadDataFile("SIDE\\cis.lvl",
"cis_inf_rifleman",
"cis_inf_rocketeer",
"cis_inf_engineer",
"cis_inf_sniper",
"cis_inf_officer",
"cis_inf_droideka",
"cis_hero_darthmaul")

ReadDataFile("SIDE\\rep.lvl",
"rep_inf_ep3_rifleman",
"rep_inf_ep3_rocketeer",
"rep_inf_ep3_engineer",
"rep_inf_ep3_sniper",
"rep_inf_ep3_officer",
"rep_inf_ep3_jettrooper",
"rep_hero_anakin")

ReadDataFile("dc:Load\\load2.lvl")

ReadDataFile("dc:SIDE\\rep.lvl",
"rep_inf_clone_trooper_C_boss",
"cis_walk_tridroid_boss",
"cis_inf_battle_droid_A")

SetupTeams{

cis = {
team = CIS,
units = 30,
reinforcements = -1,
soldier = {"cis_inf_battle_droid_A",30,30},

},

rep = {
team = REP,
units = 1,
reinforcements = 1,
soldier = {"rep_inf_clone_trooper_C_boss",1,1},

},

}

-- Level Stats
-- ClearWalkers()
AddWalkerType(0, 25) -- special -> droidekas
AddWalkerType(1, 25) -- 1x2 (1 pair of legs)
AddWalkerType(2, 25) -- 2x2 (2 pairs of legs)
AddWalkerType(3, 25) -- 3x2 (3 pairs of legs)

local weaponCnt = 1024
SetMemoryPoolSize("Aimer", 75)
SetMemoryPoolSize("AmmoCounter", weaponCnt)
SetMemoryPoolSize("BaseHint", 1024)
SetMemoryPoolSize("EnergyBar", weaponCnt)
SetMemoryPoolSize("EntityCloth", 32)
SetMemoryPoolSize("EntityFlyer", 32)
SetMemoryPoolSize("EntityHover", 32)
SetMemoryPoolSize("EntityLight", 200)
SetMemoryPoolSize("EntitySoundStream", 4)
SetMemoryPoolSize("EntitySoundStatic", 32)
SetMemoryPoolSize("MountedTurret", 32)
SetMemoryPoolSize("Navigator", weaponCnt)
SetMemoryPoolSize("Obstacle", 1024)
SetMemoryPoolSize("PathNode", 1024)
SetMemoryPoolSize("SoundSpaceRegion", 64)
SetMemoryPoolSize("TreeGridStack", 1024)
SetMemoryPoolSize("UnitAgent", weaponCnt)
SetMemoryPoolSize("UnitController", weaponCnt)
SetMemoryPoolSize("Weapon", weaponCnt)
SetMemoryPoolSize("Music",33)
SetMemoryPoolSize("SoldierAnimation",656)
SetMemoryPoolSize("PathFollower",weaponCnt)
SetMemoryPoolSize("FLEffectObject::OffsetMatrix",2000)
SetMemoryPoolSize("ParticleTransformer::ColorTrans",1648)
SetMemoryPoolSize("ParticleTransformer::PositionTr",2000)
SetMemoryPoolSize("ParticleTransformer::SizeTransf",1165)

SetSpawnDelay(10.0, 0.25)
--ReadDataFile("dc:CHR\\CHR.lvl", "CHR_death")
ReadDataFile("dc:CHR\\CHR.lvl", "CHR_death")
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\\CHR.lvl", "CHR_S")
OpenAudioStream("sound\\yav.lvl", "yav1")
OpenAudioStream("sound\\yav.lvl", "yav1")
--OpenAudioStream("sound\\yav.lvl", "yav1_emt")

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

SetOutOfBoundsVoiceOver(2, "cisleaving")
SetOutOfBoundsVoiceOver(1, "repleaving")

SetAmbientMusic(REP, 1.0, "Christophsis_Soundtrack", 0,1)
--SetAmbientMusic(REP, 0.8, "rep_yav_amb_middle", 1,1)
--SetAmbientMusic(REP, 0.2, "rep_yav_amb_end", 2,1)
SetAmbientMusic(CIS, 1.0, "Christophsis_Soundtrack", 0,1)
--SetAmbientMusic(CIS, 0.8, "cis_yav_amb_middle", 1,1)
--SetAmbientMusic(CIS, 0.2, "cis_yav_amb_end", 2,1)

SetVictoryMusic(REP, "rep_yav_amb_victory")
SetDefeatMusic (REP, "rep_yav_amb_defeat")
SetVictoryMusic(CIS, "cis_yav_amb_victory")
SetDefeatMusic (CIS, "cis_yav_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
AddCameraShot(0.716522, -0.015740, 0.697219, 0.015316, 511.727753, 14.296076, 2.373827);
end[/code]
Marth8880
Resistance Leader
Posts: 5042
Joined: Tue Feb 09, 2010 8:43 pm
Projects :: DI2 + Psychosis
Games I'm Playing :: Silent Hill 2
xbox live or psn: Marth8880
Location: Edinburgh, UK
Contact:

Re: How would I make the all the enemy AI target the player?

Post by Marth8880 »

Post the BFront2.log please.

It would also be helpful if you could go in-game in the debugger, type `aigoals` into the console (without quotes), press enter, then post a screenshot of the output.
LitFam
Sergeant Major
Sergeant Major
Posts: 234
Joined: Sat Feb 04, 2017 5:52 pm
Games I'm Playing :: SWBF II 2005
xbox live or psn: No gamertag set
Location: Milky Way, Solar System, Earth, Antarctica

Re: How would I make the all the enemy AI target the player?

Post by LitFam »

LOG:
Hidden/Spoiler:
[code]Opened logfile BFront2.log 2017-08-18 1542
shell_interface: Entered
shell_interface: gPlatformStr, gOnlineServiceStr, gLangStr, gLangEnum: PC GameSpy english 0
ifs_era_handler - Entered
ifs_era_handler - Exited
shell_interface: No custom_gc_0.lvl
shell_interface: No custom_gc_1.lvl
shell_interface: No custom_gc_2.lvl
shell_interface: No custom_gc_3.lvl
shell_interface: No custom_gc_4.lvl
shell_interface: No custom_gc_5.lvl
shell_interface: No custom_gc_6.lvl
shell_interface: No custom_gc_7.lvl
shell_interface: No custom_gc_8.lvl
shell_interface: No custom_gc_9.lvl
shell_interface: Found custom_gc_10.lvl
custom_gc_10: Entered
custom_gc_10: No custom_gc_11.lvl. Will stop searching for any more cGC scripts.
custom_gc_10: Exited
custom_EraButtonList(): Finished building era button table Known eras buttons: 28
custom_GetGMapEras(): Finished building era table Known eras: 28
custom_GetGMapModes(): Finished building game mode table Known Modes: 39
custom_GetMPGameModeList(): Finished building game mode list table List Length: 40
custom_SetMovieLocation()
custom_GetGCButtonList()
custom_SetMovieLocation()
custom_GetFreeformBattleModeList(): Finished building freeform battle mode list Known Modes: 39
ingame stream movies\crawl.mvs
shell_interface: Opening movie: movies\shell.mvs
shell_interface: Leaving
Mission Checker: Entered addme
Mission Checker: addme: Now listening in on AddDownloadableContent() calls
Mission Checker: Exited addme
prev = none iLastPage = nil
prev = texture iLastPage = 1
prev = texture iLastPage = 2
prev = texture iLastPage = 3
ifs_legal.Exit

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\GameMovie.cpp(399)
Unable to find open movie segment shell_main

ifs_saveop_DoOps LoadFileList
ifs_saveop_DoOps LoadFileList
ifs_saveop_DoOps LoadProfile
ifs_saveop_DoOps LoadProfile
ifs_sp_campaign: Input_Accept(): Entered: _tab_instant
missionlist_ExpandMapList()
ifs_missionselect_pcMulti_fnSetMapPreview(): Defaulting index to 1
this.CurButton = check_mode31
cur_button = nil
Checkbox for check_era3 clicked
this.CurButton = check_era3
cur_button = nil
this.CurButton = nil
cur_button = nil
custom_AddMapNew()
custom_printTable(): table: 0662A18C
The key, value is: change table: 0662A26C
The key, value is: era_c 1
The key, value is: mode_con_c 1
The key is mapluafile, the formated value is: CHR<A>_<B>
The key, value is: mode_surv_c 1
The key, value is: bSelected 1
The key, value is: isModLevel 1
custom_printTable(): Returning
custom_printTable(): table: 0662F72C
The key, value is: key mode_con
The key, value is: subst con
The key, value is: showstr modename.name.con
The key, value is: descstr modename.description.con
The key, value is: icon mode_icon_con
custom_printTable(): Returning
gMapEras.key = era_c Era = era_c subst = c
Adding map: CHRc_surv idx: 1
this.CurButton = _map_add
cur_button = nil
this.CurButton = Launch
cur_button = nil

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\HUDElementBitmap.cpp(380)
HUD BitmapElement unable to find texture hud_target_hint_offscreen

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\HUDElementBitmap.cpp(380)
HUD BitmapElement unable to find texture hud_target_hint_offscreen

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\HUDElementBitmap.cpp(380)
HUD BitmapElement unable to find texture btn_directional_pad_LR
game_interface: Entered
utility_functions2: Listening on AddUnitClass() calls
utility_functions2: Listening on SetHeroClass() calls
utility_functions2: Listening on ReadDataFile() calls
game_interface: Reading in custom strings
game_interface: No user_script_0.lvl
game_interface: No user_script_1.lvl
game_interface: No user_script_2.lvl
game_interface: No user_script_3.lvl
game_interface: No user_script_4.lvl
game_interface: No user_script_5.lvl
game_interface: No user_script_6.lvl
game_interface: No user_script_7.lvl
game_interface: No user_script_8.lvl
game_interface: No user_script_9.lvl
game_interface: Found user_script_10.lvl
user_script_10: Entered
user_script_10: Replacing v1.3 (r117)'s AddUnitClass as it should've had a return value. This fixes the Leia bug.
user_script_10: No user_script_11.lvl. Will stop searching for any more user scripts.
user_script_10: Exited
ifs_sideselect_fnBuildScreen()
game_interface: Exited

Message Severity: 2
C:\Battlefront2\main\RedEngineFL\Memory\RedMemoryPool.cpp(317)
Memory pool "ClothData" set item count after being allocated

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\VOHelper.cpp(183)
VOSound (cis1_inf_pc_com_hostile_inVehicle): unknown modifier "InVehicle"

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\VOHelper.cpp(183)
VOSound (cis1_inf_pc_com_bacta_inVehicle): unknown modifier "InVehicle"

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\VOHelper.cpp(183)
VOSound (cis1_inf_pc_com_mechanic_inVehicle): unknown modifier "InVehicle"

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\VOHelper.cpp(183)
VOSound (cis1_inf_pc_com_ammo_inVehicle): unknown modifier "InVehicle"

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\VOHelper.cpp(183)
VOSound (cis1_inf_pc_com_transport_inVehicle): unknown modifier "InVehicle"

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\VOHelper.cpp(183)
VOSound (cis1_inf_pc_com_backup_inVehicle): unknown modifier "InVehicle"

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\VOHelper.cpp(183)
VOSound (cis1_inf_pc_com_clear_area_inVehicle): unknown modifier "InVehicle"

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\VOHelper.cpp(183)
VOSound (cis1_inf_pc_com_defend_inVehicle): unknown modifier "InVehicle"

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\VOHelper.cpp(183)
VOSound (cis1_inf_pc_com_hostile_inVehicle): unknown modifier "InVehicle"

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\VOHelper.cpp(183)
VOSound (cis1_inf_pc_com_bacta_inVehicle): unknown modifier "InVehicle"

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\VOHelper.cpp(183)
VOSound (cis1_inf_pc_com_mechanic_inVehicle): unknown modifier "InVehicle"

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\VOHelper.cpp(183)
VOSound (cis1_inf_pc_com_ammo_inVehicle): unknown modifier "InVehicle"

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\VOHelper.cpp(183)
VOSound (cis1_inf_pc_com_transport_inVehicle): unknown modifier "InVehicle"

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\VOHelper.cpp(183)
VOSound (cis1_inf_pc_com_backup_inVehicle): unknown modifier "InVehicle"

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\VOHelper.cpp(183)
VOSound (cis1_inf_pc_com_clear_area_inVehicle): unknown modifier "InVehicle"

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\VOHelper.cpp(183)
VOSound (cis1_inf_pc_com_defend_inVehicle): unknown modifier "InVehicle"

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\FLEffect.cpp(214)
FLEffect::Read: duplicate effect class name (5f518933)!

Message Severity: 3
C:\Battlefront2\main\Battlefront2\Source\Explosion.cpp(323)
Explosion "cis_weap_inf_thermaldetonator_e" missing effect "1p4_weap_inf_thermal_explosion"

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\EntityGeometry.cpp(1058)
Entity "com_weap_veh_guided_rocket_ord" unknown terrain collision "p_front_sphere"

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\EntityGeometry.cpp(1073)
Entity "com_weap_veh_guided_rocket_ord" unknown vehicle collision "p_front_sphere"

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\EntityGeometry.cpp(1065)
Entity "com_weap_veh_guided_rocket_ord" unknown building collision "p_front_sphere"

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\EntityGeometry.cpp(1051)
Entity "com_weap_veh_guided_rocket_ord" unknown targetable collision "CollisionMesh"

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\EntityGeometry.cpp(1058)
Entity "com_weap_award_rocket_launcher_" unknown terrain collision "p_front_sphere"

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\EntityGeometry.cpp(1073)
Entity "com_weap_award_rocket_launcher_" unknown vehicle collision "p_front_sphere"

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\EntityGeometry.cpp(1065)
Entity "com_weap_award_rocket_launcher_" unknown building collision "p_front_sphere"

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\EntityGeometry.cpp(1051)
Entity "com_weap_award_rocket_launcher_" unknown targetable collision "CollisionMesh"

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\VOHelper.cpp(183)
VOSound (cis1_inf_pc_com_hostile_inVehicle): unknown modifier "InVehicle"

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\VOHelper.cpp(183)
VOSound (cis1_inf_pc_com_bacta_inVehicle): unknown modifier "InVehicle"

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\VOHelper.cpp(183)
VOSound (cis1_inf_pc_com_mechanic_inVehicle): unknown modifier "InVehicle"

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\VOHelper.cpp(183)
VOSound (cis1_inf_pc_com_ammo_inVehicle): unknown modifier "InVehicle"

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\VOHelper.cpp(183)
VOSound (cis1_inf_pc_com_transport_inVehicle): unknown modifier "InVehicle"

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\VOHelper.cpp(183)
VOSound (cis1_inf_pc_com_backup_inVehicle): unknown modifier "InVehicle"

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\VOHelper.cpp(183)
VOSound (cis1_inf_pc_com_clear_area_inVehicle): unknown modifier "InVehicle"

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\VOHelper.cpp(183)
VOSound (cis1_inf_pc_com_defend_inVehicle): unknown modifier "InVehicle"

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\FLEffect.cpp(214)
FLEffect::Read: duplicate effect class name (5f518933)!

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\FLEffect.cpp(214)
FLEffect::Read: duplicate effect class name (3f2ed166)!

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\VOHelper.cpp(183)
VOSound (cis1_inf_pc_com_hostile_inVehicle): unknown modifier "InVehicle"

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\VOHelper.cpp(183)
VOSound (cis1_inf_pc_com_bacta_inVehicle): unknown modifier "InVehicle"

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\VOHelper.cpp(183)
VOSound (cis1_inf_pc_com_mechanic_inVehicle): unknown modifier "InVehicle"

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\VOHelper.cpp(183)
VOSound (cis1_inf_pc_com_ammo_inVehicle): unknown modifier "InVehicle"

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\VOHelper.cpp(183)
VOSound (cis1_inf_pc_com_transport_inVehicle): unknown modifier "InVehicle"

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\VOHelper.cpp(183)
VOSound (cis1_inf_pc_com_backup_inVehicle): unknown modifier "InVehicle"

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\VOHelper.cpp(183)
VOSound (cis1_inf_pc_com_clear_area_inVehicle): unknown modifier "InVehicle"

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\VOHelper.cpp(183)
VOSound (cis1_inf_pc_com_defend_inVehicle): unknown modifier "InVehicle"

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\FLEffect.cpp(214)
FLEffect::Read: duplicate effect class name (5f518933)!

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\VOHelper.cpp(183)
VOSound (cis1_inf_pc_com_hostile_inVehicle): unknown modifier "InVehicle"

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\VOHelper.cpp(183)
VOSound (cis1_inf_pc_com_bacta_inVehicle): unknown modifier "InVehicle"

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\VOHelper.cpp(183)
VOSound (cis1_inf_pc_com_mechanic_inVehicle): unknown modifier "InVehicle"

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\VOHelper.cpp(183)
VOSound (cis1_inf_pc_com_ammo_inVehicle): unknown modifier "InVehicle"

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\VOHelper.cpp(183)
VOSound (cis1_inf_pc_com_transport_inVehicle): unknown modifier "InVehicle"

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\VOHelper.cpp(183)
VOSound (cis1_inf_pc_com_backup_inVehicle): unknown modifier "InVehicle"

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\VOHelper.cpp(183)
VOSound (cis1_inf_pc_com_clear_area_inVehicle): unknown modifier "InVehicle"

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\VOHelper.cpp(183)
VOSound (cis1_inf_pc_com_defend_inVehicle): unknown modifier "InVehicle"

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\FLEffect.cpp(214)
FLEffect::Read: duplicate effect class name (5f518933)!

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\EntityGeometry.cpp(1065)
Entity "com_weap_inf_remotedroid_ord" unknown building collision "p_buildingsphere"

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\EntityGeometry.cpp(1073)
Entity "com_weap_inf_remotedroid_ord" unknown vehicle collision "p_buildingsphere"

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\EntityGeometry.cpp(1089)
Entity "com_weap_inf_remotedroid_ord" unknown ordnance collision "p_sphere"

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\EntityGeometry.cpp(1081)
Entity "com_weap_inf_remotedroid_ord" unknown soldier collision "p_sphere"

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\VOHelper.cpp(183)
VOSound (cis1_inf_pc_com_hostile_inVehicle): unknown modifier "InVehicle"

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\VOHelper.cpp(183)
VOSound (cis1_inf_pc_com_bacta_inVehicle): unknown modifier "InVehicle"

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\VOHelper.cpp(183)
VOSound (cis1_inf_pc_com_mechanic_inVehicle): unknown modifier "InVehicle"

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\VOHelper.cpp(183)
VOSound (cis1_inf_pc_com_ammo_inVehicle): unknown modifier "InVehicle"

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\VOHelper.cpp(183)
VOSound (cis1_inf_pc_com_transport_inVehicle): unknown modifier "InVehicle"

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\VOHelper.cpp(183)
VOSound (cis1_inf_pc_com_backup_inVehicle): unknown modifier "InVehicle"

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\VOHelper.cpp(183)
VOSound (cis1_inf_pc_com_clear_area_inVehicle): unknown modifier "InVehicle"

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\VOHelper.cpp(183)
VOSound (cis1_inf_pc_com_defend_inVehicle): unknown modifier "InVehicle"

Message Severity: 3
C:\Battlefront2\main\Battlefront2\Source\HUDManager.cpp(619)
HUD unable to find HUD element type 0x16ce484a

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\FLEffect.cpp(214)
FLEffect::Read: duplicate effect class name (d6c288e8)!

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\FLEffect.cpp(214)
FLEffect::Read: duplicate effect class name (6616778a)!

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\FLEffect.cpp(214)
FLEffect::Read: duplicate effect class name (ef255e37)!

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\FLEffect.cpp(214)
FLEffect::Read: duplicate effect class name (c3a9860f)!

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\VOHelper.cpp(183)
VOSound (rep1_inf_pc_com_hostile_inVehicle): unknown modifier "InVehicle"

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\VOHelper.cpp(183)
VOSound (rep1_inf_pc_com_bacta_inVehicle): unknown modifier "InVehicle"

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\VOHelper.cpp(183)
VOSound (rep1_inf_pc_com_mechanic_inVehicle): unknown modifier "InVehicle"

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\VOHelper.cpp(183)
VOSound (rep1_inf_pc_com_ammo_inVehicle): unknown modifier "InVehicle"

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\VOHelper.cpp(183)
VOSound (rep1_inf_pc_com_transport_inVehicle): unknown modifier "InVehicle"

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\VOHelper.cpp(183)
VOSound (rep1_inf_pc_com_backup_inVehicle): unknown modifier "InVehicle"

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\VOHelper.cpp(183)
VOSound (rep1_inf_pc_com_clear_area_inVehicle): unknown modifier "InVehicle"

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\VOHelper.cpp(183)
VOSound (rep1_inf_pc_com_defend_inVehicle): unknown modifier "InVehicle"

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\FLEffect.cpp(214)
FLEffect::Read: duplicate effect class name (3f2ed166)!

Message Severity: 3
C:\Battlefront2\main\Battlefront2\Source\Explosion.cpp(323)
Explosion "rep_weap_inf_thermaldetonator_e" missing effect "1p4_weap_inf_thermal_explosion"

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\FLEffect.cpp(214)
FLEffect::Read: duplicate effect class name (3f2ed166)!

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\FLEffect.cpp(214)
FLEffect::Read: duplicate effect class name (3f2ed166)!

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\FLEffect.cpp(214)
FLEffect::Read: duplicate effect class name (3f2ed166)!

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\GameModel.cpp(221)
Model "com_inv_mesh" already loaded in ather level file

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\CollisionBody.cpp(250)
Duplicate collisionbodyprimitive exists in another level file: e4e0b19e

Message Severity: 3
C:\Battlefront2\main\Battlefront2\Source\HUDManager.cpp(619)
HUD unable to find HUD element type 0x16ce484a

Message Severity: 3
C:\Battlefront2\main\Battlefront2\Source\EntitySoldier.cpp(11349)
Unrecognized UnitType "NONE" in soldier "cis_inf_battle_droid_A_default"

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\VOHelper.cpp(183)
VOSound (cis1_inf_pc_com_hostile_inVehicle): unknown modifier "InVehicle"

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\VOHelper.cpp(183)
VOSound (cis1_inf_pc_com_bacta_inVehicle): unknown modifier "InVehicle"

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\VOHelper.cpp(183)
VOSound (cis1_inf_pc_com_mechanic_inVehicle): unknown modifier "InVehicle"

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\VOHelper.cpp(183)
VOSound (cis1_inf_pc_com_ammo_inVehicle): unknown modifier "InVehicle"

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\VOHelper.cpp(183)
VOSound (cis1_inf_pc_com_transport_inVehicle): unknown modifier "InVehicle"

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\VOHelper.cpp(183)
VOSound (cis1_inf_pc_com_backup_inVehicle): unknown modifier "InVehicle"

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\VOHelper.cpp(183)
VOSound (cis1_inf_pc_com_clear_area_inVehicle): unknown modifier "InVehicle"

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\VOHelper.cpp(183)
VOSound (cis1_inf_pc_com_defend_inVehicle): unknown modifier "InVehicle"

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\VOHelper.cpp(183)
VOSound (rep1_inf_pc_com_hostile_inVehicle): unknown modifier "InVehicle"

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\VOHelper.cpp(183)
VOSound (rep1_inf_pc_com_bacta_inVehicle): unknown modifier "InVehicle"

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\VOHelper.cpp(183)
VOSound (rep1_inf_pc_com_mechanic_inVehicle): unknown modifier "InVehicle"

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\VOHelper.cpp(183)
VOSound (rep1_inf_pc_com_ammo_inVehicle): unknown modifier "InVehicle"

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\VOHelper.cpp(183)
VOSound (rep1_inf_pc_com_transport_inVehicle): unknown modifier "InVehicle"

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\VOHelper.cpp(183)
VOSound (rep1_inf_pc_com_backup_inVehicle): unknown modifier "InVehicle"

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\VOHelper.cpp(183)
VOSound (rep1_inf_pc_com_clear_area_inVehicle): unknown modifier "InVehicle"

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\VOHelper.cpp(183)
VOSound (rep1_inf_pc_com_defend_inVehicle): unknown modifier "InVehicle"

Message Severity: 2
C:\Battlefront2\main\RedEngineFL\Memory\RedMemoryPool.cpp(170)
Memory pool "ParticleTransformer::SizeTransf" is full; raise count to at least 1027

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\GameModel.cpp(221)
Model "com_inv_mesh" already loaded in ather level file

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\CollisionBody.cpp(250)
Duplicate collisionbodyprimitive exists in another level file: e4e0b19e

Message Severity: 3
C:\Battlefront2\main\Battlefront2\Source\HUDManager.cpp(619)
HUD unable to find HUD element type 0x16ce484a
uf_updateClassIndex(): Added class: rep_inf_clone_trooper_C_boss
uf_updateClassIndex(): Added class: cis_inf_battle_droid_A

Message Severity: 2
C:\Battlefront2\main\RedEngineFL\Memory\RedMemoryPool.cpp(317)
Memory pool "Music" set item count after being allocated

Message Severity: 2
C:\Battlefront2\main\RedEngineFL\Memory\RedMemoryPool.cpp(317)
Memory pool "ParticleTransformer::ColorTrans" set item count after being allocated

Message Severity: 2
C:\Battlefront2\main\RedEngineFL\Memory\RedMemoryPool.cpp(317)
Memory pool "ParticleTransformer::PositionTr" set item count after being allocated

Message Severity: 2
C:\Battlefront2\main\RedEngineFL\Memory\RedMemoryPool.cpp(317)
Memory pool "ParticleTransformer::SizeTransf" set item count after being allocated
utility_functions2: ReadDataFile(): This map's code, mode: chr chr_death

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\SkyManager.cpp(108)
Skyfile NearSceneRange is in old format

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\SkyManager.cpp(122)
Skyfile FarSceneRange is in old format

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\Weapon.cpp(82)
Weapon 'cis_weap_walk_tridroid_boss_las' is not localized for stats page

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\LuaCallbacks_Mission.cpp(635)
Entity "0" not found

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\AIGoalManager.cpp(259)
Invalid goal target for "Destroy" goal (team 1, weight 0)

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\AIGoalManager.cpp(234)
Trying to add an AI goal for team 2 with weight 0. This will no nothing, and guys might be standing around.

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\TriggerRegionManager.cpp(233)
Region deathregion1 not found
[/code]
Marth8880
Resistance Leader
Posts: 5042
Joined: Tue Feb 09, 2010 8:43 pm
Projects :: DI2 + Psychosis
Games I'm Playing :: Silent Hill 2
xbox live or psn: Marth8880
Location: Edinburgh, UK
Contact:

Re: How would I make the all the enemy AI target the player?

Post by Marth8880 »

Ohhh, I see the problem.

Code: Select all

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\AIGoalManager.cpp(259)
Invalid goal target for "Destroy" goal (team 1, weight 0)

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\AIGoalManager.cpp(234)
Trying to add an AI goal for team 2 with weight 0.  This will no nothing, and guys might be standing around.
I made a mistake with the code I told you to use; I forgot to specify the goal weight. Here's what it should be instead:

Code: Select all

goalKillPlayer = AddAIGoal(enemyTeamID, "Destroy", 100, 0)
As per the documentation:

Code: Select all

AddAIGoal( team, goaltype, weight, target1 )
Post Reply