View Single Post
  #7957    
Old February 27th, 2013, 06:32 AM
FBI agent
Imagine something beautiful
 
Join Date: Jan 2013
Location: Isle 4 - Dairy Products
Gender: Male
Quote:
Originally Posted by karatekid552 View Post
Umm FBI, trainer flags work backwards. They are cleared when you beat them. Another name for settrainerflag is enabletrainer. They are interchangeable names for the same command. Same goes for cleartrainerflag, its other optional name is disabletrainer.

I know that the commands themselves work that way, but the settrainerflag 0x0 command may be equivalent to a standard clearflag 0x500 (trainer flags are just regular flags starting at 500 if I remember correctly) so there is a chance that the main names for the commands are misleading. The only way to really tell would be to take a clean rom and right off the bat, checkflag 0x500 and see what it holds.

Proof- I wrote a working script to make every trainer in the game ready to battle again. It didn't work when I logically used cleartrainerflag, so when I switched to setrainerflag, everybody wanted to battle again.


Edit: Comrade likes your Signiture.
Derp, I always forget some detail. :D
You are right about the trainer flags, they do work differently (and in my opinion they should be named in script editors more consistently with other flags). The script should still work if you remove settrainerflag (you don't have to remove settrainerflag but it's a pointless command using up space, where it is right now) and change this part:

checktrainerflag 0x66
if FALSE jump @done

It's often easy to confuse/generalize on commands that appear to work in the same fashion. Sorry for any confusion last post caused.

I'm glad comrade likes my signature, I was originally going to leave it under maintenance forever :P
__________________
...

Hacks I support:
http://www.pokecommunity.com/showthread.php?t=297199 --Legend of Anbuja
http://www.pokecommunity.com/showthread.php?t=200227 -- Pokemon Rose version

People whom I thank:
Comrade -- For helping me with my bad hack, and for being a good friend
Darthatron -- Helping me get into basic ASM, even though I'm hopeless. (He is heartless stay away).
Anbuja's_BlooDY -- Graphics help, and being a good friend
FBI -- For having the username I wanted