Page 1 of 1

Wait for the end of Message

Posted: Mon Feb 17, 2020 7:19 pm
by Kamotachi
Hi!
In a 2D conversaton, I trying to move mouths when the characters speak.
I know that I can wait for the end of Animation, and then play another one.

AnimatorPlayWait(moveMouth, Portrait Image)->Message(Done); //When the animation of mouth finish
AnimatorPlay(stopMoveMouth, Portrait Image)@Message(Done); // return to idle animation of the mouth

The text of the messages is completed letter by letter. Is it possible to tell the mouth animation to continue playing until the message is complete on the screen?

Something like: :roll:

AnimatorPlayWait(moveMouth, Portrait Image) if text message is completed ->Message(Done);
AnimatorPlay(stopMoveMouth, Portrait Image)@Message(Done);

What would be the most optimal way?

I'm in a bump!! thanks ^^

Re: Wait for the end of Message

Posted: Mon Feb 17, 2020 7:30 pm
by Tony Li
Hi,

The typewriter effect sends the message 'Typed' when it's done. You can do this:

Code: Select all

AnimatorPlayWait(moveMouth, Portrait Image);
required AnimatorPlay(stopMoveMouth, Portrait Image)@Message(Typed)
I added the 'required' keyword to guarantee that the second command runs even if the player clicks the continue button early.

Re: Wait for the end of Message

Posted: Mon Feb 24, 2020 7:31 pm
by Kamotachi
Tony Li wrote: Mon Feb 17, 2020 7:30 pm Hi,

The typewriter effect sends the message 'Typed' when it's done. You can do this:

Code: Select all

AnimatorPlayWait(moveMouth, Portrait Image);
required AnimatorPlay(stopMoveMouth, Portrait Image)@Message(Typed)
I added the 'required' keyword to guarantee that the second command runs even if the player clicks the continue button early.
Thank you! This is awesome! :)

Re: Wait for the end of Message

Posted: Mon Feb 24, 2020 7:48 pm
by Tony Li
Glad to help!