Why can no one understand variables? They're not that hard, and they're a basic element of programming anything ;_;
Anyway, a variable is just what its name implies. It is a storage place for varying data. Let's say you wanted the game to track how many Magic Crystals you've found. Every time you find one, in the event, add 1 to a variable such as 0001:Magic Crystal. Later on, you could have someone say, "Wow! So far you have found /v[ooo1] Magic Crystals!" (At least, I think that's the code used)
The biggest use for variables comes in with custom battle systems. They can store numbers such as HP/MP totals, character and enemy stats, and so forth. One variable can also be used mathematically with another. For example, in a custom battle system, you might use a formula to calculate damage, and then subtract the damage total from the enemy's HP total.
Variables can be used in fork conditions and event conditionals, making them the most versatile thing in RM2K and RM2K3. From simple item tracking, to keeping track of the time, to storing and displaying numbers, coding dual commands, customs shops, minigame scorekeeping, an ammo system, the uses go on and on.
Anyway, a variable is just what its name implies. It is a storage place for varying data. Let's say you wanted the game to track how many Magic Crystals you've found. Every time you find one, in the event, add 1 to a variable such as 0001:Magic Crystal. Later on, you could have someone say, "Wow! So far you have found /v[ooo1] Magic Crystals!" (At least, I think that's the code used)
The biggest use for variables comes in with custom battle systems. They can store numbers such as HP/MP totals, character and enemy stats, and so forth. One variable can also be used mathematically with another. For example, in a custom battle system, you might use a formula to calculate damage, and then subtract the damage total from the enemy's HP total.
Variables can be used in fork conditions and event conditionals, making them the most versatile thing in RM2K and RM2K3. From simple item tracking, to keeping track of the time, to storing and displaying numbers, coding dual commands, customs shops, minigame scorekeeping, an ammo system, the uses go on and on.
Comment