Tricks -- Doors that can be pushed

Make your own free website on Tripod.com

In Wolf3D, if you have a "pushable object" code on a door tile, the door will be "pushable" -- that is, if you "use" the door, it will transform into a block and slide back like a pushwall (note that if there is something right behind it that will prevent it from moving at all, the player will not be able to open, close, OR push it at all from the side opposite the blocked side, although in any case, enemies will be able to open and close the door normally from any side. This can be used to create the effect of doors of any type that only enemies can open, or even doors that the player can only use (push, of course) from one side (note that, naturally, dead guards also prevent doors like this from being pushed.)) The index (or map code) of the wall texture of the block that it transforms into is equal to the "door number" of the door -- note that because doors are spawned from left to right in row order (first row 0 on the map, then row 1, then row 2, and so on,) this is the order in which door numbers are in. If the block moves only one tile, it will transform back into a door, otherwise, it will stay a block (note that if it transforms back into a door, even though you will be able to open and close the door, you will not be able to walk through it -- that is, when the door becomes penetrable, it will actually be the original tile that the door was on that becomes penetrable (or solid when the door closes.) Note that if you use this trick to create a door that can be pushed and stay a door, you should set it up so that the door transforms into a block with it's "door image" texture (and, of course, have it always only move one tile at a time so that it transforms back into a true door when it stops.)) Also note that if the door number of the door is 0, it will transform into a "non-shaded" gray-stone block (discussed earlier) and will disappear if it moves more than one tile. Although the main thing to do with this trick is to make the block slide back like an ordinary pushwall (and have the wall behind it match the block's wall texture (for example, it could be a steel panel or steel panel with sign block sliding into a steel panel wall,)) you can also do other things (anything that you can do with an ordinary pushwall.)