|This article is a stub. You can help Blocksworld Wiki by .|
"Integer" means whole number.
Variables defined as they're changeable, inconstant.
Using integer variables[edit | edit source]
Variables are used to record numerical (whole-number) values. They can be used when the Score variable isn't enough, and more numbers need to be recorded.
Creating a variable[edit | edit source]
Create a new variable by dragging the "Integer" action into an Action Panel. Then choose its name. This adds an integer with that name to the Build Panel along with some other actions.
This action should only be used to initialize the variable.
Add and Subtract[edit | edit source]
Adds or subtracts a specified value to the variable. Note that you can add and subtract negative values.
Examples[edit | edit source]
(This may be irrelevant)
On Roblox, I will do an example;
blocksworldrules = 5
rocknrollmcdonalds = 4
Then I will add them just by printing.
And we'll see the results in Output!
Equal to[edit | edit source]
(Some people might be puzzled of what these does normally as a kid).
This can be an action and a condition, including simple explanations.
As an action[edit | edit source]
Sets the variable's value to the specified value. (Changed the value to what you wanted to change)
As a condition[edit | edit source]
Checks if the variable's value is equal to the specified value. (This should be common sense)
Displaying integer variables[edit | edit source]
Any occurrence of
where name is the name of an existing variable, is replaced with the value of that variable. example: If I can name a variable "coot", you put <coot> on any text
Greater than and Less than[edit | edit source]
Condition only. Checks if the variable's value is greater than (or less than) the specified value.
Not equal to[edit | edit source]
Condition only: Checks if the variable's value is not equal to the specified value. (This is the opposite of Equal to.)
Difference between integers and the Score[edit | edit source]
- Integers don't have a maximum or minimum value. They can be negative numbers and also numbers higher than 100 (or even 1000).
- (Technically, they do have a max and min value, but they have a much larger range of possible values compared to the Score.)
- Integers are not displayed under the UI text like the Score.
- Integer variables are also global. (They have the same value across all scripts in the world.)
- The Score has similar actions: Equals, Add, Subtract, Is Less, Is More, Is Not
History[edit | edit source]
Integer variables were introduced in the Blocksworld 1.37.6 update.