Incorrect text attribute

nakki1718nakki1718 Member Posts: 25
edited April 2012 in Working with GS (Mac)
Hi everyone, I'm working on a word game and i have got everything in place, the only thing I'm struggling with is getting my wrong actor to spawn if an incorrect answer is input. So basically if anything other than the answer is put in to the text box how do i get the wrong actor to spawn? Thanks in advance! :)

Best Answers

  • simo103simo103 Posts: 1,331
    Accepted Answer
    @nakki1718 ... a couple of things ... do you have an attribute 'Is it a word' or something like that? If so in the rule that makes 'Is it a word' true, put in the otherwise 'Is it a word' false. If you are checking to see if it is true as each letter is picked. You will need to add 'Is Word Submitted' attribute and then add that to the rule so if 'Is it a word' is false and 'Is Word Submitted' is true then 'Word Correct' is false.. I wouldn't spawn the Wrong actor. Have it off scene and move it into scene when showing for wrong answer.
  • Fabri DamazioFabri Damazio Posts: 97
    Accepted Answer
    Your "CORRECT" actor is already spawning right?

    You have something like "if right word, spawn actor CORRECT".

    Put if OTHERWISE "spawn actor WRONG".
  • simo103simo103 Posts: 1,331
    edited April 2012 Accepted Answer
    @nakki1718 .. without seeing exactly how you have it setup .. I would suggest if you still have issues .. put an actor on scene and in it display text for the attribute that you have indicating if the word is correct or not. Then run the game and see what that actor shows. I suspect you may have an attribute like 'Is it a Word' that gets changed to true when it is a word, but that must get changed back to false so a new word can be checked. If that is the case then the setting back to false will trigger your Wrong actor. If that is what you have you will need to add the second attribute 'Word Submitted' so you are only showing CORRECT when 'Word Submitted' is true and 'Is it a word' is true or WRONG when 'Word Submitted' is true and 'Is it a word' is false.

Answers

  • nakki1718nakki1718 Member Posts: 25
    Hi, thank you for replying yes the correct is spawning. We tried putting otherwise spawn wrong actor but it was constantly there. I will have a play around now and see if that works thank you!
  • nakki1718nakki1718 Member Posts: 25
    @simo103 Thanks i've added word submitted as another attribute and seems to work great! Thank you
Sign In or Register to comment.