Delay being skipped when using "Submit" key?

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
Tentakero
Posts: 48
Joined: Wed Sep 23, 2020 12:36 pm

Delay being skipped when using "Submit" key?

Post 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?
User avatar
Tony Li
Posts: 22051
Joined: Thu Jul 18, 2013 1:27 pm

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

Post 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.
Tentakero
Posts: 48
Joined: Wed Sep 23, 2020 12:36 pm

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

Post by Tentakero »

Got it! It was the SetContinueMode() that needed to be added. Thanks for the help!
User avatar
Tony Li
Posts: 22051
Joined: Thu Jul 18, 2013 1:27 pm

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

Post by Tony Li »

Happy to help!
Post Reply