I'm having major problems with sprites reappearing even when I use setflag and hidesprite. They are gone temporarily, and will appear again some time when I come back to the map. If I leave the map and come back right after the script has occurred, they will be gone. However, if I go off and train my Pokemon, continue on the story, etc, the sprite will reappear when I come back. I am not reusing flags, and the flags are in the 2000's and 4000's ranges, so they're definitely not interfering with flags already put into the game.
I'll just write a random script that would normally hide the sprite:
Code:
#dynamic 8000000
#org @start
trainerbattle 0x1 0xA 0x0 @a @b @c (I have no idea if the 2 and 3 lines are switched up or not; don't even worry about it.)
release
end
#org @c
msgbox @d MSG_FACE
fadescreen 0x1
hidesprite 0x4 (Yes, I know it's the Person Event No.)
setflag 0x2542 (Yes, I know it's the Person ID.)
fadescreen 0x0
release
end
msgbox @a
= Hey!\pLet's battle!
msgbox @b
= Argh! You won!
msgbox @d
= I'll see you around.\pGoodbye!
When trainers like the above reappear, nothing happens when you interact with them; you just hear a clicking noise.
If it's just a simple one like this..
Code:
#dynamic 8000000
#org @start
checkflag 0x820
if 0x1 goto @did
msgbox @hi MSG_FACE
release
end
#org @did
msgbox @bye MSG_FACE
fadescreen 0x1
hidesprite 0x3
setflag 0x3500
fadescreen 0x0
release
end
#org @hi
= I am the door guarder.\pYou must have the 1st badge\nto enter this door.
#org @bye
= Wow!\pYou got the first badge?\nWell, I guess I must leave.
...the sprite, when it reappears, will perform the script again (says bye, screen fades, sprite disappears). Then, if you come back some random time after you progressed in the game more, he'll be there again.