Knowledge Base - Building Stairs

Building Stairs


Stair Building in Action
Figure 1: Stair Building in Action

The more interaction you have in a level, the more interesting it is, in my opinion. Building staircases in Doom is one way to add additional interaction. The file stair.wad illustrates the use of building a staircase.

In ZDoom you can create a staircase using the standard Doom method, but there is a much easier way. By using the Stair 1 and 2 sector specials and the appropriate stair building special, you can quickly build a staircase in any configuration. Figure 2 illustrates a typical layout.

Map Layout
Figure 2: Map Layout

Notice in Figure 2, each sector is marked as a Stair 1 (# 26) or Stair 2 (# 27). The tagged sector is the start of the staircase and it is marked as a Stair 1. Alternate the Stair 1 and 2 for the length of the staircase. To build the staircase, simply execute the appropriate special using the tagged sector number. If building up, be sure to add the lower textures to the steps.

The Stairs_BuildUp (# 27) special takes 5 parameters:

Stairs_BuildUp (tag, speed, height, delay, reset)

  • tag: tag of first sector in staircase.
  • speed: how quickly the steps rise.
  • height: height of each step.
  • delay: number of tics the staircase waits between steps.
  • reset: tics until the stairs return to their original heights (0 if never).

The Stairs_BuildDown (# 26) special takes 5 parameters:

Stairs_BuildDown (tag, speed, height, delay, reset)

  • tag: tag of first sector in staircase.
  • speed: how quickly the steps lower.
  • height: height of each step.
  • delay: number of tics the staircase waits between steps.
  • reset: tics until the stairs return to their original heights (0 if never).

For the Stairs_BuildUpSync (# 32) each step moves at a different speed so that they all reach their destination heights at the same time. The special takes takes 4 parameters:

Stairs_BuildUpSync (tag, speed, height, reset)

  • tag: tag of first sector in staircase.
  • speed: how quickly the first step raise.
  • height: height of each step.
  • reset: tics until the stairs return to their original heights (0 if never).

For the Stairs_BuildDownSync (# 31) each step moves at a different speed so that they all reach their destination heights at the same time. The special takes takes 4 parameters:

Stairs_BuildDownSync (tag, speed, height, reset)

  • tag: tag of first sector in staircase.
  • speed: how quickly the first step lower.
  • height: height of each step.
  • reset: tics until the stairs return to their original heights (0 if never).

You can of course build the staircase in the old-fashioned way using the standard method and ZDoom also supports the Boom generalized staircase. See the ZDoom editing docs for information on these specials.

The more interaction a player has with your level, the more the player will become immersed in the game. Stair building offers an easy way to create player interaction and enhance the game play of any level.

Sources

ZDoom reference by Marisa Heit.

Back