Func portal detector: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
m (It's not a bug, it's a feature.)
m (Fix partial rewrite by User:MenialTasksBot)
 
(15 intermediate revisions by 11 users not shown)
Line 1: Line 1:
{{portal series brush|func_portal_detector}}
{{Underlinked|date=January 2024}}
 
{{CD}}
==Entity description==
{{LanguageBar}}{{this is a|brush entity|name=func_portal_detector|series=Portal}} It defines a region that fires an output if a portal is placed in it. {{warning|This entity may misbehave when it or the surfaces intersecting it are moving.}}
A region that fires an output if a portal is placed in it.
__NOTOC__
 
==Keyvalues==
==Keyvalues==
{{KV|Portal pair ID that it detects|integer}}
{{KV|Check all portals|boolean|Ignore the Group ID and check for all portals.|since=P2}}
{{KV Targetname}}
{{KV Targetname}}
{{KV Parentname}}
{{KV|Portal pair ID that it detects|intn=LinkageGroupID|integer|Portals are processed in numbered pairs. Check '''Starting Team''' on your [[weapon_portalgun]] for the correct number.}}
{{KV|Check all portals|intn=CheckAllIDs|boolean|Ignore the Group ID and check for all portals.|since=P2}}


==Flags==
==Flags==
* 1 : Start inactive
{{Fl|1|Start inactive}}


==Inputs==
==Inputs==
{{I EnableDisable}}
{{I EnableDisable}}
{{I Toggle}}
{{I Toggle}}
{{I Targetname}}
{{I Parentname}}


==Outputs==
==Outputs==
{{IO|OnStartTouchPortal|since=P2}}
{{O|OnStartTouchPortal|since=P2|Fired when a portal touches the entity.}}
{{IO|OnEndTouchPortal|since=P2}}
{{O|OnStartTouchPortal1|Fired when portal 1 (blue) touches the entity.}}
{{IO|OnStartTouchPortal1|Fired when portal 1 (blue) is placed intersecting the portal detector.}}
{{O|OnStartTouchPortal2|Fired when portal 2 (orange) touches the entity.}}
{{IO|OnStartTouchPortal2|Fired when portal 2 (orange) is placed intersecting the portal detector.}}
{{O|OnStartTouchLinkedPortal|Fired when a linked portal touches the entity.}}
{{IO|OnStartTouchLinkedPortal|Fired when linked portal is placed intersecting the portal detector.}}
{{O|OnStartTouchBothLinkedPortals|Fired when both portals of a pair touch the entity.}}
{{IO|OnStartTouchBothLinkedPortals|Fired when both of a pair of portals is placed intersecting the portal detector.}}
{{O|OnEndTouchPortal|since=P2|Fired when a portal moves away from the entity.}}
{{IO|OnEndTouchPortal1|since=P2}}
{{O|OnEndTouchPortal1|since=P2|Fired when portal 1 (blue) moves away from the entity.}}
{{IO|OnEndTouchPortal2|since=P2}}
{{O|OnEndTouchPortal2|since=P2|Fired when portal 2 (orange) moves away from the entity.}}
{{IO|OnEndTouchLinkedPortal|since=P2|Fired when a linked portal intersecting the portal detector ceases to intersect the detector, or is no longer linked.}}
{{O|OnEndTouchLinkedPortal|since=P2|Fired when a linked portal moves away from the entity, or is no longer linked.}}
{{Note|If the player walks through a portal cleanser (thus removing portals) this output does not. This is likely intentional; it prevents end of end of area cleansers from reactivating triggers where the player won't be returning to.}}
:{{Bug|If the player walks through a portal cleanser (thus removing portals) this output does not fire.}}
{{IO|OnEndTouchBothLinkedPortals|since=P2}}
{{O|OnEndTouchBothLinkedPortals|since=P2|Fired when both portals of a pair first touch the entity (<code>OnStartTouchBothLinkedPortals</code>), and then are moved away from it.}}
{{O Targetname}}
:{{Bug|If the player walks through a portal cleanser (thus removing portals) this output does not fire.}}

Latest revision as of 17:57, 18 July 2025

Underlinked - Logo.png
This article needs more Wikipedia icon links to other articles to help Wikipedia icon integrate it into the encyclopedia. Please help improve this article by adding links Wikipedia icon that are relevant to the context within the existing text.
January 2024
C++ Class hierarchy
???
CBaseEntity
English (en)Translate (Translate)

func_portal_detector is a brush entity available in Portal 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>[ 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

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
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 ?]