Haven't seen a tutorial on cheat codes in a while, figured I'd make one since I'm bored and because they're quick, easy, and fun.
This tutorial will show you how to make a person, place, or thing allow the player to input a code in order to receive a reward. Think, "lumberjack" on Age of Empires 2 (+ 1000 wood).
1.) Decide who, where, or what will be the person, place, or thing where the player can input the code. While in event editing mode, I took a random character sprite and put his settings to, "Move Animation" and "Player Touch".
Image2.) Now I'm just going to add some text to this character, such as, "Would you like to enter a cheat code?", and then some options, "Yes, No".
Image3.) We have to go off track for a second. Click "Apply" on your event, then go to the Database. Under the Actors list, increase the maximum number of actors by however many cheat codes you plan to have, in this case I'll just have one cheat code, so I'll change the maximum to 9. For the new actors name, type the word, "cheatcode". Once you've entered in all your cheat codes in the Actor slots, click "Apply", and go back to your event. If you have more than one cheat code, simply label them with numbers, i.e., "cheatcode2", "cheatcode3", etc.
Image4.) In my event, I'll leave the "No" option blank, since if I don't want to enter a code, I can just leave. Under "Yes", I'll first add the text, "Input Code:", and then I added the command, "Name Input Processing", and picked the name "cheatcode". I left the number of characters at 6. Next, add the command, "Conditional Branch", with the condition being that Actor "cheatcode" has the Name "(whatever your cheatcode is)" Applied. My cheatcode is, "hello".
Image5.) Under "Else", add some text such as, "I'm sorry, that is not a valid code". If the player types the code wrong, or doesnt know one, that text will appear. When the condition is met, add some text such as, "Congratulations, you have received 1000 gold!". Then, simply give the player the reward, in this case, add 1000 gold to their gold count.
Image6.) Click apply and Playtest your game! You can now enter codes and receive rewards for doing so!
Image (1)Image (2)Hope you enjoyed this tutorial!