I’ve been trying to understand when the Decorator Nodes “tick” and invoke their conditionals. I want the conditional to fire on some interval or event while a task on it is executing, specifically a “MoveTo” task. What I’ve observed is that the condition will only be executed before the task begins execution and not while it is in an executing state.
I created a subclass of UBTDecorator and overrode the CalculateRawConditionValue member function. I tried overriding the “TickNode” member function but couldn’t figure out how to re-evaluate the conditional from this and have it execute the abort behavior of “Self” I have configured. I could create a custom “MoveTo” task and call or invoke logic to determine if task should complete but that seems like a hack and would rather separate the logic if possible. I also tried a “Simple Parallel” node with a wait task primary to simulate a “tick” but this seems like a hack as well.
What I want to do is have the AI move to the player except if some condition is met such as the player fires back and the AI is close enough, which is controlled by my C++ decorator class shown here. Only solution I’ve found that almost works is the parallel node solution though it sometimes causes a “vibrating AI” glitch that I am still trying to track down.