Linedef type 9
Linedef type 9, Chain Parameters, is a type of linedef special which sets the parameters for spinning or swinging chains and the various items that can be attached to them, including maces, grabbable chains, chained springs, firebars and custom Objects.
A chain setup consists of a control linedef with linedef type 9 and a spawnpoint Thing inside the map. The tag of the control linedef must be equal to the Angle value of the spawnpoint Thing.
A rotating or swinging chain consists of the chain itself, which in turn consists of multiple chain link items, and the item attached to the end of it. The Object type used for the chain links and the end item depend on the Thing type used for the spawnpoint:
|Thing type number||Name||Link item type||End item type||Sprites||Sprites (Ambush)|
|1104||Mace Spawnpoint||Intangible chain link||Mace|
|1105||Chain with Maces Spawnpoint||Intangible chain link||Mace/Grabbable chain link1|
|1106||Chained Spring Spawnpoint||Intangible chain link||Chained yellow spring|
|1107||Chain Spawnpoint||Intangible chain link||Grabbable chain link|
|1110||Custom Mace Spawnpoint||Custom2||Custom2|
If the Ambush flag is set on the spawnpoint, both the link items and the end items will be made twice as large. There are two exceptions to this: For the Custom Mace Spawnpoint, the Ambush flag has no effect. For the Chained Spring Spawnpoint, setting the Ambush flag will leave the chain links small but turn the yellow spring into a red spring instead.
If Flag  / No Midtexture Skew / Effect 2 is set on the control linedef, all chain link items are replaced with the corresponding end item, unless it is a grabbable chain link. For the Firebar Spawnpoint, the effect is different: Fireballs are already used as both the end item and the chain link item by default. If Flag  / No Midtexture Skew / Effect 2 is set, the chain link items are removed altogether.
If Flag  / Peg Midtexture / Effect 3 is set on the control linedef, an additional chain link item is spawned in the center of rotation.
1 The Chain with Maces Spawnpoint is meant to be used with multiple spokes (see Appearance below). In this case, some spokes will use a mace as the end item and others will use a grabbable chain link.
2 For the Custom Mace Spawnpoint, the end item type is written across the front textures of the control linedef, and the link item type is written across the back textures. If the control linedef does not have a back side, the link item type defaults to
MT_NULL, i.e., no link items are spawned.
By default, the chain setup will consist of a single chain rotating around a central point. The control linedef's X distance determines the number of links in the chain link. The front texture Y offset can be used to remove inner links from the chain – a value of -x will make the x innermost links disappear. Positive values have no effect.
The chain can be multiplied in two ways: One way is to turn the single chain into a row of rotating end items, with both ends of the row supported by a chain. This can be done by giving the control linedef a back side and setting the back texture Y offset to the width of the row, i.e., the number of additional items in the row, excluding the initial item that always appears. The other way is to create multiple spokes, i.e., multiple chains that rotate around the same central point, evenly spaced out across the rotation cycle. Specifically, the Parameter value is the number of additional spokes, excluding the one chain that always appears. Both ways can be combined to create multi-spoke chain rows.
If the control linedef has a back side, the back texture X offset determines the number of spokes that are skipped and do not appear. This can be used to create setups where some spokes use different items than the rest, by creating one setup with the respective spokes missing and another with a different item type that fills in the missing spokes. The missing spokes are distributed evenly. For the Chain with Maces Spawnpoint, the back texture X offset has a slightly different meaning – it determines the number of spokes that use grabbable chain links, while the rest use maces. The default and minimum value in this case is 1.
The control linedef's Y distance determines the chain's rotating or swinging speed, with one fracunit of distance equalling one fracunit per tic of speed.
The control sector's ceiling height determines the yaw of the rotation axis in degrees, i.e., its horizontal orientation. The floor height determines the pitch of the rotation in degrees, i.e., the vertical tilt of the rotation axis. A value of 0 means the rotation axis is perfectly horizontal, while 90 is perfectly vertical.
The control linedef's front texture X offset sets the phase of the rotation in degrees, i.e., how far into the rotation cycle the chain starts on map load.
Optional parameters can be set on the control linedef's back sector if it has one. The back sector's floor height sets the pinch in degrees. The default value of 0 makes the chain rotate in a perfect circle, while both positive and negative values distort the area of rotation into a cone shape. The back sector's ceiling height sets the roll of the rotation axis – for rotating chains this is identical to the phase, but for swinging chains it rotates the section of the circle in which the chain swings around the rotation axis. If no back sector exists, both values default to 0.
If Flag  / Slope Skew / Effect 1 is set on the control linedef, the chain setup will swing instead of rotate. The distance to which the chain swings before turning back is defined by its speed – the higher the speed, the further it swings.
- If the chain includes grabbable chain links, setting Flag  / Not Climbable on the control linedef will allow players who are hanging on to the grabbable chain links to control the yaw of the rotation axis with their strafe keys.
- Normally, items in a chain are allowed to clip through solid surfaces. If Flag  / Solid Midtexture / Effect 4 is set, items colliding with surfaces will instead glide along the surface until they are moved away from it again.
- Normally, the chains will stop moving if no player is nearby, in order to save processing time. If Flag  / Repeat Midtexture / Effect 5 is set, the distance checks are disabled and the chains will always move.
- Normally, the chains make sounds while moving. If the Object Special flag is set on the spawnpoint, these sounds are disabled.
- If the Object Flip flag is set on the spawnpoint, the individual items in the chain will spawn in flipped gravity, but the overall setup of the chain will remain unaffected.
- All properties of this linedef are evaluated only upon loading the level, so you cannot change this linedef's properties during runtime.
- Example file: ex_ld009_chainparameters_mace.wad (MAP01)
|How to use|
- Example file: ex_ld009_chainparameters_chain.wad (MAP01)
|How to use|
- Example file: ex_ld009_chainparameters_chainwithmaces.wad (MAP01)
|How to use|
- Example file: ex_ld009_chainparameters_spring.wad (MAP01)
|How to use|
- Example file: ex_ld009_chainparameters_firebar.wad (MAP01)
|How to use|
- Example file: ex_ld009_chainparameters_custom.wad (MAP01)
- Rings are used as a custom object
|How to use|