Tricks -- Enemies hidden in walls
Hiding enemies in walls is another neat trick (and is related to "transparent" walls.) With this trick, you have an enemy (or multiple enemies,) hidden in the walls of a room or other type of area, and at a certain time (generally when the player enters the area,) the enemy pops out of the wall and attacks or chases after the player. As you may have figured out already if you read the section on transparent walls, in any case, the wall is transparent after the enemy pops out of it.
There are 3 main ways of hiding enemies in walls:
- The easiest way to hide an enemy in a wall is to place the enemy right inside the wall. Unfortunately, however, this method doesn't work too well, because the guard (usually) will either always be triggered regardless of what floor code the player is on or will never be triggered even if the player is on the floor code next to the wall. That's because the enemy is standing on an "abnormal" floor code. ("Abnormal" floor codes are discussed later.) However, this method works fine for bosses (apart from Pac-Man ghosts, which, if placed right inside a wall like this, usually get triggered the instant the level is started.)
- The general way of hiding an enemy in a wall is to place the enemy (a patrolling enemy) right next to and facing the wall and to have two turning points, one in the wall and pointing the direction the enemy is facing and the other pointed the opposite direction in the wall that the enemy would walk into if it kept walking after going through the first wall. The enemy will walk into the wall and stay there. If you've already read the previous section, you know that the enemy has to initially walk through the wall. Because this method uses patrolling enemies, it can also work with dogs (which are always patrolling.)
- Another way of hiding an enemy in a wall is to use a variation of the above method, where rather than having the two turning points to keep the enemy in the wall, you have turning points in empty floor space behind the wall so that the enemy walks through the wall (making it transparent, of course) and walks in a holding pattern behind the wall. This method should mainly be used if you're doing special twists with this trick (like having enemies pop out of walls only after a certain amount of time has passed among countless other things.) This method, along with a variation (using a dead guard rather than a patrolling guard to make the wall transparent,) also allows you to hide Pac-Man ghosts behind walls.
The first method generally should not be used at all (except for bosses other than Pac-Man ghosts,) and the third method should mainly be used when it's necessary. When the second method, generally the preferred one, is used, the enemy will not be triggered until the player is on the floor code adjacent to the wall (take note that because it is a patrolling enemy, the "deaf guard" floor code will NOT work) and is in the guard's sight or fires a shot. Also, with the second method, it is preferred to (when you can) have the player approach from the west/east sides, because then the enemies in the walls won't notice the player when the player isn't farther into the room. If the player approaches from the north/south sides, the enemies will be triggered right away.
There are many neat twists that you can add to this trick. While the common thing to do with this trick is to have a room that looks empty and have enemies pop out of the walls and attack the player when the player comes in (or fires a shot in the area,) there are many twists that can be added. Here are some:
- Have the room on one floor code with the tiles that the hidden enemies are initially standing on (no other tiles, of course,) on a different floor code. If you do this, the enemies on the second floor code won't pop out of the walls right away -- no, not even when the player enters the room. However, once the second floor code is triggered, they'll be ready to attack the player. While there are a number of things that you can do with this twist, one is to have the second floor code adjacent to the second door. Then, when the player tries to leave the room through the second door, the enemies will suddenly pop out of the walls and attack the player.
- Use the third method to hide the enemies behind the walls and have corridors behind the walls that they can walk in and move to various locations. If you do this, there are countless different twists that you can do (if you have a locked door or something to prevent the player from entering the hidden area.)
One other thing: You can also place enemies in doors. To do this, place a standing enemy in a door. Take note, however, that the player WILL be able to see the enemy standing in the door. After the enemy walks out of the door (if it does,) the door will be transparent until it is opened and closed.