In the program match model
To match two cards with the same name
And I want a match between our cards, different, for example, a card with number 1 in it, and a match card with 1 apple
I didn’t know
I am new to the program(^_^)
Can anyone make a simple form for me ??
Many thanks to anyone who helps me
Sprite objects can have multiple animations. Each animation can be of just one image. When a sprite is placed on the screen, randomise the animation. Then all you need to do is check that the two selected sprites have the same name.
So, for example, say you name the first sprite “Single items”. You could then have animation 0 as the image with number 1 on it, animation 1 as the image with an apple on it, animation 2 as the image with a single candle on it, etc.
Then when the first card sprite is clicked, save it’s name in a scene variable. When the second card sprite, compare it’s name with that of the scene variable holding the first selected card name.
Many thanks for your response
Do you have a simple explanatory file?
Here’s a quick example (I’ve added a group to make the event list simpler and smaller).
A sprite named Pastels, defined as:
I did the same for sprites named buttons and Hearts.
Define a scene variable:
Define a Group (using ):
Via the events or in the scene editor, place the cards :
Then randomise the image diaplayed:
Check and deal with the card selection (in this case the second card is deleted, but you do what ever you need to):
Hi MrMen, how about drag and drop object. Would you have solution for that.
Check the cards the cursor/mouse is over when you release the mouse or touch ends, and compare their names.
For your kind response
I’ll give it a try