Please help with me game

im making a memory match and I cant figure out how to get the cards to stay if 2 of the same card is flipped. My Project12-29-2021_21-40-01.wick

when you flip the first card, record which card that is. when you flip the second card, check if that card is the same as the first card. if it is, leave them. if not, flip them back.

thats what I tried, I made a variable for every pair and if a card is flipped it adds 1 to the corrisponding variable, and I tried making it so that if the var is 2 it stays. the problem I found is that I made a var to count how many cards I flipped and if its 2 then it makes the cards dissapear if they dont have their pair, (1 sec ima try something)

nevermind it didn’t work

In the frame I change a line to image and then if I selected both the square tiles they did stay, although then you can’t select anything else. I think this is because in the square tiles you have image while in the clip it wasn’t specifying the value(s) to be accessible under project.square because it was refrenced as just image

it still didn’t let me pick more than 1

So with the frame’s code looking something like this
image
then you can select the 2 square tiles and they will stay up. But then you can’t select any other tiles because I don’t think it reaches a frame inside one of the clips that resets the cardsFlip values making it so you can’t select any more tiles. So look at what frame the square tiles go to when the both get selected and stay up and make sure that it still triggers the code to reset the cardsFlip variable.

I got it working