Page 1 of 1

uSequencer Issue

Posted: Sat May 23, 2015 4:44 am
by BigBadSoup
I'm working on a JRPG dialogue, and I've run into an issue. I have a continue button that is auto-focused with the fast forward script so that the player can move through the dialogue at their leisure. I have the sequencer playing a uSequence just fine.



The problem is that if the player hits the button to move through the dialogue while the uSequence is playing, it moves to the next dialogue, and the uSequence just stops wherever it is.



I'd like for it to complete the uSequence before moving on obviously. I've tried Delay, but that doesn't seem to ignore the continue command? I've considered having the continue button checking if the sequence is still going and doing nothing if so, but I haven't been able to make it work. Any ideas?

uSequencer Issue

Posted: Sat May 23, 2015 2:16 pm
by Tony Li
Hi,



If you don't mind a tiny bit of scripting, add a small script with a method that checks the Boolean property:

 DialogueManager.Instance.GetComponent<Sequencer>().IsPlaying

If it's playing, don't do anything. If it's not playing, send the message "OnFastForward" to the button, or find the fast forward component (e.g., GetComponent<UnityUIContinueButtonFastForward>()) and call its OnFastForward() method, whichever you prefer. Then assign this method to the continue button's OnClick handler.







If you only want to disable the continue button while the uSequence is playing, but not the rest of the sequencer commands in the Sequence field, look instead for a SequencerCommanduSeq component on the DialogueManager:

bool isPlaying = (DialogueManager.Instance.GetComponent<SequencerCommanduSeq>() != null);





Another option would be to use uSequencer to hide the continue button or disable its Button component while the uSequence is playing. Then re-enable it at the end of the uSequence. This way you don't have to do any scripting.

uSequencer Issue

Posted: Sun May 24, 2015 3:19 pm
by BigBadSoup
Exactly what I needed. Thanks!

uSequencer Issue

Posted: Sun May 24, 2015 3:29 pm
by Tony Li
Happy to help!