About Variables
[
Front page
] [
New
|
Page list
|
Search
|
Recent changes
|
Help
|
Log in
]
Start:
*What are Variables? [#f711fcd9]
Variables are like boxes into which data can be put.
Numbers/values, text, switches, etc. can be stored and us...
''Putting data into variables is called "assignment".''
Example:
If you assign the value "1000" to the variable "money", ...
The variables themselves are boxes, so the values inside...
If we add another value "500" to this variable "money", ...
On the other hand, when the variable "money" is assigned...
By utilizing variables, a variety of expressions are poss...
''The initial value of all variables is 0.''
#Contents
**Variable Types [#d274bd21]
Bakin provides the following types of variables.
The following describes the values/strings/local values/a...
--[About the Values You Can Put into Variables]
Although named "values" and "strings," all variables can ...
However, it is recommended that you use them appropriatel...
***Values [#odaebc83]
It is basically the most common variable used to store nu...
These variables can be referenced from anywhere within a ...
''<Example of Use>''
- An event in which the player asks the villagers about a...
This is accomplished by recording the number of times th...
- Count the number of remaining actions in the escape gam...
This is accomplished by recording the number of times th...
- Score attack with time limit / Time attack until a cert...
The current time and play time at the start are stored i...
* Although a similar event can be created with a local v...
***Strings [#eb9721d8]
It is basically variables that are used to store text.
These variables can be referenced from anywhere within a ...
''<Example of Use>''
- Doors and treasure chests that can only be opened with ...
This is accomplished by putting the correct answer and t...
- Conversational text calling out the name of the pet wai...
The name of the pet given by entering text is recorded i...
- Seeds and seedlings that can only be used if the terrai...
This is accomplished by recording the terrain resource n...
Use the ability to call common events from seed and seed...
***Local Values [#n0d22cd5]
These variables work the same way as values, but they can...
By keeping variables that need to be used only within a s...
''<Example of Use>''
- Leave the lid of the opened treasure chest open.
- People whose friendship level changes through conversat...
- Rocks that can be broken if the level or attack power i...
- Merchants with different products depending on the day ...
- Fortune-telling slips and betting with random numbers
These can be realized with value variables, but can be h...
***Array Variables [#ka311613]
These variables can manage multiple variables at once.
Array variables allow multiple variables to be managed to...
These variables can be referenced from anywhere within a ...
Think of an array as a row of smaller boxes inside a lar...
The name of the large box is the name of the array varia...
When referring to the contents of a small box in an arra...
Example: In the array variable "price of weapon", "point...
''<Example of Use>''
- Shopping list for a mission to run an errand
Record the items that need to be bought in a pointer to ...
- List of management game products and their remaining nu...
The name of product A is recorded at pointer 0, the rema...
- Naming List
The name is chosen and named by placing name candidates i...
With two array variables, two or more phrases can be comb...
To put a string into an array variable, use the command ...
However, if you want to display the contents of an array...
***Cross-Save Shared Variables [#h8ca6c8a]
These variables have the widest influence across saves an...
---If the contents of these variables are overwritten in ...
---Use Test Play > Options > Debug Window to rewrite the ...
''<Example of Use>''
- Change the contents of events that occur in pre-game an...
- In a multi-ending game, record only the endings that th...
***Event Switches [#lc038bfb]
Event switches that can be manipulated by command scripts...
---Any type of variable can be treated as an event switch.
The range in which switches can be referenced is based on...
---If the value in the variable is 0, it is treated as of...
---When the event switch is turned off, the contents of t...
''<Example of Use>''
- Changing the reactions of other NPCs based on whether o...
After speaking with the key cast members, turn on event ...
End:
*What are Variables? [#f711fcd9]
Variables are like boxes into which data can be put.
Numbers/values, text, switches, etc. can be stored and us...
''Putting data into variables is called "assignment".''
Example:
If you assign the value "1000" to the variable "money", ...
The variables themselves are boxes, so the values inside...
If we add another value "500" to this variable "money", ...
On the other hand, when the variable "money" is assigned...
By utilizing variables, a variety of expressions are poss...
''The initial value of all variables is 0.''
#Contents
**Variable Types [#d274bd21]
Bakin provides the following types of variables.
The following describes the values/strings/local values/a...
--[About the Values You Can Put into Variables]
Although named "values" and "strings," all variables can ...
However, it is recommended that you use them appropriatel...
***Values [#odaebc83]
It is basically the most common variable used to store nu...
These variables can be referenced from anywhere within a ...
''<Example of Use>''
- An event in which the player asks the villagers about a...
This is accomplished by recording the number of times th...
- Count the number of remaining actions in the escape gam...
This is accomplished by recording the number of times th...
- Score attack with time limit / Time attack until a cert...
The current time and play time at the start are stored i...
* Although a similar event can be created with a local v...
***Strings [#eb9721d8]
It is basically variables that are used to store text.
These variables can be referenced from anywhere within a ...
''<Example of Use>''
- Doors and treasure chests that can only be opened with ...
This is accomplished by putting the correct answer and t...
- Conversational text calling out the name of the pet wai...
The name of the pet given by entering text is recorded i...
- Seeds and seedlings that can only be used if the terrai...
This is accomplished by recording the terrain resource n...
Use the ability to call common events from seed and seed...
***Local Values [#n0d22cd5]
These variables work the same way as values, but they can...
By keeping variables that need to be used only within a s...
''<Example of Use>''
- Leave the lid of the opened treasure chest open.
- People whose friendship level changes through conversat...
- Rocks that can be broken if the level or attack power i...
- Merchants with different products depending on the day ...
- Fortune-telling slips and betting with random numbers
These can be realized with value variables, but can be h...
***Array Variables [#ka311613]
These variables can manage multiple variables at once.
Array variables allow multiple variables to be managed to...
These variables can be referenced from anywhere within a ...
Think of an array as a row of smaller boxes inside a lar...
The name of the large box is the name of the array varia...
When referring to the contents of a small box in an arra...
Example: In the array variable "price of weapon", "point...
''<Example of Use>''
- Shopping list for a mission to run an errand
Record the items that need to be bought in a pointer to ...
- List of management game products and their remaining nu...
The name of product A is recorded at pointer 0, the rema...
- Naming List
The name is chosen and named by placing name candidates i...
With two array variables, two or more phrases can be comb...
To put a string into an array variable, use the command ...
However, if you want to display the contents of an array...
***Cross-Save Shared Variables [#h8ca6c8a]
These variables have the widest influence across saves an...
---If the contents of these variables are overwritten in ...
---Use Test Play > Options > Debug Window to rewrite the ...
''<Example of Use>''
- Change the contents of events that occur in pre-game an...
- In a multi-ending game, record only the endings that th...
***Event Switches [#lc038bfb]
Event switches that can be manipulated by command scripts...
---Any type of variable can be treated as an event switch.
The range in which switches can be referenced is based on...
---If the value in the variable is 0, it is treated as of...
---When the event switch is turned off, the contents of t...
''<Example of Use>''
- Changing the reactions of other NPCs based on whether o...
After speaking with the key cast members, turn on event ...
Page: