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 Change warps depending on whether or not an event has occured (https://www.pokecommunity.com/showthread.php?t=349965)

CoolKortmaniac June 2nd, 2015 6:36 AM

Change warps depending on whether or not an event has occured
 
So in my hack, there is a part right after you receive you first Pokemon in the lab. Instead of fighting blue as you leave the lab like in the original game, the screen shakes and the prof.'s all like hey what was that and then you all go out and an explosion has happened at the bottom of the map. How do I make it so that when you leave, it takes you to this new map after the first Pokemon event, but not if you entered and exited the lab or other houses in the town before receiving your Pokemon?

Pokenon June 2nd, 2015 7:02 AM

Quote:

Originally Posted by CoolKortmaniac (Post 8778725)
So in my hack, there is a part right after you receive you first Pokemon in the lab. Instead of fighting blue as you leave the lab like in the original game, the screen shakes and the prof.'s all like hey what was that and then you all go out and an explosion has happened at the bottom of the map. How do I make it so that when you leave, it takes you to this new map after the first Pokemon event, but not if you entered and exited the lab or other houses in the town before receiving your Pokemon?

I think you can replace the Warp Boxes in Advance Map with Script boxes. Use the warp command in XSE. You can also setvar so that it is only entered once.

I think I can't really explain it well so here's an example.

Spoiler:
Ensure you have a script so that the warp can change!

Script for warp to change!

#org @start
compare 0x4033 0x1 // checks if the msgbox has been said to you.
if 0x1 goto @end
msgbox @1 0x06
setvar 0x4033 0x1 // So that the next time you talk to the person, it does not say the same thing.
end

#org @end
end


Now for the Script Boxes added to the door for warp.
Let your map be 0,1
Make sure the Var no. is 4033 and Var value is 0000

#org @warp
compare 0x4033 0x0
if 0x01 goto @normal // if you haven't talk to professor, the warp is normal.
compare 0x4033 0x1
if 0x01 goto @explosion // if you talked to professor, the warp is to the explosion site.
end

#org @normal
warp 0x0 [mapbank] 0x1 [mapno.] 0x0 [warp no.] 0x0 0x0 [fillers]
end

#org @explosion // warps you to the other map.
warp 0x1 [mapbank] 0x5 [map no.] 0x0 [warp no.] 0x0 0x0 [fillers]
end

When you are done with that explosion scene, you can setvar back :)

C me June 2nd, 2015 9:06 AM

^
Or you could use the setmapfooter command. Set a flag during the scipt then make a level script on the map that will change that checks for the flag and if it's set it changes the map. No idea how setmapfooter works though, so you would have to use an existing map with a setmapfooter.

In summary, do the thing above. :)


All times are GMT -8. The time now is 2:22 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.