This article's documentation is for anything that uses the Source engine. Click here for more information.

Func areaportal: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
No edit summary
Line 1: Line 1:
{{LanguageBar}}
{{distinguish|linked_portal_door|desc1={{p2}} An unrelated entity, sometimes referred to as a "world portal"}}
{{distinguish|linked_portal_door|desc1={{p2}} An unrelated entity, sometimes referred to as a "world portal"}}


<!-- When this page is updated to {{langsp}} or {{langsp}} instead of {{lang}}, please move {{this is a}} to the base page, as it is automatically translated. -->{{lang|Func areaportal}}
 
{{CD|CAreaPortal|file1=func_areaportal.cpp}}
{{CD|CAreaPortal|file1=func_areaportal.cpp}}
[[File:Toolsareaportal.gif|link=Areaportal|left]] {{this is a|brush entity|name=func_areaportal}} It creates an [[areaportal]], used to manage visibility in maps. When the portal is open it stops objects not visible through it from rendering; when the portal is closed it cannot be seen through at all.
[[File:Toolsareaportal.gif|link=Areaportal|left]] {{this is a|brush entity|name=func_areaportal}} It creates an [[areaportal]], used to manage visibility in maps. When the portal is open it stops objects not visible through it from rendering; when the portal is closed it cannot be seen through at all.
Line 9: Line 10:
While it is {{Tooltip|line=dashed|It will work the same if textured with a world texture, Nodraw, or trigger textures|not necessary for the entity to function}}, the texture [[Tool_textures_(Source)#Optimization|tools/toolsareaportal]] (seen on the left) is intended to be used on areaportals.
While it is {{Tooltip|line=dashed|It will work the same if textured with a world texture, Nodraw, or trigger textures|not necessary for the entity to function}}, the texture [[Tool_textures_(Source)#Optimization|tools/toolsareaportal]] (seen on the left) is intended to be used on areaportals.


==Keyvalues==
== Keyvalues ==
{{KV Targetname}}
{{KV Targetname}}
{{KV|Name of Linked Door|intn=target|targetname|A entity (usually {{ent|prop_door_rotating}} or {{ent|func_door}}) whose open/closed state controls the on/off state of the portal. This is optional.}}
{{KV|Name of Linked Door|intn=target|targetname|A entity (usually {{ent|prop_door_rotating}} or {{ent|func_door}}) whose open/closed state controls the on/off state of the portal. This is optional.}}
{{KV|Initial State|intn=StartOpen|bool|Initial state of the portal.}}
{{KV|Initial State|intn=StartOpen|bool|Initial state of the portal.}}


==Inputs==
== Inputs ==
{{IO|Open|Sets the portal to the open state.}}
{{I|Open|Sets the portal to the open state.}}
{{IO|Close|Sets the portal to the closed state.}}
{{I|Close|Sets the portal to the closed state.}}
{{IO|Toggle|Opens the portal if closed. Closes the portal if open.}}
{{I|Toggle|Opens the portal if closed. Closes the portal if open.}}


==See also==
== See also ==
* {{ent|func_areaportalwindow}}
* {{ent|func_areaportalwindow}}
* [[areaportal]]
* [[areaportal]]

Revision as of 14:16, 20 April 2025

English (en)Hrvatski (hr)Русский (ru)中文 (zh)Translate (Translate)
Not to be confused with linked_portal_door (Portal 2 An unrelated entity, sometimes referred to as a "world portal").


C++ Class hierarchy
CAreaPortal
CFuncAreaPortalBase
CBaseEntity
C++ func_areaportal.cpp
Toolsareaportal.gif

func_areaportal is a brush entity available in all Source Source games. It creates an areaportal, used to manage visibility in maps. When the portal is open it stops objects not visible through it from rendering; when the portal is closed it cannot be seen through at all.

These are not really brush entities. They are brush entities from a mapper/Hammer perspective, but by the time they reach the game, the brush is gone and this is, in effect, a point entity.

While it is not necessary for the entity to function, the texture tools/toolsareaportal (seen on the left) is intended to be used on areaportals.

Keyvalues

Name (targetname) <string>[ Edit ]
The name that other entities refer to this entity by, via Inputs/Outputs or other keyvalues (e.g. parentname or target).
Also displayed in Hammer's 2D views and Entity Report.
See also:  Generic Keyvalues, Inputs and Outputs available to all entities

Name of Linked Door (target) <targetname>
A entity (usually prop_door_rotating or func_door) whose open/closed state controls the on/off state of the portal. This is optional.
Initial State (StartOpen) <boolean>
Initial state of the portal.

Inputs

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