Forum Discussion
Memory Game - Storyline
Bastiaan, it is a really great job!
Inspired with your idea I tried to improve the usability. The main issue was that "wrong" pair is not hided automatically until user clicks on another card. I think it would be more convenient if wrong pair is hided after 1-2 seconds.
To achieve such behavior I added a new layer that is actually empty, but it contains some triggers. For this layer I set the timeline length to 1 sec (or any other value of timeout you want).
I use the following variables:
- common counter for opened cards (vCount)
- counter for each of the pair (other variables with prefix v..)
- boolean variable for each of the pair which indicate that pair is found (with prefix b..)
The logic is quite clear.
When user clicks on any card the corresponding counter of the pair increments. The common counter is also incremented.
When the counter of particular pair is equal to 2 (two cards of the same type are opened) then its boolean flag is set to True - the pair is found.
When the common counter is equal to 2 (two new cards are opened) a new "fake" layer is triggered. It is automatically hided after timeline ends. When this layer hides all the cards and pair counters are reset to 0 if their boolean flag is not True.
You can find the example by the link below:
https://www.dropbox.com/s/jiez28kzfjacsrk/Memory.story
Best regards,
Timur
Related Content
- 10 months ago
- 10 months ago
- 2 months agoAnonymous
- 8 months ago