Linedef type 259
Linedef type 259, Custom FOF, is a special type of floor over floor block which can be configured to have any combination of the properties possessed by other types of FOFs, e.g., whether it casts a shadow, whether it crumbles, and so on. This is useful in circumstances where none of the other FOF linedef types have the specific combination of properties required in a given situation.
Setup
To use this effect, create a control sector outside of your map, set one of its linedefs to have linedef type 259, and tag it to the desired target sector(s) within the map. The control linedef must be double-sided, so you should also create another sector which shares the control linedef with the control sector.
The flats (if the flags are set to render floor and ceiling), floor height, and ceiling height of the FOF are determined by the flats, floor height, and ceiling height of the control sector, and the sidedefs of the FOF's walls (if the flags are set to render sides) are determined by the sidedef of the control linedef.
The light level of the control sector will determine the brightness of the shadow cast by the FOF (if the flags are set to cast a shadow). If the light level of the control sector is lower than that of the target sector, then it will cast a dark shadow. If the light level of the control sector is higher than that of the target sector, then the FOF will illuminate the area below it. If the light level of the control sector is equal to that of the target sector, then the FOF will not affect the light of the area below it.
The properties of FOFs created with this linedef type are specified by the value of the control linedef's upper texture on its back sidedef. Rather than specifying an actual texture, the value is a combination of one or more of the following flags:
Flags like FF_SHATTER , FF_SHATTERBOTTOM , FF_SPINBUST , FF_STRONGBUST have been deprecated since the introduction of 2.2.11, we recommend you to use busttype instead.
Also |
Flag name | Value (Hex) | Description |
---|---|---|
FOF_EXISTS
|
0x1
|
The FOF exists. Without this flag, the FOF will not appear in-game at all – it will not be visible or tangible, and any special effects associated with it will not appear either. The flag can be added or removed at runtime via linedef type 445, which can be used to make FOFs appear or disappear dynamically. Every FOF should have this flag, unless it is not meant to appear immediately at level load because it will later be brought into existence at runtime. |
FOF_BLOCKPLAYER
|
0x2
|
The FOF is solid to the player. |
FOF_BLOCKOTHERS
|
0x4
|
The FOF is solid to the camera and all Objects besides the player. |
FOF_SOLID
|
0x6
|
(FOF_BLOCKPLAYER + FOF_BLOCKOTHERS ) The FOF is solid to the player, all other Objects and the camera. Setting Flag [5] / Slope Skew / Effect 1 on the control linedef will remove FOF_BLOCKOTHERS , while setting Flag [7] / No Midtexture Skew / Effect 2 will remove FOF_BLOCKPLAYER .
|
FOF_RENDERSIDES
|
0x8
|
The FOF's walls are rendered. |
FOF_RENDERPLANES
|
0x10
|
The FOF's floor and ceiling are rendered. |
FOF_RENDERALL
|
0x18
|
(FOF_RENDERSIDES + FOF_RENDERPLANES ) The FOF's walls, floor, and ceiling are all rendered.
|
FOF_SWIMMABLE
|
0x20
|
The FOF is a water block. |
FOF_NOSHADE
|
0x40
|
The FOF does not cast a shadow. Normally, the light level and colormap of the control sector affect the inside of the FOF and the area below it in the target sector. This flag disables that behavior. |
FOF_CUTSOLIDS
|
0x80
|
Any "solid" walls that are directly adjacent to the FOF will not be drawn. A wall is considered "solid" for this purpose if it belongs to the upper or lower texture of a two-sided linedef, the middle texture of a two-sided linedef, or an FOF without FOF_EXTRA . Middle textures of two-sided linedefs and PolyObject walls are not considered "solid".
|
FOF_CUTEXTRA
|
0x100
|
Any walls belonging to an FOF with FOF_EXTRA that are directly adjacent to this FOF will not be drawn. If this FOF also has FOF_EXTRA , the following extra conditions apply: If one of the two FOFs has FOF_SWIMMABLE , the other must also have it in order for the walls to be cut. Similarly, if one has FOF_FOG , the other must also have it. This flag is commonly used to remove walls between adjacent fog or water FOFs.
|
FOF_CUTLEVEL
|
0x180
|
(FOF_CUTSOLIDS + FOF_CUTEXTRA ) Any walls that are directly adjacent to the FOF will not be drawn. Middle textures of two-sided linedefs and PolyObject walls are exempt from this. This flag should be set if the adjacent walls will never be visible anyway, to reduce the rendering effort. This is usually the case if the FOF is opaque and solid.
|
FOF_CUTSPRITES
|
0x200
|
If a sprite is only partially inside the area illuminated by the FOF, the sprite is split vertically so that the light level and colormap are only applied to the affected part. This should generally be set for intangible or water FOFs that cast a shadow. |
FOF_BOTHPLANES
|
0x400
|
Both the inner and outer sides of the FOF's floor and ceiling are rendered. Without this flag, only the outer sides are rendered. |
FOF_EXTRA
|
0x800
|
The FOF can be obscured by other FOFs with the FOF_CUTEXTRA flag set.
|
FOF_TRANSLUCENT
|
0x1000
|
The FOF is translucent. Its alpha value is set in the front upper texture as a value between #000 (invisible) and #255 (opaque). If this value is omitted, it defaults to #128. |
FOF_FOG
|
0x2000
|
The FOF acts like a fog block. |
FOF_INVERTPLANES
|
0x4000
|
Only the inner sides of the FOF's floor and ceiling are rendered. |
FOF_ALLSIDES
|
0x8000
|
Both the inner and outer sides of the FOF's walls are rendered. Without this flag, only the outer sides are rendered. |
FOF_INVERTSIDES
|
0x10000
|
Only the inner sides of the FOF's walls are rendered. |
FOF_DOUBLESHADOW
|
0x20000
|
The light level and colormap of the FOF's control sector only affect the inside of the FOF, but not the area below it. |
FOF_FLOATBOB
|
0x40000
|
The FOF floats on water and bobs when stepped on. |
FOF_NORETURN
|
0x80000
|
Used with FOF_CRUMBLE to prevent the FOF from reappearing in its original location once it has crumbled.
|
FOF_CRUMBLE
|
0x100000
|
The FOF will fall one second after being stepped on. Unless FOF_NORETURN is set, it will reappear in its original location after 15 seconds.
|
FOF_GOOWATER
|
0x200000
|
If combined with FOF_SWIMMABLE , the FOF acts like goo water.
|
FOF_MARIO
|
0x400000
|
The FOF behaves like a Mario item block. |
FOF_BUSTUP
|
0x800000
|
The FOF behaves like a bustable block. It will shatter when touched in specific ways, such as being spindashed into from the side, being touched by Knuckles, being bounced on by Fang, or being hit by Amy's hammer. Flag [9] / Solid Midtexture / Effect 4 allows the FOF to be shattered by a pushable Object. Flag [10] / Repeat Midtexture / Effect 5 makes the FOF activate a linedef executor when it is shattered, using the control linedef's length to determine the tag of the linedef executor to activate. |
FOF_QUICKSAND
|
0x1000000
|
The FOF behaves like a quicksand block. The player's sinking speed and movement reduction are determined by the linedef's X distance and Y distance, respectively. |
FOF_PLATFORM
|
0x2000000
|
The FOF is intangible from below. |
FOF_REVERSEPLATFORM
|
0x4000000
|
The FOF is intangible from above. |
FOF_INTANGIBLEFLATS
|
0x6000000
|
(FOF_PLATFORM + FOF_REVERSEPLATFORM ) The FOF's floor and ceiling are intangible, but its walls are still solid (provided that FOF_SOLID is set).
|
FOF_RIPPLE
|
0x8000000
|
The FOF's floor and ceiling will have a "ripple" effect, distorting both their flats and – if visible – the view displayed behind them. Note that this visual effect is exclusive to the Software renderer; this flag does nothing in OpenGL. |
FOF_COLORMAPONLY
|
0x10000000
|
The inside of the FOF and the area below it in the target sector are affected by the colormap of the FOF's control sector, but not the light level. |
FOF_BOUNCY
|
0x20000000
|
The FOF bounces any players upon contact. |
FOF_SPLAT
|
0x40000000
|
The FOF uses the splat flat renderer, meaning it will treat any cyan pixels on it's texture as transparent. |
In most (but not all) cases, a typical custom FOF should at least have FOF_EXISTS
, FOF_RENDERALL
, and FOF_CUTLEVEL
.
The flags can be combined by performing a bitwise OR operation. The Windows Calculator applet can do this in its "programmer" mode (or "scientific" mode, for Windows XP and older). For example, to calculate the value required to set the FOF_EXISTS
and FOF_FOG
flags, switch into hexadecimal mode using the radio buttons at the top-left, enter 1, click Or, enter 2000 and click =. The result in this case will be 2001.
|
Sample
- Example file: ex_ld259_customfof.wad (MAP01)
- This sample contains multiple custom FOFs, each of which demonstrates unique combinations of properties that cannot be achieved with standard FOFs.
- The leftmost FOF is a quicksand water FOF.
- The second FOF from the left is a spin-bustable Mario block that is intangible from above.
- The third FOF from the left is invisible and tangible from the sides, but only for the player. Note that the fences are middle textures added to the target sector; they are not part of the FOF.
- The rightmost FOF is an invisible shatter block.
How to use |
---|
|