func_areaportal
- Not to be confused with linked_portal_door. (An unrelated entity, sometimes referred to as a "world portal")
Code classes:
CAreaPortal
CFuncAreaPortalBase
CBaseEntity
(all ents)
func_areaportal
is a brush entity present in all Source games. It creates an areaportal. When the portal is open, it de-renders objects in the area across from the viewer which aren't visible through the opening. When the portal is closed it cannot be seen through at all.
The entity's brush must be textured with tools/toolsareaportal
(seen on the left) for it to function. Areaportals should completely cover the entrance they're meant to work on. Areaportals must not be able to draw a line through visleaves from one side of themselves to another. If there are multiple openings to an area, there needs to be an areaportal over each one, otherwise the engine won't have clear boundaries between areas. If an areaportal can draw a line to itself, it's considered a leak and generates a pointfile just like a normal one.
Keyvalues[edit | edit source]
- Name of Linked Door
(target)
<target_destination>
- Optional. A
prop_door_rotating
orfunc_door
whose open/closed state controls the on/off state of the portal. - Initial State
(StartOpen)
<choices>
- Initial state of the portal.
- 0: Closed
- 1: Open
- Portal Version (read only)
(PortalVersion)
<int>
- Differentiates between shipping HL2 maps and maps using new engine features. Changing this could cause odd behavior.
Inputs[edit | edit source]
- Open
- Sets the portal to the open state.
- Close
- Sets the portal to the closed state.
- Toggle
- Opens the portal if closed. Closes the portal if open.