Chapter XII. Ladders.

Vertical movement: ladders, angled stairs, and spiral staircases.

12.1

Vertical Ladders

In this article we will talk about creating vertical stairs (as on the map cs_assault and many others). To create them we will use two new entity objects: Stairs in CS consist of the two objects listed above: func_illusionary - depicts a staircase, func_ladder — the staircase itself (the invisible part along which the player climbs).
It would be useful to say that the standard size of stairs is 32 units in width and 3-4 units in thickness and height as it turns out. First, let's create the visual part of the staircase that the player sees in the game. To do this, we will use a texture with a mask (with blue parts), for example, {LADDER1 (there are also other standard textures for stairs: {ladder2, {ladder2b etc.).
Let's create a brush with a width of 32 and a thickness of 4 units near the wall. And let's turn it into func_illusionary (see picture below). To make the blue parts on the textures transparent in the game, you need to set the following display parameters:
Render Mode — Solid;
FX Amount — 255.
t12ladder1 Now let's create a field that is invisible in the game, along which the player actually climbs, because... he can't just climb up func_illusionary . To do this, we will build exactly the same brush with dimensions of 32x4 units, only we will paint it on all sides with a special texture AAATrigger (see picture below). Then click [Ctrl-T] and select from the list func_ladder.
Create an invisible part (func_ladder)
As you can see, we have posted func_ladder close to func_illusionary, this is not important, but, as they say, it won't hurt for the "cleanliness" of the work.
This is all! Object func_ladder will be invisible in the game, and the player will be completely confident that he is climbing a visible staircase (func_illusionary), but now you know that this is not so :)
12.2

Angled Stairs (Steps)

In this article we will tell you how ordinary (inclined) stairs with steps are created.
Regular forests are made from brushes, sometimes in order to save polygons from entity objects like func_wall. There are quite a lot of design options, take a look at the picture below. It shows 4 possible options for making a staircase.
t12ladder3 Remember that the height of the stairs should not exceed 16 units. This is necessary so that the player can climb the step no jump . The length of the step is chosen arbitrarily. However, it is more convenient to climb flat stairs with a step length of 32 units. Steps 16 units high are also often used.
In our test map, we created four different types of stairs: a simple concrete one, a wooden one with gaps, a wooden one without gaps, and a metal one with transparent bars (see the figure below).
Images of stairs from the test card
You can download the archive and see how this or that staircase is made. As always, the archive contains the source of the map in RMF format and an already compiled version in BSP.
ladders.zip [54Kb] - in the archive there is an example map in BSP and RMF formats.
12.3

Spiral Staircases

In this article we will introduce you to the technique of creating spiral staircases using a tool Block and its functions Arch. For example, you can create a staircase like the one below. Also function Arch can be used to create arches or some other "rounded" objects.
Spiral staircase
Function Arch available in the New Objects panel when the Block tool is selected.
t12vladder0 It would be a good idea to look into "Tools\Options\General" and find out whether the "Stretch arches to fit original bounding rectangle" checkbox is checked - how the created object will behave depends on this.
If the checkbox is checked, the created object will be stretched to the size of the original rectangle; unchecked, it will not be stretched (see the figure below).
t12vladder1 It's probably more convenient to check the box, because... in this case we know exactly what size the created object will be.
To create a spiral staircase, you need to define its dimensions using a rectangle (as when creating a regular brush). We recommend making the height of the rectangle 16 units (standard step height).
When you press "Enter" or select "Create object", the following window will appear:
t12vladder2 When changing any parameter, you can see the result by clicking the "Preview" button.
Wall width
Step width. You can specify negative values.
Number of Sides
Number of steps. Value from 3 to 100.
Arc
Angle of rotation of the stairs. Value from 8 to 360 degrees.
Start Angle
The starting angle at which the staircase is rotated.
Add Height
If you are creating a spiral staircase, this parameter determines the height of the steps. To allow the player to climb, we recommend values ​​of 8 or 16.
Once the staircase is created, we recommend "fitting" the tops of the steps to the mesh.
In the picture below, in the top view, you can see that the tops of the steps of the stairs may not coincide with the intersections of the grid lines - which is not very good.
t12vladder3 The next two pictures show how best to "fix" the vertices.
t12vladder4 t12vladder5 In the same way, it is necessary to "fit" all the vertices of the stairs to the grid.