What are Variables?

Variables are like boxes into which data can be put.
Numbers/values, text, switches, etc. can be stored and used at various points in the game.
Putting data into variables is called "assignment".

Example:
If you assign the value "1000" to the variable "money", the variable "money" always has the meaning of the value "1000" in the game.
The variables themselves are boxes, so the values inside can be added or subtracted.
If we add another value "500" to this variable "money", "money" has the meaning of the value "1500".
On the other hand, when the variable "money" is assigned the value "500," the content of the variable is overwritten and "money" becomes the meaning of the value "500".

By utilizing variables, a variety of expressions are possible in the game.

The initial value of all variables is 0.

Variable Types

Bakin provides the following types of variables.
The following describes the values/strings/local values/arrays/cross-save shared and event switches.

Values

It is basically the most common variable used to store numeric values.
These variables can be referenced from anywhere within a single game.

<Example of Use>

* Although a similar event can be created with a local variable, using this value variable makes it possible to refer to the value managed by the variable from other events.

Strings

It is basically variables that are used to store text.
These variables can be referenced from anywhere within a single game.

<Example of Use>

Local Values

These variables work the same way as values, but they can be referenced from "only in the event in which this variable is specified".
By keeping variables that need to be used only within a single event as local variables, the list of variables can be prevented from growing.

<Example of Use>

These can be realized with value variables, but can be handled with local value variables.

Array Variables

These variables can manage multiple variables at once.
Array variables allow multiple variables to be managed together in a single variable.
These variables can be referenced from anywhere within a single game.

Think of an array as a row of smaller boxes inside a larger box.
The name of the large box is the name of the array variable.
When referring to the contents of a small box in an array variable, the value "pointer" is used to specify which box to refer to.
Example: In the array variable "price of weapon", "pointer = 1" contains "price of sword" and "pointer = 2" contains "price of bow".

<Example of Use>

Cross-Save Shared Variables

These variables have the widest influence across saves and can be referenced from anywhere in the game.

<Example of Use>

Event Switches

Event switches that can be manipulated by command scripts are also a type of variable.

<Example of Use>


Front page   Edit Freeze Diff History Attach Copy Rename Reload   New Page list Search Recent changes   Help   RSS of recent changes
Last-modified: 2022-12-27 (Tue) 01:15:53