Page 1 of 1

SetAIDamageThreshold issues

Posted: Sat Dec 21, 2013 2:03 pm
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. :)

Re: SetAIDamageThreshold issues

Posted: Sat Dec 21, 2013 6:52 pm
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.

Re: SetAIDamageThreshold issues

Posted: Mon Dec 23, 2013 2:28 pm
by Locutus
What exactly does the command do?

I've found LowHealthThreshold as odf parameter for soldiers, maybe you can use that?

Re: SetAIDamageThreshold issues

Posted: Mon Dec 23, 2013 4:06 pm
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.