Check to see if text is "null"?

0 favourites
  • 8 posts
From the Asset Store
OpenAI TTS
$10 USD
Text-to-Speech plugin.Allows your Construct 3 project to convert written text into spoken words
  • Hey all. I was struck by inspiration and have a neat game idea that I think I'll be able to make using the free version of C2 (I hope).

    I've run into a bit of a snag though. At the start, the player needs to enter in their name. It is crucial that they enter a name of some kind, and not just leave the field blank.

    How do I check to see the input of the textbox, and have the game give an error when the value is "null", or nothing?

    Thanks.

  • Check the value of Text (Text.text) and evaluate if "" (Blank).

    Here is CAPX CAPX

  • Check the value of Text (Text.text) and evaluate if "" (Blank).

    EDIT: Just saw the .CAPX file, thanks.

  • Look at previous post again - I added CAPX.   You would want to set up a global variable that is triggered when text is entered into the Text Box. And not let them press the button until that variable is toggled on.

  • If whipped that capx up real fast. If you want I can redo it with a button and variable to show how. Or you could try and let me know... <img src="smileys/smiley2.gif" border="0" align="middle" />

  • Look at previous post again - I added CAPX.   You would want to set up a global variable that is triggered when text is entered into the Text Box. And not let them press the button until that variable is toggled on.

    Good idea, I'll try that. I was actually able to find a work around, but your way is better, thanks.

  • If whipped that capx up real fast. If you want I can redo it with a button and variable to show how. Or you could try and let me know... <img src="smileys/smiley2.gif" border="0" align="middle" />

    I was finally able to figure it out. Thank you so much for your help.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • NO problem.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)