The PokéCommunity Forums  

Go Back   The PokéCommunity Forums > Fan Games > Binary ROM Hacking
Reload this Page Script Setflag doesn't take effect until I reload the zone

Notices
For all updates, view the main page.

Binary ROM Hacking Need a helping hand or just want to talk about binary ROM hacks? Get comments and answers to any ROM Hacking-related problems, questions or thoughts you have here.

Ad Content
Reply
 
Thread Tools
  #1   Link to this post, but load the entire thread.  
Old November 4th, 2018 (4:21 PM).
Arilianis Arilianis is offline
 
Join Date: Jun 2014
Gender: Male
Posts: 3
I have a script that starts a fight, fades the screen and sets a flag. I have the flag set within the sprites person id within advance map.

The problem is the person even will disappear after the fight from the hidesprite function, but reappears whenever you take a step. HOWEVER, if you leave the zone and then re-enter, the person event does not show (as you would expect).

Why does this happen? How do I keep the person even from reshowing after the fight (and before you leave the zone).

The script in question:

Code:
#org @startfight
cry 0xFB 0x2
setwildbattle 0xFB 0x5 0x5D
special 0x138
playsong 0x156 0x0
fadescreen 0x1
fadescreen 0x0
hidesprite 0x800F
setflag 0x200
release
end
Reply With Quote
  #2   Link to this post, but load the entire thread.  
Old November 4th, 2018 (4:35 PM).
PITink PITink is offline
 
Join Date: Oct 2018
Posts: 7
I had the same problem with the sprites of the rocks when using rock smash. It helped for me when I changed the 0x800F to the exact sprite number.
Reply With Quote
  #3   Link to this post, but load the entire thread.  
Old November 4th, 2018 (4:42 PM).
Arilianis Arilianis is offline
 
Join Date: Jun 2014
Gender: Male
Posts: 3
I gave that a shot, but it didn't work. :( Same issue.
Reply With Quote
  #4   Link to this post, but load the entire thread.  
Old November 4th, 2018 (5:34 PM).
kalarie kalarie is offline
 
Join Date: Jun 2008
Posts: 760
When an overworld is already loaded in your savefile, the corresponding flag is loaded along with the overworld sprite. Try re-entering the map and run the script from there, that might work.
Reply With Quote
  #5   Link to this post, but load the entire thread.  
Old November 5th, 2018 (12:32 PM).
Arilianis Arilianis is offline
 
Join Date: Jun 2014
Gender: Male
Posts: 3
Quote:
Originally Posted by kalarie View Post
When an overworld is already loaded in your savefile, the corresponding flag is loaded along with the overworld sprite. Try re-entering the map and run the script from there, that might work.
For anyone who might be looking for this in the future, this was the issue I had. Simply leaving and re-entering the zone made it work as expected. Wish I figured that out sooner!

Thank you for the help, and for dropping that rather interesting fact. I'm still trying to learn a lot about gen 3 rom hacking.
Reply With Quote
Reply

Quick Reply

Join the conversation!

Create an account to post a reply in this thread, participate in other discussions, and more!

Create a PokéCommunity Account
Ad Content

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -8. The time now is 9:18 AM.