Jump to content

Linedef type 455

From SRB2 Wiki

Linedef type 455, Fade Tagged Sector's Colormap, is a type of linedef executor which, when triggered, will fade the colormap of every tagged sector from its current value to a new one.

Setup

This special is set up similarly to linedef type 447, but with some additional considerations for fading.

By default, the colormap in the tagged sector(s) will gradually be replaced with the colormap specified in the control linedef's front texture fields. The colormap is supplied in the same format as for linedef type 606: The front upper texture specifies the light color, which is used if the target sector is at full brightness. The front lower texture specifies the fade color, which is the color that the colormap fades to as the target sector fades towards darkness. Both colors are supplied in the format #RRGGBBA, where RR, GG, and BB determine the amount of red, green, and blue, respectively, while A specifies the alpha value. The front middle texture can be used to set optional parameters in the format #ABBCC, where A sets the colormap's flags, while BB and CC set the starting and ending brightness level for the fading effect, respectively. Refer to linedef type 606 for a detailed explanation of the colormap settings.

By default, the starting colormap of the fade will be the current colormap of the target sector. If the linedef is two-sided and Flag [15] / Transfer Line is set, the starting colormap will instead be specified in the control linedef's back texture fields, in the same format as the destination colormap. If no starting colormap exists (because no colormap was applied to the target sector), it will be set to the destination colormap, but at full transparency. This will cause the destination colormap to gradually fade in from nothing. If Flag [14] / Bouncy Wall is set, the starting colormap will instead be black at full transparency.

The linedef's front Y offset controls the speed of the fade, where a value 1 corresponds to a fade that is 256 tics long. If the front Y offset is 0 and the control linedef has a back side, the back Y offset is used instead. If Flag [9] / Solid Midtexture / Effect 4 is set, the Y offset will specify the fade's duration in tics 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.

If Flag [8] / Peg Midtexture / Effect 3 is set, the colormap specified in the front texture fields will be added to the existing colormap instead of replacing it. For example, adding a green colormap to a red colormap will make it gradually turn yellow. The red, green, blue and alpha values of both the light and fade color, as well as the starting and ending brightness levels, will be added to the respective values of the existing colormap. The colormap flags will be replaced entirely at the midway point of the fade. Combining this flag with flags [5] / Slope Skew / Effect 1, [6] / Not Climbable, and/or [7] / No Midtexture Skew / Effect 2 will instead subtract the red, green and/or blue values of the new colormap from the values of the existing colormap, respectively.

If Flag [4] / Lower Unpegged is set, the new colormap's alpha values will be taken from the control linedef's front X and Y offsets instead of the A values in the texture fields. The X offset sets the light color alpha value and the Y offset sets the fade color alpha value. This is mainly useful if you want to reduce the alpha value of the existing colormap in conjunction with Flag [8] / Peg Midtexture / Effect 3, since there is no flag for subtracting the alpha value. Instead, you can set Flag [4] / Lower Unpegged and supply negative alpha values in the offsets. In this case, the speed/duration of the fade will be set via the back Y offset instead.

Sample

Example file: Ex_ld455_fadesectorcolormap.wad (MAP01) 
  • This example demonstrates the effect of Flag [8] / Peg Midtexture / Effect 3. When the player steps on the raised floor, the weak yellow colormap will fade to a strong magenta. This is accomplished by subtracting green from the colormap, and adding blue and alpha.
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_ld455_fadesectorcolormap.wad into the addons folder of your SRB2 directory.
    2. Start SRB2, go to the Addons menu, and then select Ex_ld455_fadesectorcolormap.wad.
    3. Start the game in Single Player mode.
    4. Press the Console button (~), and type in the command MAP MAP01 -force to access the example map.
  • When you load this file in the game, it replaces Greenflower Zone Act 1.



  Linedef types – Linedef executors [view]
Triggers:

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


Actions:
Sector:
Set Tagged Sector's Floor Height/Texture • Set Tagged Sector's Ceiling Height/Texture • Copy Light Level to Tagged Sectors • Set Tagged Sector's Flats • Change Tagged Sectors' Tag • Change Front Sector's Tag • Start Adjustable Flickering Light • Start Adjustable Pulsating Light • Start Adjustable Blinking Light (unsynchronized) • Start Adjustable Blinking Light (synchronized) • Fade Light Level • Stop Lighting Effect • Change Plane Scroller Direction • Set Tagged Sector's Light Level
Plane movement:
Move Tagged Sector's Floor • Move Tagged Sector's Ceiling • Move Floor According to Front Texture Offsets • Move Ceiling According to Front Texture Offsets • Stop Plane Movement • Start Platform Movement • Crush Ceiling Once • Crush Floor Once • Crush Ceiling and Floor Once
Player/Object:
Teleporter • Change Object State • Stop Object • Award Score • Enable/Disable 2D Mode • Enable/Disable Gravity Flip • Award Power-Up • Disable Player Control • Change Object Size • Change Object Type State • Enable Bosses with Parameter • Track Object's Angle • Stop Tracking Object's Angle • Award Rings • Spawn Object • Stop Timer/Exit Stage in Record Attack • Dye Object • Trigger Egg Capsule
Other:
Change Music • Play Sound Effect • Run Script • Switch to Cut-Away View • Change Sky • Change Weather • Shatter FOF • Change Tagged Linedef's Textures • Start Metal Sonic Race • Condition Set Trigger • Call Lua Function • Earthquake • Make FOF Disappear/Reappear • Make FOF Crumble • Change Tagged Sector's Colormap • Change Skybox • Execute Linedef Executor (from Tag) • Execute Linedef Executor (Random Range) • Set FOF Translucency • Fade FOF • Stop Fading FOF • Fade Tagged Sector's Colormap • Stop Fading Tagged Sector's Colormap • Control Text Prompt • Toggle Level Fail
PolyObject:
Door Slide • Door Swing • Move • Move, Override • Rotate Right • Rotate Right, Override • Rotate Left • Rotate Left, Override • Move by Waypoints • Turn Invisible, Intangible • Turn Visible, Tangible • Set Translucency • Fade Translucency