Moving platforms tutorial
Moving platforms in SRB2 can be set up with the use of FOFs. These platforms are only able to move vertically; horizontally moving platforms can be achieved with PolyObjects.
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.
Self-moving platform
Platforms that move by themselves are made with the use of linedef type 59 or linedef type 60. If the movement should be triggered with the use of linedef executors, linedef type 428 is used instead.
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.
Player-controlled platform
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 Flag [1] / Block Enemies 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 Flag [6] / Not Climbable to make the platform only move when spindashed on.
Samples
Sample 1
- Example file: ex_ld060_activatefloatingplatform_adjustablespeed.wad (MAP01)
- This shows two moving platforms made with linedef type 60.
How to use |
---|
|
Sample 2
- Example file: ex_ld190_fofmovingsolidopaqueshadow.wad (MAP01)
- This shows a moving platform made with linedef type 190 that rises when stepped upon.
How to use |
---|
|