Weird issue in conditional aborts (maybe bug?)

Amitloaf

New member
I got this:
10.60923: Watcher - Watcher: Push task Idle (Idle, index 50) at stack index 0
10.94257: Watcher - Watcher: Conditional abort with task Looked At (BehaviorDesigner.Runtime.Tasks.Sequence, index 7) because of conditional task Can See (CanSee, index 8) with status Failure
upload_2019-5-16_20-52-35.png

How can it be the LookedAt conditional abort is breaking the Idle task if the result is Failure? I thought abort lower priority only works if it returns success!
It's needless to say that CanSee immediately returns failure and just goes back to the Idle task making it run twice. It also happens for other tasks like Follow.

Can you help?

(Using version 1.6.1)
 
Also - Now i'm having the other thing around - A conditional of lower priotity returns true but doesn't abort the lower priority one. Either i'm missing something or something is really off.
 
Conditional aborts trigger when the conditional status changes from success to failure or from failure to success. A lower priority abort will reevaluate each tick and will abort any branch that is to the right of the task being reevaluated.
 
Yes - why would I want a lower priority abort to abort a task on failure? If it fails obviously it won't be able to get into the higher priority task. Right now this is exactly what happens. It aborts the lower task, evaluates, fails and goes back to the lower task, effectively doing it twice.

Same as with Self abort on success. If it succeeds, why would I want to abort it?
 
You may have a use case where you only want to play a branch if a conditional task returns failure, for example if the object can't see a target. If you want more control over when a task aborts take a look at the RTS sample project - this uses the interrupt/perform interruption tasks and gives you more control over when a task aborts.
 
But then i'll have to flip it anyway, won't I? So it actually returns true. I'm just wondering. I can use the interrupts but it's still weird for me as failure will never go into a task.
 
Also - What's weird for me, is that it didn't switch from Success to Failure. It was on failure immediately when the Idle task started. It might have been returning success before, but it's not on this iteration on Idle
 
Please help.
I sat and played with it for a while and it seems like it involves some sort of bug. It works ok normally but when I have a composite inside another composite when the outer composite is of a lower priority abort type iand the internal is a self abort type, that's when it breaks.
It stands to reason (and also works that way) that self aborts only happen on failure and lower priority aborts only happen ons success but the structure I noted above messes this up and causes false aborts or prevents successes for aborting a lower priority. This is clearly not how it should work when a lower priority abort conditional succeeds but still doesn't abort a lower priority task.

It's like the parent composite loses its state when it doesn't exit normally but being aborted out of, but from an internal composite.
 
If you can record a video of the tree in action I should be able to say but I think things are working properly.

Conditional aborts work when the status changes from failure to success or from success to failure. For more control you'll need to use the Interrupt/Perform Interruption tasks which will allow you to specifically say when a branch should be interrupted.
 
Top