Timed linedef executor

From SRB2 Wiki
Jump to navigation Jump to search

A timed linedef executor is a linedef executor that is not executed immediately after being triggered, but instead delayed by a certain amount of time. By delaying linedef executors, mappers can create timed sequences of dynamic events in their map, such as raising a series of platforms one after another. Timed linedef executors can also be used to create looped events, such as the periodically rising and falling water in Tidal Palace Zone.


There are two methods for creating timed linedef executors:

  • Upper Unpegged – This is the quickest way to created a timed linedef executor. It is done by giving the linedef that controls the linedef executor effect the Upper Unpegged flag. The delay, in tics, is then set by the sum of the floor and ceiling height of the linedef's back sector.
  • Gargoyle box – An alternative, indirect method of achieving timed effects is using a pushable Object, usually a gargoyle, to trigger linedef executors. Plane scrollers are used to move the gargoyle around in a room hidden from the player's view, which is called a gargoyle box. Linedef executors are triggered when the gargoyle enters certain trigger sectors inside the gargoyle box.


Both methods have advantages and disadvantages. The Upper Unpegged method is preferable for some contexts, while a gargoyle box works better in others.

Advantages of the Upper Unpegged method

  • For simple delayed effects, the Upper Unpegged method is much easier and quicker to set up than a gargoyle box. In general, the Upper Unpegged method requires less level geometry.
  • The Upper Unpegged method allows you to control the delay precisely, in tics, through the back sector's floor and ceiling height. In a gargoyle box, the delay is set indirectly through the layout of the box and the speed of the scrolling effects that move the gargoyle.
  • The Upper Unpegged method allows you to easily change the duration of the delay dynamically by moving the floor/ceiling of the back sector. To do this in a gargoyle box, you need accelerative scrollers that can change their speed dynamically, which require more work to set up.
  • In sequences or loops consisting of multiple effects, you can change the order in which the effects are executed simply by changing the delays. In a gargoyle box, you need to use linedef type 409 to change the tags of the trigger sectors. If you also want to change the delays alongside this, the required control sector setup will become very complicated.
  • Gargoyle boxes do not work with "Each Time" trigger linedefs, since pushable Objects cannot activate them. While there are workaround methods for making "Continuous" triggers act like "Each Time" triggers, these are fairly complicated, so the Upper Unpegged method is usually better for effects that require "Each Time" triggers.

Advantages of the gargoyle box method

  • The gargoyle box method is less abstract, which makes it easier to visualize and understand complex effects. By watching the movement of the gargoyle yourself in-game, you may be able to identify and fix potential bugs more easily.
  • Setting up a looped effect is more natural in a gargoyle box, where you only need to set up the scrolling effects so that the gargoyle moves in a loop. Setting up looped effects with the Upper Unpegged method is slightly more complicated.
  • In a gargoyle box, each individual effect is triggered separately when the gargoyle enters the corresponding trigger sector. By using linedef type 409 to change the tags of the trigger sectors, effects can be dynamically added or removed from a sequence or loop of events. This is not possible with the Upper Unpegged method because all effects are triggered through the same trigger sector.
  • Loops or sequences of multiple effects created with the Upper Unpegged method cannot be stopped and restarted dynamically. With gargoyle boxes, this is possible by using accelerative scrollers and dynamically setting their speed to 0.