Building Pillars

By Richard Clark

Pillar as Door
Figure 1: A Pillar Being Used as a Door

Another Hexen construct available in ZDoom is the pillar. A pillar is a sector where the floor and ceiling moves at the same time. In the split door tutorial we used the floor_raise and lower and the ceiling_raise and lower to simulate a door. In this tutorial, we create another split door, but we use the Pillar specials to simplify the scripting. The wad, pillardr.wad illustrates the use of a pillar.

Figure 1 shows the pillar in action. When the player triggers the door, a script is called using the ACS_Execute method. The script takes one parameter, the tag id of the door. This enables the script to work on any split door in the level. Here is the script:

#include "zcommon.acs"

script 1 (int DoorTag)
	//Open the door here.
	Pillar_Open (DoorTag, 16, 0, 0);
	Delay (120);
	//Close the door here.
	Pillar_Build (DoorTag, 16, 0);

If you compare this script with the split door script, it is easy to see that using pillars simplifies the code.

Pillars are controlled using three specials:

  1. The Pillar_Build (# 29) uses three parameters:

    Pillar_Build (tag, speed, distance)

  2. The Pillar_Open (# 30) uses four parameters.

    Pillar_Open (tag, speed, fdist, cdist)

  3. If you want to use the pillar (or door) to be a trap, use the pillar crush special to apply damage to the player if he remains in the pillar when it closes. The Pillar_BuildAndCrush (# 94) takes four parameters:

    Pillar_BuildAndCrush (tag, speed, distance, crush)


ZDoom reference by Randy Heit.