func_areaportal

From Source Entities
(Redirected from Areaportal)
Jump to navigation Jump to search
Not to be confused with linked_portal_door. (An unrelated entity, sometimes referred to as a "world portal")
An areaportal in L4d2-small.pngc10m2_drainage between a narrow passage and a large room. The areaportal hides whatever isn't visible through the opening it's over, giving a considerable performance boost as the player moves through the tunnel. Doing this with hints would be time-consuming, less granular, and impractical.

Code classes:

Areaportal.png

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.

An areaportal over the door to the right in L4d2-small.pngc10m3_ranchhouse ensures that no matter where people are inside the building, they only see a small portion of the huge outside area.

Keyvalues[edit | edit source]

Name of Linked Door (target) <target_destination>
Optional. A prop_door_rotating or func_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.

See Also[edit | edit source]