Forum Discussion
Help Needed: Block Third Card Click and Same Card Re-Click Before Matching is Complete
You can approach this issue from multiple angles. Math provided valuable suggestions worth considering when starting the project from scratch to simplify the process.
There's no need to create a custom 'Active' state for the cards; instead, utilize the built-in 'Selected' state. This approach eliminates the necessity for triggers that change the card's state to 'Active' upon selection, as the 'Selected' state will automatically activate.
Create a variable (e.g., cardsRevealed) to count the number of cards currently selected based on their 'Selected' state. When matching cards are selected, hide them. Use another layer 1 second long for some sort a delay, allowing time to display other messages and process actions on the base layer. Reset the cardsRevealed variable to 0 to restart the process.
The primary challenge was ensuring the correct state changes for feedback messages. I addressed this by implementing triggers that immediately activate the 'One card clicked' state when any card is selected. Subsequently, additional triggers display the 'You found a match' message when two matching cards are selected and the 'cardsRevealed' variable equals 2. If the conditions are not met, the 'Nope, try again' state is activated on another layer when the timeline starts and the Normal state is activated when the timeline ends.
Please refer to the attached story file for more details.
Related Content
- 10 months ago
- 9 months ago
- 4 months ago
- 6 days ago