Special2
I'll show an example script fragment. This is a "checkpokemon" only usable for Fire Red.
Code:
setvar 0x8004 0x19special2 0x800D 0x17Ccompare 0x800D 0x1if 0x1 goto @have
First, we assign the value to the variable 0x8004. Using this command, the value is the Pokemon we want to check for. In this case, it's Pikachu.
Now, we have
special2.
special2 is set out like this:
Code:
special2 [Variable to store value] [event to call]
The event we use is 0x17C; this checks if the Pokemon that we have set to 0x8004 is in our party. If it is in our party, 0x1 is assigned to the variable, which in this case is 0x800D. If it's not in our party, 0x0 is assigned to the variable.
The following
compare and
if act in the same way as the
compare and
if used with the
checkitem. If you've forgotten, here's a quote of myself to help you:
Quote:
Originally Posted by
diegoisawesome
This compare checks for "Yes, you've got the item (0x1)" or "No, you don't have the item (0x0)"
By now, you should be able to tell what the if should do.
There you go. Lesson 1 on
setvar and
special2 under your belt.