POINT logic_measure_direction

An entity that can measure the direction of an entity relative to another entity and apply that movement to a third entity.

KeyValues

Entity to Measure <target_destination>

Entity whose direction you want to measure.

Measure Reference <target_destination>

The direction of Entity to Measure will be measured from this entity.

Entity to Move <target_destination>

This entity will be moved in the direction of the Entity to Measure.

Movement Reference <target_destination>

The Entity to Move will move relative to this entity.

Trace scale <float> = 1

A scale to divide the distance between the Entity to Measure and the trace's endpoint by before applying those movements to the Entity to Move. 1 = target entity moves to the end of the trace, 2 = target entity moves to the middle of the trace (half as far), and 0.5 = target entity moves twice as far as the trace.

Measurement Type <choices> = Angles (0)

How should the direction be measured?

Possible Values:

Name Value
Angles 0
Eye angles 1
Attachment point angles 2

Trace distance <float> = 8192

The maximum distance that the trace can go. 0 = no limit.

Trace Mask <choices> = MASK_SHOT (Anything that would be hit by a bullet) (1174421507)

How the measurement tracing should act in regards to what it should collide with.

Possible Values:

Name Value
MASK_SOLID (Anything solid) 33570827
MASK_PLAYERSOLID (Anything solid + player clip) 33636363
MASK_NPCSOLID (Anything solid + NPC clip) 33701899
MASK_WATER (Water volumes) 16432
MASK_OPAQUE (Anything opaque, e.g. windows) 16513
MASK_BLOCKLOS (Anything that blocks line of sight) 16449
MASK_SHOT (Anything that would be hit by a bullet) 1174421507

Collision Group <choices> = None (0)

The collision group the measurement tracing should use.

Possible Values:

Name Value
None 0

Trace Filter <filterclass>

A filter to use for tracing.

Trace Filter behavior <choices> = If pass, don't hit (0)

What the filter should actually be used for.

Possible Values:

Name Value
If pass, don't hit 0
If pass, hit 1

Additional trace from movement reference <boolean> = No

Initiates another trace from the Movement Reference using the existing properties and adjusts the position to its end point. Only use this if the Movement Reference is different from the Measure Reference.

Movement scale <float> = 1

A scale to divide the measured movements by, before applying those movements to the Entity to Move. 1 = target entity moves as much as the measured entity, 2 = target entity moves half as far as the measured entity, and 0.5 = target entity moves twice as far as the measured entity.

Fire position outputs <boolean> = No

Allows OutPosition and OutAngles to be fired with the resulting position while this entity is active. Does not apply to the GetPosition input.

spawnflags <flags>

No description provided.

Possible Flags:

Name Value Default
Ignore X 1
Ignore Y 2
Ignore Z 4
Use 'Ignore' flags for origin instead of angles 8
Use new teleportation rules (smoother movement) 16
Don't change target's angles 32

Measurement Attachment <string>

Only useful for the ''Attachment point'' measurement type. This attachment should be on the Entity to Measure and measurements will correspond to its position and angles.

Inherited from BaseEntityPoint

Name <target_source>

The name that other entities refer to this entity by.

Global Entity Name <string>

Name by which this entity is linked to another entity in a different map. When the player transitions to a new map, entities in the new map with globalnames matching entities in the previous map will have the previous map's state copied over their state.

Pitch Yaw Roll (X Y Z) <angle> = 0 0 0

This entity's orientation in the world. Roll is the rotation around the X axis, pitch is rotation around the Y axis and yaw is the rotation around the Z axis.

Parent <target_destination>

The name of this entity's parent in the movement hierarchy. Entities with parents move with their parent. Set an attachment point via 'parentname,attachment'.

Inputs

SetMeasureTarget <target_destination>

Set the Entity to Measure, whose movement should be measured.

SetMeasureReference <target_destination>

Set the Measure Reference entity.

SetTarget <target_destination>

Set the Entity to Move, which will be moved to mimic the measured entity.

SetTargetReference <target_destination>

Set the Movement Reference entity.

SetTargetScale <float>

Set the scale to divide the measured movements by.

SetMeasureType <integer>

Sets the measurement type.

SetMeasureAttachment <string>

Sets the measurement attachment.

Enable <void>

Enable the logic_measure_direction.

Disable <void>

Disable the logic_measure_direction.

SetTraceFilter <target_destination>

Sets the entity to use as the trace filter. Pass in an empty string to clear the trace filter.

Target <string>

Set the Entity to Move, which will be moved to mimic the measured entity.

ShouldOutputPosition <boolean>

Sets whether we are allowed to fire position outputs while this entity is active.

GetPosition <void>

