random flipping of cards
patricia.brady
Member, PRO Posts: 49
in Tech Support
Hello,
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
Comments
Grateful for assistance or any advise on how to get assistance.
Thank you
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.
http://jamie-cross.net/posts/ ✮ Udemy: Introduction to Mobile Games Development ✮ Learn Mobile Game Development in One Day Using Gamesalad ✮ My Patreon Page
Try this in the cardback prototype:
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,
Patricia
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
Hi Tatiang,
I've tried to incorporate your suggestion, but cannot get it to work unfortunately.
Is there another way?
Thank you,
Patricia
Hi, got it to work using a timer to activate boolean [touchactivated].
Is it possible to do this using self.time rather than timer behaviour?
I have not tested it, but this should work:
Make a self attribute (type = real) called self.startTime
Making the seemingly impossible, possible, with such ease!! So very grateful, thank you @RThurman !!!
You are welcome!