Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

random flipping of cards

patricia.bradypatricia.brady Posts: 14Member, BASIC


I'm working with the Memory Match V2 template from Tshirbooth and would much appreciate your assistance.

Once the cards have been dealt (e.g., 16 cards (4x4) visible with cardback), I'd like each card to flip to front side of the card (e.g., diamond, heart etc..) for 0.2 secs and then back to cardback. This should happen consecutively for all 16 in a random order until all 16 cards have been visible individually and the game then reverts to 16 cardbacks ready for the next stage.

Grateful for your help.



  • patricia.bradypatricia.brady Posts: 14Member, BASIC

    Grateful for assistance or any advise on how to get assistance.

    Thank you

  • jamie_cjamie_c Posts: 5,478Member, BASIC

    Normally I'd suggest contacting the developer of the template but Tshirtbooth has been gone for a long time so that is probably not an option. You're next best bet would be to hope that someone who has used it extensively sees this post but I'm afraid I've never used it.

  • RThurmanRThurman Posts: 2,807Member, Sous Chef, PRO

    Try this in the cardback prototype:

    Timer [after] [.5] seconds
      Timer [after] [(self.what card am i)*.25] seconds
        Change Attribute [self.flip] to [true]
        Timer [after] [.2] seconds
          Change Attribute [(self.flip)] to [false]
  • patricia.bradypatricia.brady Posts: 14Member, BASIC

    So very appreciated RThurman!!!

    Do you know if there's a way to disable the touch function when the cards are flipping?
    I'd like all the card to have flipped before the player can start flipping.

    Thank you,


  • tatiangtatiang Posts: 11,525Member, Sous Chef, PRO, Senior Sous-Chef
    edited December 3

    Try this:

    [Make an attribute of type real called game.timeStart]

    When attribute self.what card am i is 1 [this rule might have to go inside another... not sure how you decide to start the flipping mechanism]
         Change attribute game.timeStart to game.Time

    When touch is pressed AND game.Time > game.timeStart + 0.5 + 16*(0.25+0.2)
         [touch behaviors]

    I think I have the math right... just added it from what @RThurman posted above but you can adjust as needed if it starts too early/late.

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • patricia.bradypatricia.brady Posts: 14Member, BASIC

    Hi Tatiang,

    I've tried to incorporate your suggestion, but cannot get it to work unfortunately.
    Is there another way?

    Thank you,


  • patricia.bradypatricia.brady Posts: 14Member, BASIC

    Hi, got it to work using a timer to activate boolean [touchactivated].

Sign In or Register to comment.