From the top of my head i can think of at least two solutions to your problems.
-
What Matthias Hölzl said. You dont have to come out of the Task unless you feel you acheived (or failed) what it is you wanted. You can do checks inside the task and when you want the task to complete you can simply return FinishExecute with either True or False.
-
You can add a service to that task node (or to a selector above it) checking condition again and again. If condition is not met yet, you can keep running task. if it is met, mark “Abort self” and it will abort itself and move to a different node.
Thats what i would do.
i might not understand the problem correctly. if i didnt, let me know and ill try to help more.
All the best