...
setvar 0x8004 0x0 // 0x0 makes special 0xFF check the first party slot
special2 0x8000 0xFF // Stores the species number in variable 0x8000
compare 0x8000 0x19 // Checks if Pikachu was the returned result
if 0x1 goto @PikachuIsFirst // Branches the script if true
...
If you're using FR, you can do this pretty easily with special 0xFF. It takes the value of variable 0x8004, selects the party position indicated by it and then returns the species number of that Pokemon. Here's an example of it in action:
Code:... setvar 0x8004 0x0 // 0x0 makes special 0xFF check the first party slot special2 0x8000 0xFF // Stores the species number in variable 0x8000 compare 0x8000 0x19 // Checks if Pikachu was the returned result if 0x1 goto @PikachuIsFirst // Branches the script if true ...
Hopefully that's what you're after.
Is there an Emerald equivalent of that method friend?
Legend. Had no clue you were a fellow Aussie! Also, the screenshots for Lilac look amazing so far. I hope it all goes well for you with that project.Aye, special2 0x149 is the equivalent in Emerald and works exactly the same way. Its used by the Name Rater to check if you have an egg, but it can be used to check for other Pokemon as well.