Dear support team,
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:
Kind regards, Alketas
ActivePresenter version: 8.5.0
OS: Win 10
You can take a look at the attached sample for your reference: memory-game.approj (1016 KB)
Please perform the following steps in the Advanced Actions dialog:
In the Parameters section, add some Control State and Shape parameters.
It depends on how many cards you want to work with.
In the Actions section, add Hide Object action using the newly inserted Shape parameter:
Change the condition to adjust variable:
thank you very, very much!
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.
sorry, my fault. There are 18 cards in total in the game, being of 6 different types (so each type consisting of 3 matching cards).
the game works, thank you!
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?
When adding a new card, you need:
- Name states of a card: Normal and Flipped states.
// update group names
groups: ['Rabbit', 'Frog'],
groups: ['Rabbit', 'Frog', 'Pig'],
thank you so much, this helps a lot! You are amazing!
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.
flipBackTime: 1000, // ms
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);’ ?
Please check this sample:
memory-game-js-2.approj (768 KB)
You just need to update
flipBackTime option, it’s used for both correct and incorrect cases.