Moving platforms tutorial
There are two types of moving platforms: ones that move by themselves or by activating a linedef executor, and ones that move when stepped or spindashed upon. Both require three adjacent control sectors; the process of setting them up is explained in this tutorial.
To set up a moving platform, three square control sectors should be created and then connected horizontally so that they are lined up in a row, which means that two sectors will share one linedef on either side. The middle control sector is used for setting up the FOF. Out of the two linedefs that aren't shared with another sector, pick one and use it as the FOF control linedef. All flats and textures are specified as usual; the floor and ceiling height of the control sector determine where the FOF will spawn. The control sector itself needs to be given an unused tag.
Select an unused linedef on one of the other two control sectors, and give it one of the aforementioned linedef types. Linedef type 59 has only the basic function and makes the FOF move at a fixed speed. Linedef type 60 and linedef type 428 let you specify the movement speed via the linedef length – linedef type 428 has to be triggered to be executed, while linedef type 60 works on level load. Whichever linedef type you select, the tag should be the same as the FOF control sector's tag.
The left and right control sector are used to specify the lowest and highest point the platform will reach, respectively. In both cases, ceiling and floor height determine this. Make sure that the difference between these floor and ceiling is the same for all three control sectors. Otherwise, the FOF will expand or shrink vertically, which looks awkward.
This platform rises when the player steps on it and sinks back when the player steps off. It is set up similarly, but requires only an FOF linedef special. Depending on the special properties you want the FOF to possess, linedef types 190 through 195 are used. Linedef type 190 is the most basic type, being solid, opaque and shadowcasting.
Follow the setup as for a self-moving platform, but replace the type of the FOF control linedef with one of the aforementioned ones (190, for instance) and leave out the second control linedef. You can remove the tag from the control sector, since it's not going to get used, and you should set the floor and ceiling height to the same as the left control sector. Otherwise, the FOF will move to the height specified in the left control sector on level load. The control linedef's length determines the speed.
If the Block Enemies flag is set on the FOF's control linedef, the platform will sink when stepped upon and rise when left. In this case, the starting height should be the same as the top height. Use the Not Climbable flag to make the platform only move when spindashed on.
- This example WAD can be played in any gametype. It uses
MAP01, replacing Greenflower Zone Act 1.
- This shows a moving platform made with linedef type 60.
- Example WAD: ex_ld190_fofmovingsolidopaqueshadow.wad