Download

Track elapsed time since task triggered in behaviour tree

My behaviour tree currently aborts the enemy attack sequence if the player moves outside of the specified attack range.

Currently the enemy then goes back to it’s chasing state and then repeats the normal attack process.

If the previous attack was aborted, I would like to have a slightly different attack sequence where the enemy will attack without delay once reaching the player again.

Is there any way I can track the time since the last attack task was actually run or maybe track if a sequence was aborted the last time that it ran?