Variable
Introduction
Variables offer a method of saving data to memory. They can be used to save settings, such as the current rotation of a camera, the number of items held, the lead party character, and so forth.
Supported Types
Variables can be stored as three different types:
- strings of characters (string)
- whole numbers (integer)
- floating-point numbers (float)
If a variable stores an integer, it can still be leveraged the same way a string would, and vice-versa. RPG Architect does its best to interpolate what your data is stored as and leverage it as the desired type.
Contexts
Contextually, variables are supported globally and locally.
Local
Local contexts are generated for an individual instance. Local instances are usually setup on their respective containers and only exist while that container is active. If the container is no longer in play, the local data is removed.
Global
Global contexts exist throughout an instance of a game, regardless of where they exist. This is the default way variables are implemented in most engines.