PELMANISM game

Jun 15, 2021

Hi all Storyline users,

I'm making a game called Pelmanism where players can randomly open 14 cards, memorise their positions, and match 2 same cards.

I set Variables to be true if 2 matching cards are selected (for ex: 3 and 13), then those cards will change to state Paired.

So my question is how to set Variables to be true only if those 2 cards are selected in a row (3 then 13, or 13 then 3). Otherwise, Variables will be true anyway if learners select 3, then 2, then 13. 

Any advice will be appreciated.

Thank you in advance.

Jenny.

1 Reply
Walt Hamilton

Assuming you want to turn non-matching cards back over, and are using Selected and Normal state:

1. Add 1 to var CardsSelected when card is clicked. This trigger goes on each card.

2. Show Layer "Check For Match" when CardsSelected changes if CardsSelected  = 2.  Put all the triggers that check for match on the layer and set them to fire when layer timeline starts. give the layer a .1 or .25 timeline, and set it to hide when timeline ends, with reset to initial condition on Revisit. That way, you can have a large number of triggers that do the checking for match, but don't have to put a condition on each one to make sure they only execute at the right time. The beginning of the timeline becomes the default condition.  I suggest this because I foresee a large number of triggers in use here; seven to check for match, 7, to cover Paired cards, or to turn them to Disabled state. and 14 to check for change the state back to Normal, if not Paired. eg. "if 3 = selected, change 3 to Paired if 13 = selected", and "If 3 = Paired, and 13 =  selected, change 13 to Paired". Cover 3 and 13 with a shape set to full transparency, to prevent them from being clicked again, or set them to Disabled with triggers parallel to those which changed them to Paired. Then one for each one: "If 1 <> paired, change 1 to Normal".   End with setting CardsSelected to 0, 

Unless of course, you have some other way to check for pairs, and turn them back over, If so, please share it.