Point proximity sensor: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
(-added class hierarchy, cleanup)
Line 12: Line 12:


== Inputs ==
== Inputs ==
{{IO|SetTargetEntity|param=target|nofgd=1|Sets the target entity and begins output. The targetnames [[!activator]] and [[!caller]] are accepted.}}
{{IO|Toggle|Toggle the sensor between enabled and disabled.}}
{{IO|Toggle|Toggle the sensor between enabled and disabled.}}
{{IO|SetTargetEntity|param=target|nofgd=1|Sets the target entity and begins output. The targetnames [[!activator]] and [[!caller]] are accepted.}}
{{I EnableDisable}}
{{I EnableDisable}}


== Outputs ==
== Outputs ==
{{IO|Distance|Distance of the target entity away from this entity.|param=float}}
{{IO|Distance|Distance of the target entity away from this entity.|param=float}}

Revision as of 11:58, 5 September 2023

Template:Entity It continuously outputs the distance from itself to a target entity.

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

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 <floatRedirectInput/float>
Distance of the target entity away from this entity.