Page 1 of 1

Two (2) Delay sequence command

Posted: Mon Sep 12, 2016 7:04 am
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);

Re: Two (2) Delay sequence command

Posted: Mon Sep 12, 2016 10:29 am
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.

Re: Two (2) Delay sequence command

Posted: Mon Sep 12, 2016 10:50 am
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

Re: Two (2) Delay sequence command

Posted: Mon Sep 12, 2016 10:57 am
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.