The PokéCommunity Forums  

Go Back   The PokéCommunity Forums > Fan Games > Binary ROM Hacking
Reload this Page Script Make NPC appear only after some conditions

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 December 21st, 2017 (4:57 AM).
chentm's Avatar
chentm chentm is offline
Stylish Improv
 
Join Date: Oct 2009
Location: In the Cyberworld.
Gender: Male
Nature: Serious
Posts: 5
I would like to create a script that causes an NPC to appear only after some conditions have been met. However my approach seems to not work. For example, I want Bob's cat to appear only after Bob has been seen. My approach:

- Script Start -

#freespace 0xFF
#dynamic 0x9C0B20

#org @start
checkflag [seen bob flag]
if 0x0 call @hidecat
end

#org @hidecat
hidesprite [cat person id]

- Script End-

However when I tested this, Bob's cat is there despite the player not having seen Bob. How can I fix this?
Reply With Quote
  #2   Link to this post, but load the entire thread.  
Old December 21st, 2017 (5:50 PM).
Smileycorp's Avatar
Smileycorp Smileycorp is offline
Meh
 
Join Date: Jun 2015
Location: Sunnyshore City
Gender: Male
Nature: Lax
Posts: 64
Hidesprite only hides the sprite until the map is reloaded,

use setflag 0x(person id of the cat OW)

Setting a flag with the same flag number as the person ID of an overworld sets it not to show up.

So at some earlier point set the flag then use clearflag to clear it when you want the sprite to sow up.
Reply With Quote
  #3   Link to this post, but load the entire thread.  
Old December 23rd, 2017 (12:44 AM).
chentm's Avatar
chentm chentm is offline
Stylish Improv
 
Join Date: Oct 2009
Location: In the Cyberworld.
Gender: Male
Nature: Serious
Posts: 5
Quote:
Originally Posted by Smileycorp View Post
Hidesprite only hides the sprite until the map is reloaded,

use setflag 0x(person id of the cat OW)

Setting a flag with the same flag number as the person ID of an overworld sets it not to show up.

So at some earlier point set the flag then use clearflag to clear it when you want the sprite to sow up.
Appreciate the help man, thanks!
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:17 AM.