Linedef type 453

From SRB2 Wiki
Jump to navigation Jump to search
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.
An example of a fade FOF.

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
  • 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_ld453_fadefof.wad into the addons folder of your SRB2 directory.
    2. Start SRB2, go to the Addons menu, and then select Ex_ld453_fadefof.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 typesLinedef executors [view]
Triggers:

ContinuousEach TimeOnce • Ring Count (ContinuousOnce) • Character Ability (ContinuousEach TimeOnce) • Race Only – Once • CTF Red Team (ContinuousEach Time) • CTF Blue Team (ContinuousEach Time) • No More Enemies – Once • Number of Pushables (ContinuousOnce) • Condition Set Trigger (ContinuousOnce) • Unlockable (ContinuousOnce) • Trigger After X Calls (ContinuousEach Time) • NiGHTSerize (Each TimeOnce) • De-NiGHTSerize (Each TimeOnce) • NiGHTS Lap (Each TimeOnce) • Ideya Capture Touch (Each TimeOnce) • Player Skin (ContinuousEach TimeOnce) • Object Dye (ContinuousEach TimeOnce) • Emerald Check (ContinuousEach TimeOnce) • NiGHTS Mare (ContinuousEach TimeOnce) • Gravity Check (ContinuousEach TimeOnce) • Level Load


Actions:
Sector:
Set Tagged Sector's Floor Height/TextureSet Tagged Sector's Ceiling Height/TextureCopy Light Level to Tagged SectorsSet Tagged Sector's FlatsChange Tagged Sectors' TagChange Front Sector's TagStart Adjustable Flickering LightStart Adjustable Pulsating LightStart Adjustable Blinking Light (unsynchronized)Start Adjustable Blinking Light (synchronized)Fade Light LevelStop Lighting EffectChange Plane Scroller DirectionSet Tagged Sector's Light Level
Plane movement:
Move Tagged Sector's FloorMove Tagged Sector's CeilingMove Floor According to Front Texture OffsetsMove Ceiling According to Front Texture OffsetsStop Plane MovementStart Platform MovementCrush Ceiling OnceCrush Floor OnceCrush Ceiling and Floor Once
Player/Object:
TeleporterChange Object StateStop ObjectAward ScoreEnable/Disable 2D ModeEnable/Disable Gravity FlipAward Power-UpDisable Player ControlChange Object SizeChange Object Type StateEnable Bosses with ParameterTrack Object's AngleStop Tracking Object's AngleAward RingsSpawn ObjectStop Timer/Exit Stage in Record AttackDye ObjectTrigger Egg Capsule
Other:
Change MusicPlay Sound EffectRun ScriptSwitch to Cut-Away ViewChange SkyChange WeatherShatter FOFChange Tagged Linedef's TexturesStart Metal Sonic RaceCondition Set TriggerCall Lua FunctionEarthquakeMake FOF Disappear/ReappearMake FOF CrumbleChange Tagged Sector's ColormapChange SkyboxExecute Linedef Executor (from Tag)Execute Linedef Executor (Random Range)Set FOF TranslucencyFade FOFStop Fading FOFFade Tagged Sector's ColormapStop Fading Tagged Sector's ColormapControl Text PromptToggle Level Fail
PolyObject:
Door SlideDoor SwingMoveMove, OverrideRotate RightRotate Right, OverrideRotate LeftRotate Left, OverrideMove by WaypointsTurn Invisible, IntangibleTurn Visible, TangibleSet TranslucencyFade Translucency