Is it possible to perform call() on user entered text

0 favourites
  • 3 posts
From the Asset Store
Change delay, create new lines, "backspace" the text
  • Is it possible to check entered text and then call a function depending on the wrong or right answer? Can anyone give an example?

  • In theory yes (never bothered to do it myself but the functionality is in place). You will need to retrieve the correct answer from somewhere and store it in a string, but I assume you will be loading new questions via events anyway so you will be doing it then. Once you have text variable [answer] stored do the following on text changed in textbox.



    User finishes entering answer and confirms (clicks a confirm button or presses enter or something, don;t use the textbox changed text condition as it triggers every time when you type inside it)

    no actions

    sub-event -1


    textbox compare text to text stored in [answer]


    call function "correct"

    sub-event -2


    else (system conditons)


    call function "wrong"

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hi Pulstar, thanks for your answer. It is quite thought provoking. I have given up the idea for my game as it was really hurting my eyes to debug it. The project is now cancelled. It would be interesting to know how to act upon strings entered in C2 though...

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