How do I Make A Typing Game Input Feature?

  • Hello everyone, thanks for your time in advance.

    I have a project I'm working on with a team and we are stumped on a few features.

    The concept of the game is that the player must unjumble scrambled words displayed by typing the correct word in it's proper order. Example being that the image displayed is "TAC" but the player must type "CAT" to progress.

    The problem I'm having isn't with understanding that C, A, and T were pressed to advance, it's the order of letters I'm struggling with in the code. With my current code, players could type TAC or ACT and it will think the player still typed CAT. I need the program to only allow the order of the word CAT as C, A, T to progress to the next jumbled word.

    Does the solution involve strings and arrays? I'm stumped, guys!

    Any help would be greatly appreciated!

  • system > Compare two values > left(TextInput.text,1)="c" > do something

    system > Compare two values > left(TextInput.text,1) does not equal "c" > do something

    left(TextInput.text,1)

    The 1 being the first letter of "cat"

    you can also use Right() and Mid()

    and of course there is obviously Textinput > compare text, but i'm sure you know that.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Awesome, thanks sizcoz for the reply and helpful tip!

    I guess the other thing I'm wondering is how do I make it so the player doesn't have to click on the textInput box to type? Like the game putting the cursor in the box (for each box that pops up for the next word, and the next word to type) for the player automatically?

    Thanks again!

  • Awesome, thanks sizcoz for the reply and helpful tip!

    I guess the other thing I'm wondering is how do I make it so the player doesn't have to click on the textInput box to type? Like the game putting the cursor in the box (for each box that pops up for the next word, and the next word to type) for the player automatically?

    Thanks again!

    you put textinput> set focused, to get the cursor inside the input box.

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