The PokéCommunity Forums

The PokéCommunity Forums (https://www.pokecommunity.com/index.php)
-   Binary ROM Hacking (https://www.pokecommunity.com/forumdisplay.php?f=284)
-   -   Other Hide Sprite (https://www.pokecommunity.com/showthread.php?t=359737)

Demonheadge December 12th, 2015 11:39 PM

Hide Sprite
 
Hello, I've got a problem :|

I'm trying to keep my sprite hidden until a flag is active. But I can't figure out how to do it.

What I want to do:
Sprite is hidden until the flag is activated. (PROBLEM)
Once active I want the sprite to become visible.
I then want to battle it, after the battle I want to clear the flag so it becomes invisible again.



My only problem is having the sprite invisible before the flag is activated.



Thanks in advanced!

Joexv December 13th, 2015 12:24 AM

In an earlier script set a free flag, and make sure that the sprite's person ID is set as the flag.
Then in whatever script you need him to be shown in, simply clear the flag and if its on the same map, then use a showsprite command.

But as far as I know, you can't have a sprite hidden until a flag is set, only after its set will it be hidden.

Hopefully that made sense.

Demonheadge December 13th, 2015 3:09 AM

I assigned this to a script tile at the beginning of the map.

Quote:

#dynamic 0x800000

#org @start

checkflag 0x1452
if 0x1 goto @SHOWCHICKEN
hidesprite 0x9
release
end

#org @SHOWCHICKEN
showsprite 0x9
release
end


So thank you very much.

Dr. Seuss December 13th, 2015 5:55 AM

Flag 0x1452 isn't usable unless you extend the safe flags, try to use a flag in the range 0x200-0x2FF

Demonheadge December 13th, 2015 7:42 PM

Quote:

Originally Posted by ~Ruki! (Post 9033162)
Flag 0x1452 isn't usable unless you extend the safe flags, try to use a flag in the range 0x200-0x2FF

extend the safe flags?
I've been using 1200-1500 this whole time for my rom hack because I thought that there should be nothing in them to clash.

chrunch December 13th, 2015 8:45 PM

Quote:

Originally Posted by Demonheadge (Post 9034048)
extend the safe flags?
I've been using 1200-1500 this whole time for my rom hack because I thought that there should be nothing in them to clash.

Those flags don't exist, what you're doing by using them is overwriting other memory areas in the ROM. It might appear to work but behind the scenes you're likely slowly breaking the game. Here's a document on safe flags/vars if you're interested.

destinedjagold December 13th, 2015 10:17 PM

Alternatively, you can use a level script in the map to move that NPC away from sight until a certain event is completed.

Demonheadge December 14th, 2015 3:22 PM

Quote:

Originally Posted by destinedjagold (Post 9034202)
Alternatively, you can use a level script in the map to move that NPC away from sight until a certain event is completed.

I tried a level script but I couldn't get it to work for some reason.

Demonheadge December 14th, 2015 3:40 PM

Quote:

Originally Posted by chrunch (Post 9034131)
Those flags don't exist, what you're doing by using them is overwriting other memory areas in the ROM. It might appear to work but behind the scenes you're likely slowly breaking the game. Here's a document on safe flags/vars if you're interested.



Oh dear... Thanks for the heads up.


All times are GMT -8. The time now is 2:24 AM.


Like our Facebook Page Follow us on Twitter © 2002 - 2018 The PokéCommunity™, pokecommunity.com.
Pokémon characters and images belong to The Pokémon Company International and Nintendo. This website is in no way affiliated with or endorsed by Nintendo, Creatures, GAMEFREAK, The Pokémon Company or The Pokémon Company International. We just love Pokémon.
All forum styles, their images (unless noted otherwise) and site designs are © 2002 - 2016 The PokéCommunity / PokéCommunity.com.
PokéCommunity™ is a trademark of The PokéCommunity. All rights reserved. Sponsor advertisements do not imply our endorsement of that product or service. User generated content remains the property of its creator.

Acknowledgements
Use of PokéCommunity Assets
vB Optimise by DragonByte Technologies Ltd © 2023.