trebornosliw
Learning
- 516
- Posts
- 15
- Years
- Seen Jul 22, 2012
One question, very simple, but I haven't a clue:
How can I check a variable, and if its, say, 01 or 00 goto another part of the script?
Very simple. The way it works is very similar to a flag. Here's a quick example in XSE:
Spoiler:
#dynamic 0x800000
#org @example
compare 0x800D 0x0
if 0x1 goto @first
compare 0x800D 0x1
if 0x1 goto @second
compare 0x800D 0x3
if 0x1 goto @third
So, when you use a "setvar 0x800D" you're assigning a value to that offset (just for the record, it's best not to mess with 0x800D, as this var is used for stuff like checkpokemon, etc. Look at Diegoisawesome's tut for more info on those). You then compare the value stored at that offset with the "compare 0x800D" command to any number. For instance, if I assigned the number 1 to 0x800D and want something special to happen, "compare 0x800D 0x1, if 0x1 goto... etc."
Hope that helped!