Page 1 of 1

How to stop Continue if waiting for input?

Posted: Wed Dec 13, 2023 3:42 pm
by LilGames
Hi. We set up our dialogue template to use full-screen click/tap to continue through a conversation (I don't remember which method we used... it's been a while since we did it). Anyways, one of our conversations requests input from the user to get their name. Unfortunately, if the user taps anywhere on the screen, they just skip ahead this name entry. Before I go digging and altering code, is there already a parameter/condition I might be overlooking that would take care of this? (eg: no continue if waiting for text input)

Thanks

Re: How to stop Continue if waiting for input?

Posted: Wed Dec 13, 2023 4:38 pm
by Tony Li
You could make a subclass of SequencerCommandTextInput to do that, or you could just use the SetContinueMode() sequencer command. Example:
  • Dialogue Text: "What's your name?"
  • Sequence

    Code: Select all

    SetContinueMode(false); 
    TextInput(Text Field UI, Name:, playerName)
  • Dialogue Text: "Nice to meet you, [var=playerName]!"
  • Sequence:

    Code: Select all

    SetContinueMode(true)
Side note: If you're asking the player to input their name, you might want to check that the input is valid. See: How To: Read Input From Player During Conversations

Re: How to stop Continue if waiting for input?

Posted: Wed Dec 13, 2023 5:16 pm
by LilGames
So it turns out we already have that code in our conversation node and testing now it seems to not continue, so I'll have to go back and ensure this isn't just "user error" (maybe they are tapping the enter button).

Re: How to stop Continue if waiting for input?

Posted: Wed Dec 13, 2023 7:52 pm
by Tony Li
The enter button should accept the text input and cause the TextInput() sequencer command to finish. On your Text Field UI, check the Standard UI Input Field's Accept Key and Accept Button.

Re: How to stop Continue if waiting for input?

Posted: Thu Dec 14, 2023 8:54 pm
by LilGames
OK so something is up when playing on Android. Could Dialogue System or it could be a small mod we made to a button that covers the whole screen. Clicking anywhere confirms the text entry. Come to think of it, maybe that's the Android OS sending an "Enter" event from its entry keyboard. HMMM!

I guess players who tap fast impatiently will just have to suffer with the default name. :) :D

Re: How to stop Continue if waiting for input?

Posted: Thu Dec 14, 2023 9:09 pm
by Tony Li
What if you were to set the default to a blank string and use the check in the link above to loop back if it's blank?

Re: How to stop Continue if waiting for input?

Posted: Fri Dec 15, 2023 5:59 pm
by LilGames
Ohhh! it never occurred to me to loop back to the entry node.