Quote:
Originally Posted by PI Hudson
QUESTION: Is there a way to check if a pokemon is holding an item?
|
Not with scripting. You need ASM.
Quote:
Originally Posted by Gamer2020
Hey guys. I have a problem.
Basically I wrote a script so that when the player steps on a certain spot a sprites goes up to him and battles him.
It works up until after the battle where it just plain goes sour.
Ive attached a small video to show you what happens.
This is the script
|
Fixed (mostly optimized) script is below. Anyway, the script isn't the root of the problem at all. Do
not follow the suggestion to set "No movements" because then applymovement will not work. Also, "Look down" isn't glitchy at all. It's just you need to set the Movement to 11.
Quote:
Originally Posted by mrhiyuck
This all works.. with a couple exceptions. Even without a pokeball, the checkitem doesn't seem to switch to "jerk". It does take a pokeball if you have one but if you don't it still continues without switching.
Also hidesprite works, but when you move just one step, the sprite returns. Could someone help me with these?
|
That's not the way checkitem works.
You do something like this:
Code:
checkitem 0x172 0x1
compare LASTRESULT 0x1
if 0x0 goto @donthave
About the "sprite returning"... that's normal. Hidesprite will hide the sprite only temporarily.
Before the hidesprite command you need to use a setflag, which value is the Person ID you set.