001 Action / RPG Maker


Variables

From Wiki001

Jump to: navigation, search
There are Tutorials related to Variables in the tutorial section of the 001 website. Click here to view them.
The location of the variables tab
The location of the variables tab

A variable is a placeholder symbol. It is used to store a value or text, that can be retrieved later anywhere in the game. Normally in programming you have to know and decide if the variable is a string, an integer, or a real, but thankfully Engine001 automatically allows variables to be any of these, and can be converted seamlessly.

It is quite common for a game to first use Variable Operation to alter a variable for different circumstances, and later use Comparison Branch to check if the variable is a certain number.

Global variables are located under the Scripting section on the left panel in Map001.

Uses

Variables are used in almost every script that makes a game good, including quests, banks, names, cheats, and almost any other script you can think of.

You can use a variable to find what the player types in an Input Box, or find what option he chose from a Message Box and save by using Variable Operation, so you can use it later in the game. Alternatively, you could just use a Switch.

See the tutorials and forum for guides on how to make the scripts mentioned above, and more.

Local Variables

Local variables are useful when you want a variable to be used in only one event script, and want it to reset to 0 after the script is finished. Example: A Poker game where the pot is reset after the game ends, without having to make a new event to set it back to 0.

Map Variables

Map variables are variables that are specific to a certain map. They can be created and altered from the Map Properties window, which can be accessed in the Map menu (next to file) or when you first create a map. These are usefull for events that only occur in the one map, but can be altered or retrieved anywhere.

Personal tools