Func areaportal

From Valve Developer Community
Revision as of 01:30, 4 July 2005 by Demented (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Entity Description

A portal brush used to manage visibility in maps. Portals define areas, which are spaces that are connected in the map. Both sides of a portal cannot touch the same area, for example, a doughnut shaped map would require at least two portals to divide the map into two areas. A linear map could be divided into two areas with a single area portal. See Controlling Geometry Visibility and Compile Times: Areaportals for more information.

Keys

Name (targetname)
<target_source> The name that other entities refer to this entity by.
Name of Linked Door (target)
<target_destination> (Optional) The name of a door whose open/closed state controls the on/off state of this area portal.
Initial State (StartOpen)
<choices> Choose the initial state of this entity.

Flags

No flags.

Inputs

Kill
Removes this entity from the world.
KillHierarchy
Removes this entity and all its children from the world.
AddOutput <string>
Adds an entity I/O connection to this entity. Format: <output name> <targetname>:<inputname>:<parameter>:<delay>:<max times to fire (-1 == infinite)>. Very dangerous, use with care.
FireUser1
Causes this entity's OnUser1 output to be fired.
FireUser2
Causes this entity's OnUser2 output to be fired.
FireUser3
Causes this entity's OnUser3 output to be fired.
FireUser4
Causes this entity's OnUser4 output to be fired.
Open
Open the portal. When the portal is open is can be seen through.
Close
Close the portal. When the portal is closed it cannot be seen through.
Toggle
Toggle the open/closed state of the portal.


Outputs

OnUser1
Fired in response to FireUser1 input.
OnUser2
Fired in response to FireUser2 input.
OnUser3
Fired in response to FireUser3 input.
OnUser4
Fired in response to FireUser4 input.

Miscellaneous

  • Behavior with linked doors can be tricky. If the areaportal is doing the opposite that it should, closing when the door is open and vice versa, change the areaportal's initial state.
  • Areaportals do not take into account geometry between the portal volume and the player when considering visibility.