inspired by the memory game sample I want to create a ‘tremory’ game which demands the player to find not just two but three matching cards.
I read the advanced action tutorial but don’t know how to modify the advanced action of the memory game so that it works for three cards. Can you help me with that, please?
This is what I have done in analogy to the memory game so far:
if I want to use 18 cards in the game, how many Control State and Shape parameters do I need? Or does only matter that the player needs to find three matching cards?
Could you please clarify your question? Do you want to have 18 matching cards or 18 cards for 6 different types?
In the first case, you must have 18 parameters. In the second case, you just need to use parameters like in my example.
However we found a change in rules would make it even better:
We want the player to pick three cards. Meanwhile the cards should not flip back. If the player has chosen three matching cards, they should vanish as before. If they do not match, the three cards should flip back into normal state after 3 seconds.
After either outcome, the player may pick three cards again.
I tried to realise this by using a ‘ClickCount’ Variable (Number) which adds +1 in the Advanced Action. But I struggle as I don’t have much experience with Advanced Actions yet. Can you help me once more?
In this case, you should use JavaScript as in the attached sample: memory-game-js.approj (800 KB)
When adding a new card, you need:
Name states of a card: Normal and Flipped states.
Update the JavaScript code in the On Load event of Slide: // update group names groups: ['Rabbit', 'Frog'],
For example, if the card name is Pig, the JavaScript code becomes: groups: ['Rabbit', 'Frog', 'Pig'],
I have one more question: how can we adjust the time until the cards flip back and collapse out? We would be happy if there was a delay of 2 or 3 seconds.
thank you once more! Is there a way to also delay the time until the cards collapse out, so when having chosen three matching cards? Can I just put in a line like ‘setTimeout(() => 2000);’ ?