Making basic memory puzzles
Featuring Alice Andersson
Step 1: Planning
To do this, you'll have to decide how many events your player has to remember. Generally anything bellow 4 is useless and anything over 7 is hard. Now is also the time to make the decision. Do you want the game to have numerous sequences it randomly selects from or just one you'll have to master?
In this tutorial we'll do a memory puzzle of 6 phases and I'll work you through how to make either single sequence or numerous sequences.
Stage 2: Creating your memory puzzle with single sequence
First of all, you'll need to make many events.
- Before doing anything else, make the events, six of them with the graphic you want to have as "neutral" before they are lit, in the case of this tutorial six unlit torches. Leave this event otherwise empty. MAKE SURE you name them somehow you remember (Torch 1, torch 2, etc)
- Now, you need to create an object that'll start the sequence, in the order you want, like say a button you press. For instance, if you want torch 3 to be the first one, have it change graphic first. There are many ways to change the graphic, one of them being move event command. Make sure "Wait until movement is done" is ticked on. Then, insert a wait command, 50+ frames is good time. You don't want to have the wait time to be either too long or too short. I generally recommend 50-60 for a fluid, yet simple to catch pattern. Then make the next part of sequence change graphics and repeat this, until you've done this for all the events involved in the puzzle.
- After having written down the sequence, leave a small wait time before rolling back your movements, changing the graphics of events back to neutral. Turn on a switch, I'll call it "Memory" and make sure that the button event has "Memory" in its switch and the event otherwise empty.
- Now, go to the first part of your memory sequence and make a new event page that's turned on when switch "Memory" is on. Insert conditional branch new variable called "Switches" or something and have its condition be equal to 0 and leave the else on.
If the player pressed the right one, have the object change the graphic (don't use switches! ) and make sure it adds +1 to the "Switches".
Under else case is where the player either hits the part that's already been pushed once or wrong. It's up to you how to handle it, you can even give a game over right then and there but I personally like to only give a light slap at the fingers of the players instead of pulling their hair off.
Fade out the screen and call a common event. IN the common event, have all the puzzle objects, say the torches revert to neutral, making sure "Wait until movement is done" is ticked OFF.
Switch off the "Memory" switch and set the "Switches" to 0.
Important: Remember to Fade In or player will not be able to play any more!

- Now if you want the player to at some point actually finish the puzzle, make a new event in the map and set it to auto run, with the conditions "Memory" switch is on as well as "Switches" is 9. This is where you put what happens when the player gets it right, whatever it opens the door, teleports the player or whatever is up to you.
Step 3: Making numerous sequences
This was mentioned by one of the judges in the review, so I thought I'd tell how this is done too.
- Before starting the sequence on the button that starts it, put control variable and put random between 1 and how many numbers you're gonna have, let's say you want 3 sequences you put 3.

- Put fork condition variable 1 and else on and make the first sequence as taught above, under else make condition variable 2 and another sequence but after turning on "Memory", also make them turn "sequence2" and then make 3rd variable, etc.
- Go to the first event in your 2nd sequence, it's first torch for me this time. Make a new event page after the one with "Memory" switch, do the same as before but just make the "sequence2" be the condition.

Since you already had set how memory handles and it is still turned on, you don't have to re create the things again, simply doing it once in the autorun event is enough. Now you have a fully functional memory puzzle with numerous sequences!
