User:Scarbo/Moving Platforms Tutorial
The terrain of the levels in SRB2 have a tendency to look frozen in time. Inserting moving platforms in your levels can help reduce this tendency. This tutorial explains how to make them.
First of all, create the sector that you want to be a moving platform. Now give it the next unused tag. Since this is an example map, the tag would be 1.
Create three separate square control sectors and join them all horizontally. Select the top linedef of the middle control sector, and give it action 281. Tag it to the sector that should be a moving platform, which in this case is sector tag 1. Give the middle sector a tag of 2, which is the next unused tag. Now select the top linedef of the control sector on the right. Give it a tag of 2 and an action of 233.
OK, now we need to set the initial height of the platform. This is done the same way as manually setting up a normal FOF. So give the middle sector a floor flat, ceiling flat, floor height, and ceiling height. Give the tagged linedef a middle front texture, too. We will choose FLOOR0_3
, FLOOR0_3
, 320, 352, and GFZROCK
, respectively.
Let's now set up the maximum height of the platform. Since the distance between the floor height and the ceiling height of the middle control sector was 32 fracunits, so should it be when setting maximum heights. Give the control sector on the right a floor height of 640 and a floor height of 672 for the ceiling.
Let's finally set up the minimum height of the platform. Again, the distance should be 32 fracunits from ceiling to floor. We're going to have the platform touch the ground as its lowest point. So give the control sector on the left a floor height of 0 and a ceiling height of 32.
Now we need to give it a speed. So drag the vertex that joins the top linedef of the right control sector and the middle sector, making the right control sector's top linedef be 32 fracunits in length. If it were a length like 64 or longer, it'd be going too fast.
Now let's test it out!
Looks like our floating platform works! Wait, you want to know how to do different types now? OK then. Let's make a platform that rises as soon as you step on it:
We'll keep our initial floating platform sector and make another one to the right of it. Now, give it the next unused tag (3 in this case). Create three square control sectors and join them horizontally. On the middle sector's top linedef, tag it to the appropriate in-game sector (once again, tag 3 in this case). Give that linedef an action of 89. As for setting up the heights, well, let's do it the same way.
Now since it will start at the lowest point, the left control sector and the middle control sector will have the same floor and ceiling height. We will choose 0 for the floor and 64 for the ceiling. Now let's set a maximum height for the platform. On the right control sector, give it a floor height of 640 fracunits. Again, distance between floor height and ceiling height of sectors should be the same; therefore, the ceiling height is 704 fracunits.
Now we need to set a speed. Since the actual floating platform linedef is the top one on the middle control sector, that's the one whose length gets changed. Once again, 32 fracunits is a decent speed for this type of platform.
Finally we set the textures and flats. Let's be different for this one. On the middle control sector, make the floor and ceiling have SLIME14
flats. Set the tagged linedef's middle front texture to DSZ1
.
This is what your map should look like:
Now save it and test it. You should have a platform that rises when you step on it, and lowers when you fall off it.
Sample
- Example file: movingplatform.wad (MAP01)
How to use |
---|
|