Hey All!
I’m working on an AI system which is taking advantage of the Damage Amplifier so the main player can deal more damage. When working with the AI dealing damage I’m using the FortCharacter.Damage() function, however it seems to be using the same damage amplifier applied to the main player. In theory, this makes sense as I’m damaging from the instigator of the player which should be dealing a multiplied amount of damage.
Now my approach to fix this was to use the Instigator & Source parameters, however this does not change anything when working with damage. Is this a bug?
var Instigator : ?game_action_instigator = false
var Source : ?game_action_causer = false
set Instigator = option{game_action_instigator[NPCAgent]}
set Source = option{game_action_causer[NPCAgent]}
TargetedCharacter.Damage(damage_args{Instigator := Instigator, Amount := 5.0})
@AquaPlays Thank you for your report! Can you please re-post using the “New Issue” option on the Issues and Bug Reporting forums? Posts with this feature are connected directly into our development team so we can quickly get to them!
For more information, such as how to get the reference ID, please check out the article here: Using the Creative and UEFN Bug Reporting Form
If the instigator and source is false, I’m pretty sure it’s considered Self Damage, which is multiplied by damage amplifiers somehow…
You could try setting the source/instigator to be the ai agent
(InAgent:agent).GetInstigator<native><public>()<transacts>:game_action_instigator
Otherwise you can track if the player has a damage amplifier and divide the final damage amount by the player’s current multiplier
2 Likes
I have tried the AI as the instigator and source but still nothing which I think is where the bug is. however i will admit dividing is quite a clever work around I will look into!