Page 1 of 1

[SOLVED] Check if subtitles are fully displayed in Custom Sequencer Script

Posted: Wed Mar 23, 2016 3:19 pm
by Sindaru
Hello again.

Similar to the problem I encountered in this thread I now am wondering how to check in code if the subtitles that are displayed with a typewriter effect are done writing up (so they are fully displayed). My plan is to have an animator bool controlling a talk-loop set from true to false depending on whether the typewriter effect is currently active (or aborted by the player). The check is aimed to naturally occur in the update loop.

Re: Check if subtitles are fully displayed in Custom Sequencer Script

Posted: Wed Mar 23, 2016 4:00 pm
by Tony Li
Hi,

The UnityUITypewriterEffect script has three events: OnBegin, OnCharacter, and OnEnd. You can assign a method to OnEnd to be notified when the effect is finished typing.

For your use case, you could set an animator bool with OnBegin and clear it with OnEnd.

Re: Check if subtitles are fully displayed in Custom Sequencer Script

Posted: Thu Mar 24, 2016 8:26 am
by Sindaru
Hey Tony,

thanks for showing me that gem - that solved it. I should spend some more time digging into the inner workings of the dialogue system next time. :)

Re: [SOLVED] Check if subtitles are fully displayed in Custom Sequencer Script

Posted: Thu Mar 24, 2016 9:20 am
by Tony Li
Don't hesitate to ask any questions right away. If I can save you some time with a quick answer, I'm happy to do so.