Func areaportal: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
(added category)
(Updated formatting)
Line 4: Line 4:
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|Controlling Geometry Visibility and Compile Times: Areaportals]] for more information.
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|Controlling Geometry Visibility and Compile Times: Areaportals]] for more information.


==Keys==
==Entity Values==
;Name (targetname)
===Keys===
: <target_source> The name that other entities refer to this entity by.
* '''Name''' ''targetname <target_source>''
: The name that other entities refer to this entity by.


;Name of Linked Door (target)
* '''Name of Linked Door''' ''target <target_destination>''
: <target_destination> (Optional) The name of a door whose open/closed state controls the on/off state of this area portal.
: (Optional) The name of a door whose open/closed state controls the on/off state of this area portal.


;Initial State (StartOpen)
* '''Initial State''' ''StartOpen <choices>''
: <choices> Choose the initial state of this entity.
: Choose the initial state of this entity.


==Flags==
===Flags===
No flags.
No flags.


==Inputs==
===Inputs===


;Kill
* '''Kill'''
: Removes this entity from the world.
: Removes this entity from the world.


;KillHierarchy
* '''KillHierarchy'''
: Removes this entity and all its children from the world.
: Removes this entity and all its children from the world.


;AddOutput <string>
* '''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.
: 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
* '''FireUser1'''
: Causes this entity's OnUser1 output to be fired.
: Causes this entity's OnUser1 output to be fired.


;FireUser2
* '''FireUser2'''
: Causes this entity's OnUser2 output to be fired.
: Causes this entity's OnUser2 output to be fired.


;FireUser3
* '''FireUser3'''
: Causes this entity's OnUser3 output to be fired.
: Causes this entity's OnUser3 output to be fired.


;FireUser4
* '''FireUser4'''
: Causes this entity's OnUser4 output to be fired.
: Causes this entity's OnUser4 output to be fired.


;Open
* '''Open'''
: Open the portal. When the portal is open is can be seen through.
: Open the portal. When the portal is open is can be seen through.


;Close
* '''Close'''
: Close the portal. When the portal is closed it cannot be seen through.
: Close the portal. When the portal is closed it cannot be seen through.


;Toggle
* '''Toggle'''
: Toggle the open/closed state of the portal.
: Toggle the open/closed state of the portal.




==Outputs==
===Outputs===


;OnUser1
* '''OnUser1'''
: Fired in response to FireUser1 input.
: Fired in response to FireUser1 input.


;OnUser2
* '''OnUser2'''
: Fired in response to FireUser2 input.
: Fired in response to FireUser2 input.


;OnUser3
* '''OnUser3'''
: Fired in response to FireUser3 input.
: Fired in response to FireUser3 input.


;OnUser4
* '''OnUser4'''
: Fired in response to FireUser4 input.
: Fired in response to FireUser4 input.



Revision as of 22:53, 10 July 2005

Template:Wrongtitle

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.

Entity Values

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.