156:Line_SetPortal (targetline, thisline, type, planeanchor)
|Note: This special behaves slightly differently with the Hexen map format compared to the UDMF map format. The thisline parameter, noted below, is unnecessary with UDMF because the linedef structure has a dedicated line ID property. This parameter should be set to 0 when using the UDMF format.|
Sets a portal upon a line. Once created, a portal can be redefined with Line_SetPortalTarget.
The line should have enough empty space to allow for something to pass through it. The line should also be double sided unless on a polyobject.
This special will not allow to create crossable portals on one-sided lines unless it's a polyobject.
Creates a portal between two linedefs in a similar fashion to stacked sectors.
- targetline: The tag number of the line that will act as the "exit" of the current portal.
- thisline: The tag number of the current line. In UDMF, this argument should be 0.
- type: The type of portal.
- 0: Visual only. Actors cannot interact with this portal.
- 1: Visual plus simple teleporter. Triggering this line will cause the actor to be teleported to the "exit" line.
- 2: Interactive. Has all features of the teleporter type but allows certain other actions to recognize the portal.
- 3: Static. The portal should work like the linked portals in Eternity Engine, including its same limitations. They cannot be redefined.
- 4: Eternity-compatibility. This is reserved for XLAT to make this line special compatible with the Eternity definition. Functionally this is identical to type 3, but with different parameter use. A line with a special Line_SetPortal(0, id, 4) will create a portal with another line with a special Line_SetPortal(1, id, 4). For the 'id' parameter the same rules as for the other types apply when being used in UDMF.
- planeanchor: Determines how the planes at the other side of the portal are relative to this line. Only portals of type 0 and 1 can have an alignment other than 'none'.
- 0: No alignment. Neither the floor nor ceiling at the other side of the portal will be aligned. The sectors at both sides should have similar z-heights.
- 1: Align floors. Both sides of the portal will be aligned so the floor heights match.
- 2: Align ceilings. Both sides of the portal will be aligned so the ceilings match.
Conversions from linedef types
The following Doom map format types can be converted as :
|376:Portal_LinkedLineToLine||Line_SetPortal (0, tag, 4)|
|377:Portal_LinkedLineToLineAnchor||Line_SetPortal (1, tag, 4)|