func_portal_detector

From Valve Developer Community
Jump to navigation Jump to search
Icon-callout-underlinked.png
This article needs more links to other pages (since January 2024). You can help improve navigation by adding links to related documentation, such as entities or tools.
C++ Class hierarchy
CFuncPortalDetector
CBaseEntity
C++ portal/func_portal_detector.cpp
English (en)Translate (Translate)

func_portal_detector is a brush entity available in Portal seriesPortal series Portal series. It defines a region that fires an output if a portal is placed in it.

Warning.pngWarning: This entity may misbehave when it or the surfaces intersecting it are moving.

Keyvalues

Name (targetname) <string>
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
Portal pair ID that it detects (LinkageGroupID) <integer>
Portals are processed in numbered pairs. Check Starting Team on your weapon_portalgun for the correct number.
Check all portals (CheckAllIDs) <boolean> (in all games since Portal 2)
Ignore the Group ID and check for all portals.

Flags

Start inactive : [1]

Inputs

EnableDisable:

Enable / Disable <void>
Enable/disable this entity from performing its task. It might also disappear from view.
Toggle:
Toggle
Toggle the enabled/disabled status of this entity.

Outputs

OnStartTouchPortal  (in all games since Portal 2)
Fired when a portal touches the entity.
OnStartTouchPortal1
Fired when portal 1 (blue) touches the entity.
OnStartTouchPortal2
Fired when portal 2 (orange) touches the entity.
OnStartTouchLinkedPortal
Fired when a linked portal touches the entity.
OnStartTouchBothLinkedPortals
Fired when both portals of a pair touch the entity.
OnEndTouchPortal  (in all games since Portal 2)
Fired when a portal moves away from the entity.
OnEndTouchPortal1  (in all games since Portal 2)
Fired when portal 1 (blue) moves away from the entity.
OnEndTouchPortal2  (in all games since Portal 2)
Fired when portal 2 (orange) moves away from the entity.
OnEndTouchLinkedPortal  (in all games since Portal 2)
Fired when a linked portal moves away from the entity, or is no longer linked.
Icon-Bug.pngBug:If the player walks through a portal cleanser (thus removing portals) this output does not fire.  [todo tested in ?]
OnEndTouchBothLinkedPortals  (in all games since Portal 2)
Fired when both portals of a pair first touch the entity (OnStartTouchBothLinkedPortals), and then are moved away from it.
Icon-Bug.pngBug:If the player walks through a portal cleanser (thus removing portals) this output does not fire.  [todo tested in ?]