Type word to change attribute

EsayemEsayem Member Posts: 8
edited August 2012 in Working with GS (Mac)
Is it possible to type a word to change an attribute to true?

For example, giving a response to a question. To get the question right you have to type a certain word, when the word has been typed the attribute 'correct' will be changed to true.

Just wondering if it was possible, thanks!

Comments

  • simo103simo103 Member, PRO Posts: 1,331
    @Esayem ... yes definitely! You can compare the typed response with the right answer.
  • EsayemEsayem Member Posts: 8
    Thanks for the response, good to know! How would I go about doing this?
  • simo103simo103 Member, PRO Posts: 1,331
    @Esayem .. probably easiest to see tshirtbooths video and demo file here:
    http://gshelper.com/600000-word-checker-free-demo/
    This demo compares the typed word to see if it is in the 60000 words ..... you could do the same but have it check against just the one word (the answer you want) at a time.
  • gyroscopegyroscope I am here.Member, Sous Chef, PRO Posts: 6,598
    edited August 2012

    @Essayem

    Hi, yes, as @simo103 said. A way to do this is to make 2 Text attributes; call the first one QuestCurr and the other AnswerCurr

    Not knowing your game setup, I don't know about how your questions are set up, so I'll guess they're all accessed from the same scene with a next question button?

    Make an integer attribute called Count with its value set to 1 and In the button, put

    When touch is pressed
    Change Attribute Count to Count+1

    Rule: When Count=1
    Change Attribute QuestCurr to ---the word answer to question 1

    Rule: When Count=2
    Change Attribute QuestCurr to ---the word answer to question 2

    etc, all the way to your last question's answer

    Another guess: you have a button marked Go or similar to input the answer to the question? In that button put

    Change Attribute AnswerCurr to QuestInput ---QuestInput is a third Text attribute being the current inputted answer

    Rule: When Attribute AnswerCurr = QuestCurr
    Change Attribute Answered to true

    THat's roughly it; difficult to be more precise without knowing more details about your particular setup as I mentioned – it'll probably need amending depending on your word input method, etc., – but hopefully there's enough here give you a start.

    ""You are in a maze of twisty passages, all alike." - Zork        temp domain http://spidergriffin.wix.com/alphaghostapps

  • EsayemEsayem Member Posts: 8
    Brilliant, thank you very much gentlemen!
Sign In or Register to comment.