Hi.
In some of my dialogue nodes, I have sequences that call AnimatorPlay.
But I'm also using the DIalogue System Events on the Dialogue Manager, and the OnConversationEnd() invokes an event.
The thing is that when I have an AnimatorPlay on the last node of a conversation, I found that the OnConversationEnd is being invoked before the AnimatorPlay (first the conversation ends, and after that, the AnimationPlay is run), which seems counter intuitive to me. Am I doing something wrong?
If this is normal, is there a way to force the AnimatorPlay on the last node to run before the OnConversationEnd event is invoked?
Thanks.
Code in "sequence" running after OnConversationEnd()
-
- Posts: 40
- Joined: Mon May 24, 2021 7:22 pm
Re: Code in "sequence" running after OnConversationEnd()
Hi,
All sequencer commands should run before the OnConversationEnd event occurs. Is it possible that the animator is just in the process of transitioning to the requested animator state?
If you want the last node to wait for the animation to finish before the conversation ends, you can use AnimatorPlayWait() instead.
All sequencer commands should run before the OnConversationEnd event occurs. Is it possible that the animator is just in the process of transitioning to the requested animator state?
If you want the last node to wait for the animation to finish before the conversation ends, you can use AnimatorPlayWait() instead.
-
- Posts: 40
- Joined: Mon May 24, 2021 7:22 pm
Re: Code in "sequence" running after OnConversationEnd()
Thanks
I misspoke (miswrote?). I'm not using AnimatorPlay but AnimatorTrigger.
Yet I found the problem, for anyone searching the forums. My transitions had the hasExitTIme checkbox checked, even though the transition exit time was set to 0, it wasn't happening instantly. removing that made the trigger trigger instantly and not before the onConversationEnd()
I misspoke (miswrote?). I'm not using AnimatorPlay but AnimatorTrigger.
Yet I found the problem, for anyone searching the forums. My transitions had the hasExitTIme checkbox checked, even though the transition exit time was set to 0, it wasn't happening instantly. removing that made the trigger trigger instantly and not before the onConversationEnd()