Site hosted by Angelfire.com: Build your free website today!

RM2k- Enter Password




I) What is it?
II) Uses of the Enter Password
III) REAL Password Function [Difficulty: Beginner]
Credits


Please note: Rather than explaining how each thing works, I am giving examples of features that can be included in a game without including the raw code. I hope that these inspire you to experiment and play around with switches and variables.


I. What is it?

-> What is it? <-
The Enter Password function is a line of RM2k code that simply tells which button you pressed and then stores it into a variable.

-> Where is it? <-
It is located on the third page of the Event Commands, on the left side seventh from the top.

-> Could you explain the button a little better? <-
There are four checkboxes and a dropdown menu. The variable you select is where the value of the key is stored. The "Wait until pressed" will not store a variable until a key is pressed. The remaining three tell the RM2k what keys to recognize when you press a button. The values of the keys are as follows:
6= Escape, NumPad 0
5= Enter/Return, Spacebar
4= Up, NumPad 8
3= Right, NumPad 6
2= Left, NumPad 4
1= Down, NumPad 2


II. Uses of the Enter Password

While it is possible to create a password with this, it's mainly used to create custom systems and mini-games.
In a Custom Battle System, the Enter Password can be used to select battle commands or even to impliment multi-key combinations. (Ex. Up, Up, Up=Special Attack).
In a Custom Menu System, you could use it to select options from the menu.
For use with a mini-game, anything can happen, depending on the mini-game.


III. REAL Password Function [Difficulty: Beginner]

{You need 1 variable}

So you want an actual password? The following can help you with making a number password. To include letters, you'd need to make a Custom Password System.
--------------------

  1. Make a new event.
    • For the Event Conditions, leave everything blank.
    • For the Graphic, set it to a gate or something that might need a password.
    • For the Event Start Conditions, set it to Push Key and Same Level as Hero
    • For the Movement Type, make it stay still.

  2. Double-click on the Event Commands
    • Show message, "What's the password?"
    • Input Number, 3 digits and store into a variable.
    • Make a Fork Condition (Check variable, type the password number, and select same.
      (In the fork)
      • Show message, "Correct!"
      • Do whatever else you want.
      (In the Else case)
      • Show message, "Wrong!"

**You can change the text messages to whatever you want**


Credits
--------------------
If you wish to use this tutorial on your website, you must link directly from your website to this document (https://www.angelfire.com/rpg2/mastersean2k/enterpassword.html) unless given permission.

Written by MasterSean2k.
mastersean2k@hotmail.com
http://mstuff.s5.com
© 2002 by MasterSgameS

RM2k by ASCII
RM2k translationby Don Miguel