Memory Matching Question

penny.morin19penny.morin19 Member, PRO Posts: 6

I just started using GS last week and I have no prior experience. I am going to try to explain my problem as best as I can.

I created a memory matching game. I used a counter block that deletes the matching pair when the it reaches two (each card adds 1 to the counter). Everything in the game works fine expect if you click on the same card twice it deletes itself and the matching card because the counter reaches 2. Does anyone have any suggestions of how to fix this problem?

Comments

  • uptimistikuptimistik Key Master, Member, Sous Chef, PRO Posts: 254
    edited March 2022

    Try creating a self attribute that you can set up this way:

    When card is pressed And self.Touched? is false,

    Change attribute Game.CardCounter to Game.CardCounter+1

    Change self.touch to true

    Hope that helps!

    Basically it's just a check to ensure the particular card is selectable.

    GameSalad Templates and Custom Development at the Official Marketplace: http://gshelper.com

  • adent42adent42 Key Master, Head Chef, Executive Chef, Member, PRO Posts: 3,054

    If you are tracking the last card clicked in a game level attribute, then you can also just check if the current click action is for the same card, ignoring it if it is.

  • penny.morin19penny.morin19 Member, PRO Posts: 6

    Thank you very much for help uptimistik. I was able to use your suggestion to solve my problem.

Sign In or Register to comment.