Slopes

From ZDoom Wiki

Jump to: navigation, search

Slopes were added to ZDoom back in the 1.23 beta days. Adding slopes to a map is a purely aesthetic choice, but simple arches or just plain sloped ceilings and floors can really add a lot to a level. Originally the only way to create a sloped sector was with the Plane_Align special. However, new ways were added involving the use of special slope things. I'll cover all these ways to use slopes here.

Contents

Plane_Align

Plane_Align is fairly simple to use once you get the hang of it. It's special number 181 and takes two arguments. The first argument pertains to sloping the floor. A value of 1 will slope the sector on the line's front side up or down to the sector on the opposite side of the line, and a 2 will do the same only for the sector on the line's back side.

So, let's say you have two sectors adjacent to one another, one with a floor height of 64, the other with a floor height of 0 and the linedef's front side is facing the sector with a floor height of 0. If you give that line a Plane_Align special with the first argument 1 (for the front) then the sector with floor height of 0 will be sloped upwards to meet the floor with a height of 64. If you were to put in an argument of 2 instead of 1, then the sector with floor height of 64 would be sloped down to meet the sector with a height of 0. Once you get the hang of it, it's actually very simple.

The second argument works in the exact same way (1 for front, 2 for back) except the sloping is applied to the ceiling. Play around with it for a while, try to make thinks like arches or sloped railings next to stairs until you fully understand it.

Slope Things

Once you've mastered Plane_Align you may become aware that, even though it adds a whole new dimension to Doom editing, it still has limits. For instance what if you want to slope the same sector two ways (slope it from low to high but also tilt it to the side a bit, perhaps making a pipe that goes upwards)? Or what if you have a sloped ceiling but you put a new sector within it (for a floor platform or similar)? Then there's no way to match the ceiling slope to the surrounding sector. The slope things will solve your problems.

  • Floor slope things (thing number 1500) are used to describe a floor slope. They work together with the line of the sector in which they are placed having Arg1 equal to the thing's TID number. The Floor plane is defined with 3 points - the thing's position and the line ending vertexes at the sector's floor height.
  • Ceiling slope things (thing number 1501) are used to describe a ceiling slope. They work similarly to the floor slope things (1500).
  • Slope Copy things are things with DoomEdNums 9510 (copy floor) and 9511 (copy ceiling). They both take one argument, a sector tag. This will easily fix the latter problem mentioned above. Simply tag a sector and then place one of these in the sector you want to copy the slope of the tagged sector and ZDoom will do the rest. Very simple, but also quite effective. The only limitation is that you can only have sectors up to tag 255 sloped due to limits in Hexen's map format (see THINGS). However, this shouldn't really pose a problem since most people don't often go above 100 or so unique sector tags.
  • Sector Tilt things are even easier to use. These are useful if you just want to make a simple slope without bothering with any action specials. These also take a single argument, the angle of the tilt. DoomEdNum 9502 will tilt the floor and 9503 will tilt the ceiling. The first argument is relative to 90 which means no slope (90 degrees from the vertical), so the further from 90 a value is the more sloped a sector will be. The angle of the thing also determines the direction of the slope, and the floor or ceiling height will be adjusted so it passes through the thing (based on the Z height relative to the floor/ceiling height). You'll need to play around with thing positions and values a bit, but, as with Plane_Align, once you get the hang of it, it will become fairly easy to use.
  • Line slopes are the final two things, and work on a somewhat similar premise to tilt things. These also take a single argument, a line id. These can be placed anywhere (they don't need to be in the sector you want sloped) and will slope a sector starting at the specified line id and slope the sector up or down to the thing based on its Z height. DoomEdNum 9500 will slope the floor and 9501 will slope the ceiling.
  • Vertex height things can be used to define explicit heights at each vertex for triangular sectors. This is especially useful for terrain generation. The thing's z-position is used as the absolute height of each touching triangular sector at a vertex. These things have to be placed at the same position as the vertex they are supposed to affect. DoomEdNum 1504 will set the height for the floor, 1505 for the ceiling. Please note that these things have no effect on sectors with more than 3 touching vertices.

Finally

Slope things will be processed after Plane_Align slopes are set up, allowing you to further adjust slopes. Note that the sector tilt things are processed last and will override any previous slopes in their sector. Also, as with Plane_Align, slope things are only valid during level initialization and can't be spawned during play (so no dynamic slopes, sorry).

See Also

Sector_Set3dFloor

External Links

Example WAD: http://www.zdoom.org/files/examples/slopes2.zip

Personal tools