The PokéCommunity Forums  

Go Back   The PokéCommunity Forums > Fan Games > Binary ROM Hacking
Reload this Page Other hidesprite Not Working?

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 July 3rd, 2014 (7:48 PM).
Justifis Justifis is offline
 
Join Date: Jun 2014
Gender: Male
Posts: 29
This script is set up as a map script to trigger on entering map. Here's the code:

Code:
'---------------
#org 0x804825
checkflag 0x1210
if 0x0 goto 0x880486E
end

'---------------
#org 0x80486E
hidesprite 0x01
end
In my mind, it's very straightforward and simple. I've used hidesprite many times before, but it was used alongside setflag and worked without a hitch. I don't believe I can use setflag here, (I probably can, but I think it would make it more complicated than it needs to be) because I want this sprite to appear after triggering an event, hence the checkflag.

I've also tried reversing it and setting the sprite as hidden in order to use showsprite in place of hidesprite, but that hasn't worked either.

Why won't this guy stay hidden?
Reply With Quote
  #2   Link to this post, but load the entire thread.  
Old July 3rd, 2014 (7:58 PM).
Renegade's Avatar
Renegade Renegade is offline
Time for real life...
 
Join Date: Nov 2011
Location: United States
Gender: Male
Nature: Careful
Posts: 995
Quote:
This script is set up as a map script to trigger on entering map.
You can't have a level script that only has the command 'hidesprite'. In fact, 'hidesprite' in a level script would do nothing. You'll need 'setflag 0xXX' in order to keep the NPC hidden.

For example: If you used 'hidesprite 0xXX' in a level script, the moment you walk into the map, the NPC will be hidden. However, once you take a single step, the NPC will reappear because a flag hasn't been set to keep him hidden.
__________________
Reply With Quote
  #3   Link to this post, but load the entire thread.  
Old July 3rd, 2014 (8:16 PM).
Justifis Justifis is offline
 
Join Date: Jun 2014
Gender: Male
Posts: 29
Should this work in the long run?

Code:
'---------------
#org 0x873346
checkflag 0x1210
compare LASTRESULT 0x1
if 0x0 goto 0x887A8CC
compare LASTRESULT 0x1
if 0x1 goto 0x887A8DF
end

'---------------
#org 0x87A8CC
hidesprite 0x1
setflag 0x1211
end

'---------------
#org 0x87A8DF
clearflag 0x1211
end
He's hidden now, I just want to know if it's fine to let clearflag run every time after I setflag 1210.
Reply With Quote
  #4   Link to this post, but load the entire thread.  
Old July 3rd, 2014 (8:19 PM).
Renegade's Avatar
Renegade Renegade is offline
Time for real life...
 
Join Date: Nov 2011
Location: United States
Gender: Male
Nature: Careful
Posts: 995
Yes, that's perfectly normal.
It is kinda weird how that works, but that's right. ;)
Reply With Quote
  #5   Link to this post, but load the entire thread.  
Old July 3rd, 2014 (8:25 PM).
Justifis Justifis is offline
 
Join Date: Jun 2014
Gender: Male
Posts: 29
Thank you! But now I've got another problem... I don't think this pertains to what I just did at all, but right outside the house that I had that problem script in, my player sprite is changing randomly...

If I go into a wild battle while in sight of an old man, (he's barely on-screen at one patch of grass) when I exit the battle my camera is still centered on the player sprite, but I'm controlling the old man. Any ideas?
Reply With Quote
  #6   Link to this post, but load the entire thread.  
Old July 3rd, 2014 (8:37 PM).
Renegade's Avatar
Renegade Renegade is offline
Time for real life...
 
Join Date: Nov 2011
Location: United States
Gender: Male
Nature: Careful
Posts: 995
Oh dear. =/
Yeah, this is a strange bug. Fortunately, it's an easy one to fix.

When you're mapping, don't use NPCs with a movement permission of 'look down'. Rather, use the movement permission 'no movement'.
This will create the exact same effect as 'look down' but you won't get any glitches out of it. You may think that you can't use a trainer that needs the permission 'look down', but I don't think the glitch applies to NPCs with the trainer box checked in A-map, as I've never gotten trainers to activate the glitch before.
__________________
Reply With Quote
  #7   Link to this post, but load the entire thread.  
Old July 3rd, 2014 (8:41 PM).
Justifis Justifis is offline
 
Join Date: Jun 2014
Gender: Male
Posts: 29
Ah, you're right, that is extremely strange. It never occurred to me that it could cause a bug. But, it's fixed, thanks so much!
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:11 AM.