Attack targetβs attacker (if there is one)
Target is the owner in this case
If target is hostile and agent is aware of target, do the hostile tree and
stop the current BehaviorTree
Run the Idle BehaviorTree
if owned, do the pet tree and stop the current BehaviorTree
If the target is an ItemDrop, go pick it up
If there are nearby downed allies, save them.
If the agent has a target, do the target tree, else do the idle tree
If too far away, then follow the target
Handle action requests from rtsim, such as talking to NPCs or attacking
Handle timed events, like looking at the player we are talking to
Try to heal self if our damage went below a certain threshold
Hurt utterances at random upon receiving damage
If in gliding, properly maintain it
If on ground, unwield glider
If on fire and able, stop, drop, and roll
If falling velocity is critical, throw everything
and save yourself!
Set owner if no target
Target an entity thatβs attacking us if the attack was recent and we have
a health component
If target is dead, forget them