- 37
- Posts
- 8
- Years
- Seen Oct 4, 2021
Should I risk flags 200+ unless they're listed or should I follow the advice in the XSE guide and use flags above 1000? Which is more accurate?
Should I risk flags 200+ unless they're listed or should I follow the advice in the XSE guide and use flags above 1000? Which is more accurate?
Flags over 0x1000 are actually used. They are reserved for trainer flags. 200-2FF is preferable.
Umm, problem with the Charmander givepokemon script?
If the player already has a Pokemon, it just skips to How's my charmander doing?
Can someone help? Thanks :)
If the pokemon you have is the charmander it gave you, then that's how the script is supposed to work, to not give you repeat pokemon.
If you want it to give you unlimited charmanders you'd have to remove the flag check and flag set, but that's not that great of a mechanic unless its for a nuzlocke using uncatchable pokemon or something.
The problem is: if you already have a Pokemon, even if you didn't yet receive the Charmander, the How's my charmander doing? script plays.
Ok so I haven't seen your code but I'm making 2 assumptions here, 1st that you wrote this script yourself, and 2nd (based on the first) that somehow you used the wrong check flag, and the game is checking the flag that sets the pokemon menu icon, instead of a unique flag for the script.
Luckily I'm working on an ingame trade script that needed to use that flag so I know the number.
The flag for the pokemon menu is 0x828. If that's what you have that's your problem.
But using that flag is a good way of preventing someone from accessing the trade without having a pokemon, not completely necessary depending on where the script npc is, but a good rule of thumb. So using your own discretion you can either delete the checks and ifs involving that flag.
Or you can take a look at how I did mine, to work around it, as your problem could also be the if statement after.
checkflag 0x828
if 0x0 goto 0x871A43E
So here its checking the flag to see if you have received a pokemon. (since the flag gets set when you receive your starter.
then my if statement is says, if the flag isn't set go here. That's how it should be.
Now if you had 0x1 instead of 0x0, in that case if you had pokemon it would skip the rest of your script and go to the pointer message and end.
In the case above it only continues through your script when the if is set to 0x0.
So try those options.
either remove checkflag 0x828, and the if statement below it.
or make sure its used correctly and the below if, is 0x0 and not 0x1.
Hope that does it for you.
Thanks! It works now :D I did accidentally use the 0x828 checkflag 😳
Thanks again!