Two (2) Delay sequence command

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
ricjonsu098
Posts: 45
Joined: Sat Jul 30, 2016 8:37 am

Two (2) Delay sequence command

Post by ricjonsu098 »

Will two delay sequence command work?

Because if you (tony) remember, you helped me with my problem before about the UI not displaying/immediately skips so I have this sequence

Code: Select all

SetEnabled(Button, true, Runic Unity UI Dialogue UI); AnimatorPlay(Show,Dialogue Panel);
SetActive(myTimer, false); SetEnabled(GameTimer, false, GameTimer);
Delay({{end}});
Now, also if you remembered I asked if I can change the chars/second in a specific node. I failed to do that so I tweaked my dialogue manager to have 200 chars/second, sequence each node so on trigger enter, even if the text is not finished displaying/waiting to complete the chars/second, the conversation will proceed.

I was wondering if I can put another delay sequence on top of Delay({{end}}), like Delay(15) so the animation problem will be solved at the same time, the dialogue will remain for 15 seconds before proceeding. Because if I will not put Delay(15), the conversation will proceed fast because of the 200 chars/second

is this possible and is this okay?

So I plan to make the sequence into

Code: Select all

SetEnabled(Button, true, Runic Unity UI Dialogue UI); AnimatorPlay(Show,Dialogue Panel);
SetActive(myTimer, false); SetEnabled(GameTimer, false, GameTimer);
Delay({{end}});  Delay(15);
User avatar
Tony Li
Posts: 22107
Joined: Thu Jul 18, 2013 1:27 pm

Re: Two (2) Delay sequence command

Post by Tony Li »

Hi,

Which animation do you want to wait for?

If it's "AnimatorPlay(Show,Dialogue Panel)", then you can use AnimatorPlayWait() instead:

Code: Select all

AnimatorPlayWait(Show,Dialogue Panel);
This will wait until the Show animation is done playing.

Otherwise, yes, you can put in 2 Delay() commands. Both will run until they're done. The conversation will only continue when both are done.
ricjonsu098
Posts: 45
Joined: Sat Jul 30, 2016 8:37 am

Re: Two (2) Delay sequence command

Post by ricjonsu098 »

Thanks for the info :D Unfortunately, for some reason that I don't know, AnimatorPlayWait() does not work for me. I went for the 2 delays
User avatar
Tony Li
Posts: 22107
Joined: Thu Jul 18, 2013 1:27 pm

Re: Two (2) Delay sequence command

Post by Tony Li »

If that works, great! If you want to look into the AnimatorPlayWait() issue on the other hand, just let me know. I'll be happy to investigate it with you.
Post Reply