Make BTTask continue in time

OK, I probably wasn’t very clear: You only call Finish Execute once the task is really finished (either successfully or unsuccessfully). But Receive Execute is only called once, when the node starts execution. If you want to have a long-running task do something (without calling a latent function in Receive Execute) you need to implement a Receive Tick event as well. Something like this:

(Please excuse the messy Blueprint.) Here the event Receive Execute only sets up the values, the actual movement is then performed by Receive Tick. The Finish Execute function is only called once the actor is close to its target location. (This movement function is really bad, because it does not animate the actor, etc., but hopefully it illustrates the point.)

1 Like