Page 1 of 1

Delay being skipped when using "Submit" key?

Posted: Sat Oct 10, 2020 10:56 am
by Tentakero
Hello! I've been struggling a bit with getting text to delay properly with sequences.

For context, I'm using a continue button on screen as well as the option to press space to proceed through dialogue. For the actual delay sequence, I'm using:

Code: Select all

Continue()@3 //Number of seconds vary
I ended up using Continue() instead of Delay{{end}} because the continue button didn't play nice with the Delay command.

For some reason, the delay works perfectly when using just the mouse to try and click. I'm assuming it's because the continue button is hidden. However, pressing space skips it and continues the next node instead.

Image
I am using an empty node with nothing but the sequence command in there in order to delay it. Is there anything I can do to make it so that the delay sequence is completely unskippable no matter what kind of input is being sent through? Be it click, space key, etc?

Re: Delay being skipped when using "Submit" key?

Posted: Sat Oct 10, 2020 2:02 pm
by Tony Li
Hi,

There are a few different possibilities of what could be going on. But to make that node delay for a duration without the possibility of being interrupted by the player, use the SetContinueMode() sequencer command. Example:

Code: Select all

SetContinueMode(false); // Disable continue button
Delay(3);
required SetContinueMode(original)@3; // Set back to original value
required Continue()@3
The required keyword guarantees that those last two commands run. Otherwise, it's possible that Continue() could run first and end the node. If SetContinueMode(original) didn't have 'required' in this case, it might not run, so the continue button would be left false.

Re: Delay being skipped when using "Submit" key?

Posted: Sat Oct 10, 2020 2:26 pm
by Tentakero
Got it! It was the SetContinueMode() that needed to be added. Thanks for the help!

Re: Delay being skipped when using "Submit" key?

Posted: Sat Oct 10, 2020 2:28 pm
by Tony Li
Happy to help!