I have dynamic selector with conditional child to check if player distance < 15, run sequencer for this enemy to seek player, at the end of sequencer I have one more conditional to check if player distance < 4, if true then run sequencer for this enemy to execute function explode, play animation, and destroy itself.
The problem is when this enemy explode, explosion force pushes player causes player distance to be more than 4, since my explosion animation set to wait until finish, this enemy fails to destroy itself.
Is there a way to make sequencer can’t be interrupted/reevaluate even when im using dynamic selector?
Unfortunately (or fortunately depending on the situation :)), the dynamic selector is designed to work like that (meaning to interrupt everything below it). Based on your tree design, you could probably add another condition on the right dynamic selector branch to also check a boolean variable like ‘isExploding’ and set the conditions to “ANY TRUE”. So the conditions will look like ‘if Distance < 15 to $Player OR $isExploding’.
Then of course you will also need to set that $isExploding variable somewhere (probably next to the ‘Self.Explode() action task).