Linedef type 453
This article or section is badly written and in need of a rewrite. You can help the SRB2 Wiki by fixing this article to meet with the standards described by the Manual of Style. |
Linedef type 453, Fade FOF, is a type of linedef executor which, when triggered, gradually fades the translucency (also called alpha value) of a specified FOF to a specified value.
Setup
The tag given to this linedef is irrelevant. The tag of the target sector(s) of the FOF to fade is determined by the linedef's front texture X offset. The tag of the FOF's control sector is determined by the linedef's front texture Y offset. Both the control and target sector must be specified for the effect to work. Note that tag 65535 cannot be used to fade all FOFs.
If the control linedef is one-sided, the alpha value to fade to is set by the linedef's X distance and the fading speed is set by the Y distance. If it is two-sided, they are set by the back X and Y offsets, respectively. Normally, the supplied alpha value is interpreted as the alpha value the FOF will have at the end of the fade. In this case, it should be between 1 (invisible) and 255 (opaque). If Flag [8] / Peg Midtexture / Effect 3 is set, the supplied alpha value is instead interpreted as the amount to add to the FOF's current alpha value. In this case, it may also be set to a negative value, in order to reduce the alpha value of the FOF. The fading speed determines by how much the alpha value will change with each tic. For example, if the current alpha value of the FOF is 64, the target value is 128, and the fading speed is 8, the FOF's alpha value will increase by 8 with each tic and the fade will last (128-64)/8 = 8 tics. If Flag [9] / Solid Midtexture / Effect 4 is checked, the Y distance/back Y offset sets the number of tics the fade will last instead. Normally, the fade will not be performed if another fade is still ongoing. If Flag [10] / Repeat Midtexture / Effect 5 is set, the ongoing fade will be interrupted instead.
The FOF's light level (including the shadow it may cast) and colormap will be faded as well, getting brighter/less intense as the FOF becomes more translucent. This can be disabled by setting Flag [7] / No Midtexture Skew / Effect 2. The FOF that is faded does not have to be of a visible or translucent type. If an opaque FOF is faded down, it will be made translucent automatically. Likewise, invisible FOFs that are faded up will be turned visible and will start the fade with an alpha value of 1. Light blocks, half-light blocks and fog blocks are exempt from this, since they are meant to be invisible and only display their light level or colormap. If Flag [6] / Not Climbable is set, opaque and invisible FOFs will not be turned translucent or visible when they are faded. In this case, only their light levels and colormaps will be affected by the fade.
If an FOF is faded to an alpha value of 1, the FF_EXISTS
flag will be removed, making the FOF disappear entirely. FOFs without FF_EXISTS
will reappear if they are faded up to a visible level. The various types of bustable blocks (FOFs with the FF_BUSTUP
flag), which remove FF_EXISTS
after being busted, are exempt from this. All special handling of the FF_EXISTS
flag can be disabled by setting Flag [1] / Block Enemies.
FOFs that have any type of collision (this includes solid FOFs, water, quicksand, bustable blocks and Mario blocks) will have their collision removed at the end of the fade if they are faded down to a lower alpha value. If they are faded up again afterwards, their collision will be restored at the start of the fade. This behavior can be disabled by setting Flag [14] / Bouncy Wall. If Flag [5] / Slope Skew / Effect 1 is set, the collision is also removed during the fade.
Note that Software mode actually only supports 11 different translucency levels, which are divided up as follows:
Level | Alpha values |
---|---|
0 | 1–11 |
1 | 12–37 |
2 | 38–63 |
3 | 64–88 |
4 | 89–114 |
5 | 115–139 |
6 | 140–165 |
7 | 166–191 |
8 | 192–216 |
9 | 217–242 |
10 | 243–255 |
During each tic of the fade, the FOF will be set to the translucency level that corresponds to the current alpha value. At low fading speeds, this will cause noticeable steps in the appearance of the FOF. By default, this will be done even in OpenGL, where the full 255 translucency levels are available. If Flag [15] / Transfer Line is set, OpenGL will display the actual alpha value instead of rounding to the nearest Software translucency level.
|
Sample
- Example file: Ex_ld453_fadefof.wad (MAP01)
How to use |
---|
|