Best way to interrupt an entire sequence? (ConditionalAbort vs ConditionalEvaluator)

caleidon

Member
In the game, a job may have a certain condition that when evaluated could cause the entire job-in-progress to stop immediately.

EXAMPLE: Objective - kill an agent. Every tick we have to evaluate if the agent is dead because he may have been killed by something/someone else, so we want to stop.

In my case, if a "Zone" gets modified I want to cancel this entire job, like so:

Screenshot_1.png

The conditional evaluator "Was Zone Tampered" is evaluating a conditional task "IsZoneTampered" every frame (reevaluate box ticked).

However, I'm wondering if conditional aborts could somehow be used in this scenario because I've read that they have special optimizations with the behavior tree, making it more efficient.

What is the difference between my way as shown here, and using a conditional abort here? Which is better in this case, considering they'd be doing pretty much the exact same thing?
 
There is no "better" approach, it's whatever makes the most sense for your tree structure. If you have the conditional evaluator working then there's no reason to switch to conditional aborts.
 
Top