Typing/Recognizing Cheats?

0 favourites
  • 4 posts
From the Asset Store
Change delay, create new lines, "backspace" the text
  • Hey people!

    I was trying to make something like this:

    • The player hits ENTER
    • types in password (ex: opossum)(the textbox will be hidden)
    • hits ENTER again to confirm
    • game does something

    I found this tutorial but couldn't understand it at all.

    construct.net/en

    Can anyone help me with the text box and how it works?

    For example when I set:

    Global Variable - Cheat (Initial value -1)

    On ENTER pressed >>> set Cheat*(-1)

    Cheat 1 >>> set Textbox focus

    Cheat -1 >>> set Textbox Disable

    When I press ENTER first, i can type in the text box, but after I press ENTER again it doesn't disable it. It works with F10 but not with ENTER for some reason.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • There's a similar way you can make a toggle switch:

    +on enter pressed

         >set Cheat to 1-Cheat

    This will make Cheat flip between 1 and 0 on every press

    Anyway, that tutorial wasn't really clear at all.. so I made a cap, it also checks to see if the typed word matches any of the cheat words.

    link

  • Thank you very much keepee for the prompt and informative reply. I need to learn some of the stuff used in the eventsheet though :D

    works great, thanks again!

  • no worries

    you can read up about repeat loops, and token() expressions in the manual. They'll explain it better than me

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