Initiates a single measurement with the current settings, only firing OutPosition and OutAngles without moving anything. (it doesn't need a target to be available) This input ignores the 'Fire position outputs' keyvalue and instead repurposes it to modify who the outputs' activator should be. If 'Fire position outputs' is enabled, the target will be used as the activator if it is available. If 'Fire position outputs' is disabled, the activator that fired GetPosition will be used instead.

Inherited from BaseEntityPoint

Kill <void>

Removes this entity from the world.

KillHierarchy <void>

Removes this entity and all its children from the world.

SetParent <target_destination>

Changes the entity's parent in the movement hierarchy.

SetParentAttachment <string>

Change this entity to attach to a specific attachment point on its parent. Entities must be parented before being sent this input. The parameter passed in should be the name of the attachment.

SetParentAttachmentMaintainOffset <string>

Change this entity to attach to a specific attachment point on it's parent. Entities must be parented before being sent this input. The parameter passed in should be the name of the attachment. The entity will maintain it's position relative to the parent at the time it is attached.

ClearParent <void>

Removes this entity from the the movement hierarchy, leaving it free to move independently.

SetLocalAngles <vector>

Sets the rotation of the entity relative to the parent's rotation.

SetLocalOrigin <vector>

Sets the position of the entity relative to its parent if one exists. Otherwise relative to the world.

SetAbsAngles <vector>

Set this entity's angles, always relative to the world origin.

AddOutput <string>

Adds an entity I/O connection to this entity or changes keyvalues dynamically. Format: '<output name> <targetname>:<inputname>:<parameter>:<delay>:<max times to fire (-1 == infinite, 1 = only once)>' or 'keyvalue newval'. Very dangerous, use with care.

FireUser1 <void>

Causes this entity's OnUser1 output to be fired.

FireUser2 <void>

Causes this entity's OnUser2 output to be fired.

FireUser3 <void>

Causes this entity's OnUser3 output to be fired.

FireUser4 <void>

Causes this entity's OnUser4 output to be fired.

Use <void>

More or less replicates the player interacting with an entity. (+USE)

PassUser1 <string>

Causes this entity's OutUser1 output to be fired, passing along the parameter unchanged.

PassUser2 <string>

Causes this entity's OutUser2 output to be fired, passing along the parameter unchanged.

PassUser3 <string>

Causes this entity's OutUser3 output to be fired, passing along the parameter unchanged.

PassUser4 <string>

Causes this entity's OutUser4 output to be fired, passing along the parameter unchanged.

FireRandomUser <void>

Fires OnUser1, OnUser2, OnUser3, or OnUser4 with a 25% chance of each.

PassRandomUser <string>

Fires OutUser1, OutUser2, OutUser3, or OutUser4 with a 25% chance of each. The parameter is passed along unchanged.

KillIfNotVisible <void>

Removes this entity if it is not in a player's viewcone.

KillWhenNotVisible <void>

Removes this entity when it is not in a player's viewcone. You can pass a time for when this should start.

FireOutput <string>

Fires the named output on this entity. Format: '<output name>:<activator>:<caller>:<parameter>:<delay>' (OnDeath:hl3cardgame:gaben). Everything beyond the output name is optional.

RemoveOutput <string>

Removes all instances of the named output on this entity. Wildcards are supported, meaning you could just pass '*' to wipe all outputs from this entity.

AcceptInput <string>

Fires the named input on this entity. Format: '<input name>:<parameter>:<activator>:<caller>:<output ID>' (SetTarget:cheese). Everything beyond the input name is optional. Mind the fact this is arranged differently from FireOutput, having the parameter right after the input name.

CancelPending <void>

Cancels any events fired by this entity that are currently pending in the I/O event queue.

FreeChildren <void>

Unparents all direct children of this entity.

SetLocalVelocity <vector>

Sets this entity's current velocity.

SetLocalAngularVelocity <vector>

Sets this entity's current angular velocity.

AddSpawnFlags <integer>

Adds spawnflag(s) to this entity. Many spawnflags have their respective numbers suffixed in this FGD.

RemoveSpawnFlags <integer>

Removes spawnflag(s) to this entity. Many spawnflags have their respective numbers suffixed in this FGD.

AddSolidFlags <integer>

Adds solid flags to this entity.

RemoveSolidFlags <integer>

Removes solid flags from this entity.

ChangeVariable <string>

Similar to AddOutput, except it changes an internal variable similar to logic_datadesc_accessor instead. Very dangerous, use with care.

SetHealth <integer>

Sets this entity's health.

AddHealth <integer>

Adds to this entity's health.

RemoveHealth <integer>

Removes from this entity's health.

SetMaxHealth <integer>

Sets this entity's max health.

SetEntityName <target_destination>

Sets this entity's name that other entities should refer to it by.

SetOwnerEntity <target_destination>

Sets this entity's owner entity. This has nothing to do with parenting and has more to do with collision and kill credits.

SetThinkNull <void>

Sets this entity's general think function to null. Behavior varies from entity to entity..

Touch <target_destination>

Simulates this entity touching the specified entity.

Outputs

OutPosition <vector>

Outputs the resulting position when allowed.

OutAngles <vector>

Outputs the resulting angles when allowed.

Inherited from BaseEntityPoint

OnUser1 <void>

Fired in response to FireUser1 input.

OnUser2 <void>

Fired in response to FireUser2 input.

OnUser3 <void>

Fired in response to FireUser3 input.

OnUser4 <void>

Fired in response to FireUser4 input.

OutUser1 <string>

Fires in response to PassUser1 input, with the parameter passed through unchanged.

OutUser2 <string>

Fires in response to PassUser2 input, with the parameter passed through unchanged.

OutUser3 <string>

Fires in response to PassUser3 input, with the parameter passed through unchanged.

OutUser4 <string>

Fires in response to PassUser4 input, with the parameter passed through unchanged.