Thanks for the detailed explanation.
The way the the SuperActionState works, at least right now, is that it will keep updating for as long as an action in the OnExecute list is updating. Like the node help states ‘The state is Finished as soon as the longest action in the OnEnter list is Finished’. This is done by design since otherwise there would be no other good way to determine when to Finish the state.
So, there are various ways to tackle this.
1. If you add a RunForever action in the OnEnter list, it will work as you expect, but of course the state will never Finish by itself, so any OnFinish transitions will never happen.
2. If getting a callback is what you are after, then it’s probably best (or at least easier) if you use a normal ActionState and check the “Repeat State Actions” (even if there are no actions) and implement the OnStateEnter, OnStateUpdate and OnStateExit in your MonoBehaviours. Doing this will have the same effect as adding a RunForever. It will simply make the state never Finish and always Update up until a transition is made due to some condition.
Let me know if this works for you and of course I’d be glad to hear any suggestions.
Thanks.
Join us on Discord: https://discord.gg/97q2Rjh
Login
Register
By registering on this website you agree to our Privacy Policy.