Linedef type 1
Linedef type 1, Per-Sector Gravity, is a type of linedef special which sets the gravity of any tagged sector. It can be used to decrease or increase the gravity of a sector or even flip it to reverse gravity. In SRB2, this effect is used most prominently used in Egg Rock Zone. Note that this linedef type only modifies the gravity of a specific sector. If the player leaves the sector, gravity will change back to normal. To flip the player's gravity regardless of their position, use linedef type 433 instead. To change the gravity for the whole level, use the Custom Global Gravity sector type.
The gravity's strength is determined by the floor height of the control sector. It is measured in relation to the global gravity of the level, so if the global gravity is modified with the Custom Global Gravity sector type, this affects per-sector gravity as well. If the floor height is 1000, then the target sector will have 100% of the global gravity. If the floor height is 500, the target sector will have 50% of the global gravity.
Negative values result in negative gravity, which does not flip sprites or physics but merely pulls mid-air players and other Objects to the ceiling. Players who jump off the floor in this kind of gravity will therefore continue to rise up until they eventually become stuck under the ceiling, still in their jump animation (they are still able to move horizontally). To prevent this, give the control linedef the Not Climbable flag – this will instead give reverse gravity for negative gravity strength values, which will properly flip sprites and physics, allowing players and other Objects to land on the ceiling properly.
Applying this to the control sector of an intangible FOF will change the gravity only inside that FOF. In conjunction with an intangible, invisible FOF, this can be used to divide a sector's gravity in half at a certain height without the player noticing. This effect is notably used in the conveyor room of Egg Rock Zone Act 1, where the room is split into a normal-gravity and an upside-down-gravity half that the player can flip between by jumping. This creates the illusion that the player can trigger a gravity change by jumping.
- Example WAD: ex_ld001_persectorgravity.wad
- This example WAD can be played in any gametype. It uses
MAP01, replacing Greenflower Zone Act 1.
- The effect is applied to four sectors in this level. The yellow sector has normal gravity, the red sector has low (50%) gravity, the blue sector has reverse gravity, and the green sector is split in half with the use of an intangible, invisible FOF: The lower half of the sector has normal gravity, but the upper half has reverse gravity. The player can switch to reverse gravity by jumping and back to normal gravity by jumping again.
|Linedef types – Miscellaneous||[view]|
|Per-Sector Gravity • Speed Pad • Camera Scanner • Disable Linedef Effect on Level Load • Sector Flat Alignment • Culling Plane • Heat Wave Effect • Visual Portal Between Tagged Linedefs • Instantly Lower Floor on Level Load • Instantly Raise Ceiling on Level Load • Fake Floor/Ceiling Planes • Floor Friction|