Sector_SetPortal

57:Sector_SetPortal (tag, type, plane, misc, alpha)

Establishes a one-way portal between two sectors.

Parameters

  • tag: Tag of sectors in which the portal must be seen. Note that the sectors seen through the portal must not share this tag. For the 'copy to line' type this will be a line id, not a sector tag.
  • type: The type of portal.
  • plane: Whether the portal is set on the floor (0), the ceiling (1), or both planes (2). For the copy portal type, setting this to 3 will copy any portal with the given tag.
  • misc: The meaning of this argument depends on the type.
For a normal view portal (type 0): Specifies whether the line belongs to the sector viewed through the portal (1) or the sector in which the portal is seen (0).
For a transferred portal (type 1): Specifies the sector tag of the portal to copy.
For a skybox portal (type 2): Ignored.
  • alpha: Gives a translucency value to the portal plane.

Types

  • 0: Normal view portal. This is what will generally be used. Two linedefs must be defined, one in the "source" sector and one in the "destination" sector; the first three arguments for both of these linedefs must be identical while the fourth must be different. Any number of sectors can share this link by having the same tag. To make a two-way portal, another pair of linedef must be used.
  • 1: Copied portal. 'misc' specifies the tag of the portal to copy. This copies the given portal to all sectors tagged with 'tag' or the line's front sector if 'tag' is 0. Use this for sectors which need to have a different tag, such as a lift, yet should share the portal.
  • 2: Skybox portal. The linedef's front sector is the skybox and must contain a SkyCamCompat object. The sky from this skybox will be visible on the concerned plane of all tagged sectors; even if the sky flat is not used.
Warning: This feature is GZDoom specific, and is not compatible with ZDoom!
To see all of GZDoom's specific features, see GZDoom features.
  • 3: Plane portal. Renders the linedef's frontsector's planes into infinity at a fixed distance from the camera.
  • 4: Horizon portal. Renders the linedef's frontsector's planes into infinity at the planes' heights.
  • 5: Copy portal to line: 'misc' specifies the portal to copy. If 'tag' is non-zero, copy the portal to all lines with the given ID, otherwise affects the line itself.
  • 6: Interactive portal. Actors can move through it. Although implemented in ZDoom, it is of more use with GZDoom's renderer which is far less limited.


Conversions from linedef types

The following Doom map format types can be converted as Sector_SetPortal:

TypeConversionTrigger
Eternity 283:Portal_PlaneCeilingSector_SetPortal (tag, 3, 1, 0, 0)
Eternity 284:Portal_PlaneFloorSector_SetPortal (tag, 3, 0, 0, 0)
Eternity 285:Portal_PlaneFloorCeilingSector_SetPortal (tag, 3, 2, 0, 0)
Eternity 286:Portal_HorizonCeilingSector_SetPortal (tag, 4, 1, 0, 0)
Eternity 287:Portal_HorizonFloorSector_SetPortal (tag, 4, 0, 0, 0)
Eternity 288:Portal_HorizonFloorCeilingSector_SetPortal (tag, 4, 2, 0, 0)
Eternity 289:Portal_LineTransferSector_SetPortal (0, 5, 0, tag)
Eternity 290:Portal_SkyboxCeilingSector_SetPortal (tag, 2, 1, 1, 0)
Eternity 291:Portal_SkyboxFloorSector_SetPortal (tag, 2, 0, 1, 0)
Eternity 292:Portal_SkyboxFloorCeilingSector_SetPortal (tag, 2, 2, 1, 0)
Eternity 295:Portal_AnchoredCeilingSector_SetPortal (tag, 0, 1, 1, 0)
Eternity 296:Portal_AnchoredFloorSector_SetPortal (tag, 0, 0, 1, 0)
Eternity 297:Portal_AnchoredFloorCeilingSector_SetPortal (tag, 0, 2, 1, 0)
Eternity 298:Portal_AnchorLineSector_SetPortal (tag, 0, 1, 0, 0)
Eternity 299:Portal_AnchorLineFloorSector_SetPortal (tag, 0, 0, 0, 0)
Eternity 344:Portal_AnchoredCeilingSector_SetPortal (tag, 0, 1, 1, 0)
Eternity 345:Portal_AnchoredFloorSector_SetPortal (tag, 0, 0, 1, 0)
Eternity 346:Portal_AnchorLineSector_SetPortal (tag, 0, 1, 0, 0)
Eternity 347:Portal_AnchorLineFloorSector_SetPortal (tag, 0, 0, 0, 0)
Eternity 358:Portal_AnchoredCeilingSector_SetPortal (tag, 6, 1, 1, 0)
Eternity 359:Portal_AnchoredFloorSector_SetPortal (tag, 6, 0, 1, 0)
Eternity 360:Portal_AnchorLineSector_SetPortal (tag, 6, 1, 0, 0)
Eternity 361:Portal_AnchorLineFloorSector_SetPortal (tag, 6, 0, 0, 0)
Eternity 385:Apply_PortalToFrontsectorSector_SetPortal (0, 1, 3, tag)
This article is issued from Zdoom. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.