You are not logged in.
I am attempting to add an overworld encounter to a map in Pokered (similar to the legendary birds' encounters), and have one issue I can't seem to figure out. The object and its scripts seem to work fine, the encouter is appearing like it should, and interacting with it triggers the battle properly. The one problem is that, after the encounter, the object remains on the map. The event seems to be working properly, as when I interact with the object again, it does not trigger a second battle, it just displays the text and plays the cry as if it were an NPC. I'm assuming this is due to some setting somewhere in a more obscure asm file involving redrawing maps or something, but I have not been able to locate it digging through the files on my own. If someone with experience adding in overworld encouters could let me know where to look, it'd be much appreciated. Thanks.
You need to make your sprite "missable". You assign it a constant in hide_show_constants.asm, and add it to the corresponding MapHS array (data/hide_show_data.asm), specifying the default value (hidden or shown). After doing this, everything is automatic. You can hide or show the sprite anytime in your script by setting wMissableObjectIndex to the sprite's HS constant and calling HideSprite or ShowSprite.
By the way, use the help/question section of the forums to post these kind of threads asking of help. This section is better suited for tuorials and contributions.
Last edited by Crystal_ (2017-10-05 15:08:11)