SetAIDamageThreshold issues

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
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:

SetAIDamageThreshold issues

Post by Marth8880 »

Hey guys. I'm trying to set the AI damage threshold for all active classes, but the game for whatever reason needs to have specific entities named. For example, when I use SetAIDamageThreshold("com_inf_default", 1.25), no changes really occur in-game and I get this in my debug log:

Code: Select all

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\LuaCallbacks_Mission.cpp(635)
Entity "com_inf_default" not found
I really need to be able to set the player's AI damage threshold at the very least, but setting the GameObjectPtr (the first callback argument) to 0 returns the same thing as com_inf_default, so does anybody know how to set the AI damage threshold for all classes? Thanks. :)
User avatar
bobfinkl
Rebel Colonel
Rebel Colonel
Posts: 593
Joined: Sun Jul 13, 2008 9:01 am
Projects :: Lots of unreleased stuff
Games I'm Playing :: Life
xbox live or psn: No gamertag set
Location: The quaint little city gametoast.

Re: SetAIDamageThreshold issues

Post by bobfinkl »

To the best of my knowledge and memory that function doesn't work, your best bet would probably be to activate the reduced damage/increased damage buffs automatically for the player.
User avatar
Locutus
1st Lieutenant
1st Lieutenant
Posts: 420
Joined: Fri Jun 04, 2010 10:08 am
Projects :: Stargate Battlefront Pegasus
Location: Germany
Contact:

Re: SetAIDamageThreshold issues

Post by Locutus »

What exactly does the command do?

I've found LowHealthThreshold as odf parameter for soldiers, maybe you can use that?
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: SetAIDamageThreshold issues

Post by Marth8880 »

It's a multiplier for how much damage AI ordnance/explosions inflict upon a specified entity.

LowHealthThreshold is a sound hook.

Code: Select all

LowHealthSound = "" : Sound which is played and attached to the soldier when the soldier's health drops below LowHealthThreshold. 
LowHealthThreshold = "" : Value between 0...1 which defines when the low health sound will start playing.
Post Reply