Memory Game customisation


#1

Is there a way to modify the Memory Game to show a pop up after each time a pair of cards are matched?

Thanks


#2

Hi @martin.collins,

For sure you can make this modification. The current Memory game already plays a bell sound when the cards are matching. You can add here the action to show a pop-up and hide it after a delay.


#3

Thanks Seb, that’s brilliant. :slight_smile:


#4

Seb, last question, is there anyway to make it so the popup could change for a specific matched pair. eg Card-1 matched = Popup-1 etc

Thanks,


#5

To do this, you’d have to modify the JavaScript code of this Interface asset to add parameters to the “CardsMatch” event which is raised.
This has to be done in the _compareSelection method in the MemoryGame.js file and declared in the MemoryGame.ifd description file.

I did this modification for you, you’ll find the files attached: MemoryGame.zip (5.5 KB)

Just replace the current files in your project with these ones and you’ll have a new parameter in the trigger:


#6

Thanks Seb, just got that working, you have saved the day again!

:slight_smile: