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

Point proximity sensor: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
m (Substituted IO templates)
(seems like false bug or attempt to change target via addouput)
Line 1: Line 1:
{{CD|CPointProximitySensor|file1=pointanglesensor.cpp}}
{{this is a|point entity|name=point_proximity_sensor}} It continuously outputs the distance from itself to a target entity.
{{this is a|point entity|name=point_proximity_sensor}} It continuously outputs the distance from itself to a target entity.
{{bug|If target doesn't appear with entity spawn - [[point_proximity_sensor]] will not fire<code>Distance</code>output.}}
 
{{CD|CPointProximitySensor|file1=pointanglesensor.cpp}}
__NOTOC__
__NOTOC__
== Keyvalues ==
== Keyvalues ==
Line 18: Line 18:


== Outputs ==
== Outputs ==
{{O|Distance|Distance of the target entity away from this entity.|param=float}}
{{O|Distance|ac-is-this=1|Distance of the target entity away from this entity.|param=float}}

Revision as of 07:41, 29 April 2025

C++ Class hierarchy
CPointProximitySensor
CPointEntity
CBaseEntity
C++ pointanglesensor.cpp

point_proximity_sensor is a point entity available in all Source Source games. It continuously outputs the distance from itself to a target entity.


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

Target Entity Name (target) <targetname>
Name of the entity whose distance will be sensed.
Pitch Yaw Roll (Y Z X) (angles) <QAngle>
This entity's orientation in the world. Pitch is rotation around the Y axis, yaw is the rotation around the Z axis, roll is the rotation around the X axis.
Start Disabled (StartDisabled) <boolean>
Stay dormant until activated (with theEnableinput).

Flags

Test the distance as measured along the axis specified by our direction. : [1]

Inputs

SetTargetEntity <targetnameRedirectInput/string> !FGD
Sets the target entity and begins output. The targetnames !activator and !caller are accepted.
Toggle
Toggle the sensor between enabled and disabled.

EnableDisable:

Enable / Disable
Enable/disable this entity from performing its task. It might also disappear from view.

Outputs

Distance <floatRedirectOutput/float>
!activator = !caller = this entity
Distance of the target entity away from this entity.