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).
Let me know if that works for you.
Cheers!
Join us on Discord: https://discord.gg/97q2Rjh
Author
Posts
Viewing 2 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic.
Login
Register
By registering on this website you agree to our Privacy Policy.