CFuncPortalDetector

From Source Entities
Jump to navigation Jump to search

Code classes:

CFuncPortalDetector is a code class in both Portal games.

Classnames:

  • func_portal_detector - Detects portals inside a volume. This entity is essentially func_portalled with less features.

Flags[edit | edit source]

  • 1: Start inactive

Keyvalues[edit | edit source]

Portal pair ID (LinkageGroupID) <integer>
Which portals to detect. Normally these are 0 for singleplayer, 2 for P-Body, and 3 for ATLAS.
Check all portals (CheckAllIDs) <boolean> (only available in P2.png)
Ignores Portal pair ID and detects all portals.

Inputs[edit | edit source]

Activate
Turns on bumping functionality.
Deactivate
Turns off bumping functionality.
Toggle
If on, turn off. If off, turn on.

Outputs[edit | edit source]

OnStartTouchPortal1
Fires when portal 1 (blue) is placed in the entity.
OnStartTouchPortal2
Fires when portal 2 (orange) is placed in the entity.
OnStartTouchLinkedPortal
Fires when an open portal is placed in the entity, or a closed portal opens while in the entity.
OnStartTouchBothLinkedPortals
Fires when both portals of a pair are placed in the entity.
OnStartTouchPortal  (only available in P2.png)
Fires when any portal is placed in the entity.
OnEndTouchPortal  (only available in P2.png)
Fires when a portal moves away from the entity.
OnEndTouchPortal1  (only available in P2.png)
Fires when portal 1 (blue) moves away from the entity.
OnEndTouchPortal2  (only available in P2.png)
Fires when portal 2 (orange) moves away from the entity.
OnEndTouchLinkedPortal  (only available in P2.png)
Fires when an open portal is moved away from the entity, or becomes closed.
Bug: If the player walks through a trigger_portal_cleanser (thus removing portals) this output does not fire.
OnEndTouchBothLinkedPortals  (only available in P2.png)
Fires when both portals of a pair which were touching the entity are moved away from it.
Bug: If the player walks through a trigger_portal_cleanser (thus removing portals) this output does not fire.