Hi,
I was seeing a NullRefs in my Behavior Trees because of a conditional abort that triggered too late. I've made a small reproduction of this. The tree kinda looks like this, but then way more complicated:
The Shoot Target has a chance to kill the target, which should make IsTargetAlive return a failure. For this test, pretend that ShootTarget will immediately kill the target. I don't want MoveToTarget to still happen, because there is no target anymore. Unfortunately, MoveToTarget is still called, as you can see in this image.
Is there a way to completely abort the whole left part of the selector until another target is set? I've tried it with interrupt, but I don't understand what it does. This is my attempt:
PerformInterruption is called, but MoveToTarget is still called as well. Also, the whole tree just stops. I would expect it to continue on the right side, but nothing happens. I don't get it why this stops the whole tree, even though I have a Repeater set to repeat forever.
Can someone help me out? Thanks in advance.
I was seeing a NullRefs in my Behavior Trees because of a conditional abort that triggered too late. I've made a small reproduction of this. The tree kinda looks like this, but then way more complicated:
The Shoot Target has a chance to kill the target, which should make IsTargetAlive return a failure. For this test, pretend that ShootTarget will immediately kill the target. I don't want MoveToTarget to still happen, because there is no target anymore. Unfortunately, MoveToTarget is still called, as you can see in this image.
Is there a way to completely abort the whole left part of the selector until another target is set? I've tried it with interrupt, but I don't understand what it does. This is my attempt:
PerformInterruption is called, but MoveToTarget is still called as well. Also, the whole tree just stops. I would expect it to continue on the right side, but nothing happens. I don't get it why this stops the whole tree, even though I have a Repeater set to repeat forever.
Can someone help me out? Thanks in advance.