check global text

0 favourites
  • 3 posts
From the Asset Store
Globals 2.0
$3.99 USD
Globals 2.0 stores and group variables. You can also load and save data (variables) from/to JSON files.
  • i have a global text called name that is set to "nul" when the player enters their name in a TextBox the global text is set to what the player typed. Next to the TextBox i have a button. what i want to achieve is when the button is pressed the player goes to the next layout, but if they have not entered their name a message pops up telling the player to enter their name.

    I know how to do everything apart from how do I compare the values of the value of the global text, eg. if name="nul" and name<>"nul" I have tried useing the system option to compare values, but cant figure out to use it to compare values of a global text, I have tried name.text and etc but nothing seems to work

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • first of all - set type of global variable 'Name' to Text, by default it's a Number (just in case :)) then on event Button on click you should make 2 subevents - textbox is empty or it's not. if empty - show message, if not - set textbox.text to global 'Name' and go to 2nd layout. hope it will help!

  • Thanks, works great. I think I wa trying to make it more complicated than it actually is.   <img src="smileys/smiley36.gif" border="0" align="middle" />

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