Linedef type 31

From SRB2 Wiki
Jump to navigation Jump to search
An example of using linedef 31 to move a PolyObject.

Linedef type 31, PolyObject – Displacement by Front Sector, is a type of linedef special which is used to scroll a tagged PolyObject by changing the heights of the linedef's front sector. It behaves in a similar manner to displacement plane scrollers (linedef types 512, 515, 522, 525, 532 and 535), but instead of scrolling a sector plane, it scrolls an entire PolyObject, carrying any solid Objects standing on it along with it.


This linedef should be given a tag corresponding to the ID of the wanted PolyObject.

The direction of the control linedef determines the direction in which the PolyObject will move and the Objects on it will be carried. The length of the linedef indicates the base scrolling/carrying speed (256 fracunits of length equal one fracunit per tic), however the actual visible speed is set differently as explained ahead.

On its own, this linedef will not move the PolyObject. Rather, the PolyObject will move whenever either the floor or ceiling of the control sector moves, which can done by using linedef executors. The actual scrolling/carrying speed is equal to the base speed × the control sector's movement speed. The direction of the scroll and carrying will be reversed if the floor or ceiling height of the control sector is lowered instead of raised.

To keep things simple and easier to control, the best thing to do is just use a base speed of 1 fracunit per tic (by giving the control linedef a length of 256 fracunits), and control the movement speed by moving the floor or ceiling of the control sector.

If this linedef is used in conjunction with linedef type 401, the PolyObject will immediately jump to the specified distance (and any solid Object standing on it will move said distance). If this linedef is used in conjunction with linedef type 404, the PolyObject will move continuously until the control sector reaches the given ceiling height. If this linedef is used in conjunction with linedef type 407, the PolyObject will only move as long as the linedef executor is being continuously triggered.


Example file: ex_ld031_polyobject_displacementbyfrontsector.wad (MAP01)
How to use
  • You may load this file into your favorite map editor, such as Zone Builder. Select MAP01 as the map to load.
  • You may also load this file in the game:
    1. Save ex_ld031_polyobject_displacementbyfrontsector.wad into the addons folder of your SRB2 directory.
    2. Start SRB2, go to the Addons menu, and then select ex_ld031_polyobject_displacementbyfrontsector.wad.
    3. Start the game in Single Player mode.
    4. Press the Console button (~), and type in the command MAP MAP01 to access the example map.
  • When you load this file in the game, it replaces Greenflower Zone Act 1.

  Linedef types – PolyObjects [view]
First LineParametersWaving FlagDisplacement by Front SectorAngular Displacement by Front Sector