How do I kill a combatant so it looks like it's been killed by damage and on death it goes through all the proper channels (rewards, XPs, trigger health status value change schematics...)

I am currently using this but doesn't seem to work across the board...
combatant.Status.Death();
  • That's generally the way to do it - but if the combatant wasn't yet attacked by the player, it'll not give exp, loot, etc.

    You can register the player to have attacked the combatant like this:
    combatant.Battle.SetAttackedBy(ORK.Game.ActiveGroup.Leader, true);


    However, calling Death just kills immediately without doing the status changes, so if you really want to kill via health, you need to do such a status change, e.g.:
    combatant.Status[index].SetValue(0, false, true, true, true, true, null);
    This sets the status value index (i.e. the ID/index of the status value in the editor list) to 0, ignoring any change limits, barriers, etc. and shows flying text/console texts.
    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 Nicholas!
Sign In or Register to comment.