Transfer_Heights

From ZDoom Wiki

Jump to: navigation, search

209:Transfer_Heights (tag, flags)

tag: Tag of affected sector 
flags: Defines the properties of the effect

This is BOOM's 242 linedef. It is used to divide a sector into upper, lower, and middle regions. The drawn heights of the tagged sector's floor and ceiling come from the heights of the sector on the line's front side. The line's texture names can be used to specify a special color map or palette blend to be used in those regions. Palette blends are of the form "AARRGGBB". You can use the testblend command to find a good blend from inside the game.

Zdoom supports the internal name "WATERMAP". If you place this on your linedef instead of a blend value, Zdoom will create a blend of the value "80004FA5" which is a nice misty underwater blue.

The flags parameter determines how the fake floor and ceiling are rendered and can have values such as:

0 = There will be situations when the sector's real ceiling and floor heights will be used instead of the fake heights (this is the way BOOM does it).
1 = The fake ceiling and floor heights will always be used.
2 = Only the fake floor will be drawn.
4 = The fake floor/ceiling is only visible if it is inside of the sector the player moves around in. The texture on the control sector's floor is also used for the top and bottom of the fake floor. The same applies to the fake ceiling.
8 = Make the target sector swimmable under the fake floor (no need for the WaterZone thing).
16 = Do not draw the fake floor or ceiling, however they can still be used on conjunction with the sector action things that correspond to them (useful for making the player fall down a deep hole or similar).
32 = Do not transfer the control sector's lighting to the affected sector(s).

These values can also be combined by adding them. For example a value of 6 would combine values 2 and 4, and a value of 29 would combine values 16, 8, 4 and 1.

The following description is an excerpt from boomref.txt:


This allows the tagged sector to have two levels � an actual floor and ceiling, and another floor or ceiling where more flats are rendered. Things will stand on the actual floor or hang from the actual ceiling, while this function provides another rendered floor and ceiling at the heights of the sector on the first sidedef of the linedef. Typical use is "deep water" that can be over the player's head. [Note: See the waterzone thing (9045)]

    ----------------------------------  < real sector's ceiling height
   |         real ceiling             | < control sector's ceiling texture
   |                                  |
   |                                  | < control sector's lightlevel
   |              A                   |
   |                                  | < upper texture as colormap
   |                                  |
   |                                  | < control sector's floor texture
    ----------------------------------  < control sector's ceiling height
   |         fake ceiling             | < real sector's ceiling texture
   |                                  |
   |                                  | < real sector's lightlevel
   |              B                   |
   |                                  | < normal texture as colormap
   |                                  |
   |          fake floor              | < real sector's floor texture
    ----------------------------------  < control sector's floor height
   |                                  | < control sector's ceiling texture
   |                                  |
   |                                  | < control sector's lightlevel
   |              C                   |
   |                                  | < lower texture as colormap
   |                                  |
   |          real floor              | < control sector's floor texture
    ----------------------------------  < real sector's floor height

Boom sectors controlled by a 242 linedef are partitioned into 3 spaces. The viewer's xyz coordinates uniquely determine which space they are in.

If they are in space B (normal space), then the floor and ceiling textures and lightlevel from the real sector are used, and the colormap from the 242 linedef's first sidedef's normal texture is used (COLORMAP is used if it's invalid or missing). The floor and ceiling are rendered at the control sector's heights.

If they are in space C ("underwater"), then the floor and ceiling textures and lightlevel from the control sector are used, and the lower texture in the 242 linedef's first sidedef is used as the colormap.

If they are in space A ("head over ceiling"), then the floor and ceiling textures and lightlevel from the control sector are used, and the upper texture in the 242 linedef's first sidedef is used as the colormap.

If only two of these adjacent partitions in z-space are used, such as underwater and normal space, one has complete control over floor textures, ceiling textures, light level, and colormaps, in each of the two partitions. The control sector determines the textures and lighting in the more "unusual" case (e.g. underwater).

It's also possible for the fake floor to extend below the real floor, in which case an invisible platform / stair effect is created. In that case, the picture looks like this (barring any ceiling effects too):


    ----------------------------------  < real sector's ceiling texture
   |   real ceiling = fake ceiling    |
   |                                  |
   |                                  |
   |              B                   | < real sector's lightlevel
   |                                  | < normal texture's colormap
   |                                  |
   |          real floor              |
    ----------------------------------  < invisible, no texture drawn
   |                                  |
   |                                  |
   |                                  | < real sector's lightlevel
   |              C                   | < normal texture's colormap
   |                                  |
   |                                  |
   |          fake floor              | < real sector's floor texture
    ----------------------------------  < fake sector's floor height

In this case, since the viewer is always at or above the fake floor, no colormap/lighting/texture changes occur � the fake floor just gets drawn at the control sector's height, but at the real sector's lighting and texture, while objects stand on the higher height of the real floor.

It's the viewer's position relative to the fake floor and/or fake ceiling which determines whether the control sector's lighting and textures should be used, and which colormap should be used. If the viewer is always between the fake floor and fake ceiling, then no colormap, lighting, or texture changes occur, and the view just sees the real sector's textures and light level drawn at possibly different heights.

If the viewer is below the fake floor height set by the control sector, or is above the fake ceiling height set by the control sector, then the corresponding colormap is used (lower or upper texture name), and the textures and lighting are taken from the control sector rather than the real sector. They are still stacked vertically in standard order � the control sector's ceiling is always drawn above the viewer, and the control sector's floor is always drawn below the viewer.

The kaleidescope effect only occurs when F_SKY1 is used as the control sector's floor or ceiling. If F_SKY1 is used as the control sector's ceiling texture, then under water, only the control sector's floor appears, but it "envelops" the viewer. Similarly, if F_SKY1 is used as the control sector's floor texture, then when the player's head is over a fake ceiling, the control sector's ceiling is used throughout.

F_SKY1 causes HOM when used as a fake ceiling between the viewer and normal space. Since there is no other good use for it, this kaleidescope is an option turned on by F_SKY1. Note that this does not preclude the use of sky REAL ceilings over deep water � this is the control sector's ceiling, the one displayed when the viewer is underwater, not the real one.

A colormap has the same size and format as Doom's COLORMAP. Extra colormaps may defined in Boom by adding them between C_START and C_END markers in wads. Colormaps between C_START and C_END are automatically merged by Boom with any previously defined colormaps.

Ceiling bleeding may occur if required upper textures are not used.

Example wad

Personal tools