Variables are like little boxes that store information for your bot. They help bots remember numbers, items, or player progress.
- A variable is a value your bot can keep track of.
- Think of it like a note the bot writes down: βscore = 5β or βcoins = 10.β
- Bots can then check or change that note during interactions.
There are two main kinds of variables:
* Bot Variables
* Player Variables
Bots can change variables using actions:
- Set β Give the variable a specific value (e.g., score = 0).
- Increment β Add 1 to the variable (e.g., score becomes 6).
- Decrement β Subtract 1 from the variable (e.g., lives become 2).
- Add/Subtract β Change the variable by a chosen number (e.g., coins +10).
- Random β Set the variable to a random number within a range.
Conditions let bots check variables:
- = (equals to) β Is the variable the same as a number?
- > (greater than) β Is the variable bigger than a number?
- < (less than) β Is the variable smaller than a number?
- >= (greater than or equal to) β Is the variable at least a number?
- β (less than or equal to) β Is the variable no more than a number?
Example:
βIf player coins >= 10 β Give ticket.β
Variables are the memory of your bot. They let bots:
Use Actions to change variables and Conditions to check them.