Triggering action (attack) once, then waiting in a repeating behavior

DotMeep

New member
Trying to implement a really simple concept, enemy looks for player, enemy sees player, enemy approaches and attacks at intervals until player leaves attack range, then we pursue the player again.

I need a repeater at the start of my branch to account for changes in the WithinDistance task. However, the repeater means that my trigger is getting pushed every tick.

I can't think of any way out of this dilemma. With Repeater in place, any variables I flip in the branch (bools, etc.) are going to be hit every tick. Without the Repeater, the behavior won't update when the player leaves range.

Much appreciated in advance, I'm going to have a lot of questions, I can tell already...

Edit: After a bit of troubleshooting, I'm finding that you really have to think about animations completely differently using these trees. I managed to get it to work using the below tree, but had to create a scripted cooldown-- neither the Wait nor Cooldown tasks were useful here.
 

Attachments

  • Capture.PNG
    Capture.PNG
    84.2 KB · Views: 21
  • Capture.PNG
    Capture.PNG
    50 KB · Views: 21
Last edited:
Top