Wait for the end of Message

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
Kamotachi
Posts: 44
Joined: Fri Nov 29, 2019 9:03 pm

Wait for the end of Message

Post 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 ^^
User avatar
Tony Li
Posts: 22055
Joined: Thu Jul 18, 2013 1:27 pm

Re: Wait for the end of Message

Post 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.
Kamotachi
Posts: 44
Joined: Fri Nov 29, 2019 9:03 pm

Re: Wait for the end of Message

Post 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! :)
User avatar
Tony Li
Posts: 22055
Joined: Thu Jul 18, 2013 1:27 pm

Re: Wait for the end of Message

Post by Tony Li »

Glad to help!
Post Reply