I'm trying to create a threat/aggro system using battle statistics.

My current setup is:
Use Statistics X
Per Combatant X
Battle Reset X

Statistic Key: Threat
Status Value: Health
Decrease Given: X

So I would assume this increases a combatants Threat statistic the more damage they do?

But then in the battle AI I have a "Get Battle Statistic" node and it has the same options in the "Value Source".
So should the value source be the same as the battle statistic has? In this case "Decrease Given"? Or should it be "Increase Given" as in that the combatant who has increased the statistic the most?

Essentially I'm trying to get the combatant who has the highest threat.
  • edited July 7
    You need to use the same as in the battle statistics setup - i.e. for damage to health, you need to check the Decrease Given. Basically, you can have a battle statistic collect all the available changes to a status value and use the value source setting of the node to get the specific thing you want to check for.

    The other settings of the Get Battle Statistic node will also come into play here:

    Use Total Change enabled will use the total damage the combatant did to all combatants. If disabled, only the damage to the user of the battle AI is used.

    Highest/Lowest should be enabled if you want the one with the highest damage output.
    Post edited by gamingislove on
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • Thank you, got it working!
Sign In or Register to comment.