Match tile game logic

DoguzDoguz Member Posts: 500
edited February 2012 in Working with GS (Mac)
I've been trying to nut this out for a while, but has succumbed to seeking help.

This is what I'm trying to do:
6 tiles randomly appear on screen 2 are identical.

You tap on the right 2: A correct graphic appears (then fades out), a sound plays, your score adds by 1 and the tiles are re-shuffled ready for the next guess.
You tap on the wrong 2: An incorrect graphic appears (then fades out), a sound plays, your score reduces by 1 - You would then try another combination until you get it right.

I am going to use tables to list all my random tile sequences. Many columns of 6 rows, with the graphic name in the cells.
I can get the tiles to appear randomly, but I'm stuck on getting the correct behaviours to trigger all my events. The score up works but I can't trigger the score down correctly.

I don't know, maybe I could email someone the file of what I've done so far.

Comments

  • DoguzDoguz Member Posts: 500
    edited February 2012
    http://dl.dropbox.com/u/2867898/match0.2.zip

    Would love someone to take a look please.
  • MotherHooseMotherHoose Member Posts: 2,456
    edited February 2012
    Problem:
    --the changeAttribute: game.itsamatch is an 'Otherwise:' of the touch rule … not of the 'Is a Match' text rule
    --the add to score is on the checkActor … the subtract from score is on the gamelogicActor
    … only one actor should be manipulating the score

    and, works better if only one attribute: game.Match … not two: game.nomatch and game.itsamatch

    very,very nice that you name your rules! also good to add a √ Otherwise: to those names when you use an otherwise with that rule

    Looking good! @Doguz … I enjoyed playing! even in its barebones state!

    @};- MH
  • DoguzDoguz Member Posts: 500
    Thank you so much MH for taking a look. I'll continue to work on it. I have some great ideas for this little beauty. Just need to get the engine working.

    BTW: I'm not understanding the √ Otherwise instruction you said. Is there a tut or explanation of that anywhere?
  • MotherHooseMotherHoose Member Posts: 2,456
    edited February 2012
    oh sorry, @Doguz

    meant to say: add the words 'check otherwise' … to the name of the Rule, if you have an Otherwise: behavior
    then, when you are looking for a problem, you will know that some behavior is in Otherwise:
    and doesn't show unless you click there

    the √ is just: [optionKey]+V … and though it is the radicalSymbol it sure works good for a text checkmark

    @};- MH
Sign In or Register to comment.