Everyone wants to put secret passages in their RPGs, but if your secret passage has to go through an impassable wall, it can get a little complicated.
People have different ways of doing it:
Duplicate Tiles
One of the simplest methods is to just duplicate your impassable wall tile onto another tileset and set it up so that it's passable (with * so the Player is actually hidden beneath it). Then just use those tiles on top of passable ground tiles where you want your secret passage.
The problem with this is that it fills up your available tilesets with redundant tiles, and if your impassable wall tile is an Auto Tile then it is a bit more difficult to duplicate them correctly and you'll likely run into other drawing problems as well. (Do note, however, that holding
Shift down when you
right click a map tile will copy that tile exactly onto another tile when you left click.)
Forced Movement
Another method I've seen is for the game to take control of the Player's movement while they're in the secret passage, and return control to the Player once they're on the other side.
I personally don't like this method, as it seems to defeat the purpose of having a secret passage in the first place (and I think Player movement should only be controlled during cut scenes).
Yanfly's Move Restrict Region (not a solution)
Yanfly's Move Restrict Region script allows you to specify regions on your map where a Player or NPC
cannot go. Of most interest is the option to block passage even if the Player has Through ON.
|
Region 61 = impassable tiles; 60 = passable tiles. |
Using this script, you could use events at the start and end of your secret passage to turn Through ON or OFF on the
Player (so they can pass through the impassable tiles freely)
and mark an impassable region around your secret passage to prevent the Player from being able to pass through the surrounding walls.
Alternatively, with a few adjustments, you can use similar logic to specify regions on your map where a Player or NPC can
always go (even if the tile is impassable!) and this way you no longer need events to toggle Player Through ON or OFF.
This would be the perfect, most efficient, simple, preferred solution, but...
The problem is, the now passable impassable tiles of your secret passage are not drawn on top of the Player. You
could create events to turn the Player's transparency on and off, but it's pretty clunky to do so and the animation just isn't smooth.
So if you want to utilise this method, you'd still need additional passable * tiles for your secret passage, which ultimately makes it unnecessary to use this method at all...
Tile Character Sheets
Similar to the Duplicate Tiles option, you could create special character sheets with your impassable wall tiles and then use Events (with those tiles as their graphic, and Priority set to Above Characters) to mark out your secret passage.
If you don't mind having a load of Events that don't do anything on your map, and you don't mind the tediousness of it (especially if you want your Player to also move over the top of these tiles at some point), then this is a pretty simple method that works pretty well once you've set up the character sheets (if your tiles are Auto Tiles, then this can take a bit of work).
Keep in mind that you need to save your character sheet with a ! at the start of its filename for RPG Maker VX Ace to draw them at their proper size.
Hime's Map Overlay
Hime's Map Overlay script allows you to have another map drawn over the top of an existing map. Using this script, you could put passable ground tiles down on your map where you want your secret passage to be, then create another map of the same size with your Auto Wall Tiles in the same place, and have Hime's script overlay it on top.
The Player would then freely be able to pass through your secret passage, hidden underneath the overlaid wall tiles, and no tricky event logic would be needed on your part. What's more, you can still use the overlay map as a normal map if you want your character to be able to jump across rooftops or something.
The downside is that you end up with extra maps in your map list, you can't see the overlay in the editor, and as such it can be a little tedious lining the two maps up.
Also, Hime's scripts are not free for commercial use.