Page 2 of 2

Re: Playing Animations on Dialogue Nodes

Posted: Mon Jan 04, 2021 5:14 pm
by Mackerel_Sky
The Animator window never makes the transition as far as I can see - running the game frame by frame seems to break the timing of the cutscene for some reason but also never led to the animation state playing.

With Animator Play the console logs this:

Dialogue System: Sequencer: AnimatorPlay(Receptionist Back, Receptionist, fade=0, layer=-1)

I'm fairly certain this looks okay. Any other ideas?

Re: Playing Animations on Dialogue Nodes

Posted: Mon Jan 04, 2021 8:06 pm
by Tony Li
You shouldn't need to run it frame by frame. It should switch to "Receptionist Back" and stay there for 2.5 seconds unless something else -- perhaps an unrelated script? -- is immediately switching it back to another state. Can you send a reproduction project to tony (at) pixelcrushers.com?

Re: Playing Animations on Dialogue Nodes

Posted: Tue Jan 05, 2021 1:32 am
by Mackerel_Sky
Think I've pinpointed where the issue lies after doing a bit more experimenting.

Looks like my cutscene movement controller is screwing with the animator as it is adapted from code that also controls animations based on movement/gravity etc. After disabling the movement the animation displays as intended. Maybe I'll write up a sequence to disable the controller before calling the animation or refactor the code to be more compatible with DS.

Thanks for your help!

Re: Playing Animations on Dialogue Nodes

Posted: Tue Jan 05, 2021 8:19 am
by Tony Li
You might be able to use the SetEnabled() sequencer command, such as:

Code: Select all

SetEnabled(YourMovementController, false, Reception)
Or, if the Receptionist is one of the two primary participants, you can add a Dialogue System Events component and configure OnConversationStart() to disable the movement controller and OnConversationEnd() to re-enable it.