Logic measure movement: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
m (Robot: Automated text replacement (-\{\|\r +{| class=standard-table))
(Cleanup)
Line 1: Line 1:
{{wrongtitle|title=logic_measure_movement}}
{{base point|logic_measure_movement}}
{{base_point}}


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


{{note | Useful for simulating motion outside of the hierarchy system. }}
{{note|Useful for simulating motion outside of the hierarchy system. }}


{{warning | Does not properly update collision physics on the object being moved. }}
{{warning|Does not properly update collision physics on the object being moved. }}


==Keyvalues==
== Keyvalues ==
{{KV|Entity to Measure|target_destination|Entity whose movement you want to measure.}}
{{KV|Measure Reference|target_destination|The movement of Entity to Measure will be measured relative to this entity.}}
{{KV|Entity to Move|target_destination|This entity will be moved to mimic the motions of Entity to Measure.}}
{{KV|Movement Reference|target_destination|The Entity to Move will move relative to this entity.}}
{{KV|Movement scale|float|A scale to divide the measured movements by, before applying those movements to the Entity to Move. <br/> 1 {{=}} target entity moves as much as the measured entity, <br/> 2 {{=}} target entity moves half as far as the measured entity, and <br/> 0.5 {{=}} target entity moves twice as far as the measured entity.}}
{{KV|Measurement Type|choices|What to measure.}}
:* 0 : Position
:* 1 : Eye position
{{KV Targetname}}


* {{KV Targetname}}
== Inputs ==
{{IO|SetMeasureTarget|Set the Entity to Measure, whose movement should be measured.|param=string}}
{{IO|SetMeasureReference|Set the Measure Reference entity.|param=string}}
{{IO|Target|Set the Entity to Move, which will be moved to mimic the measured entity.|param=string}}
{{IO|SetTargetReference|Set the Movement Reference entity.|param=string}}
{{IO|SetTargetScale|Set the scale to divide the measured movements by.|param=float}}
{{IO|Enable|Enable the logic_measure_movement.}}
{{IO|Disable|Disable the logic_measure_movement.}}
{{I Targetname}}


* '''MeasureTarget'''
== Outputs ==
: <target_destination> Entity whose movement you want to measure.
{{O Targetname}}
 
* '''MeasureReference'''
: <target_destination> The movement of Entity to Measure will be measured relative to this entity.
 
* '''Target'''
: <target_destination> This entity will be moved to mimic the motions of Entity to Measure.
 
* '''TargetReference'''
: <target_destination> The Entity to Move will move relative to this entity.
 
* '''TargetScale'''
: <float> A scale to divide the measured movements by, before applying those movements to the Entity to Move.
 
* '''MeasureType'''
: <choices> What to measure.
:{| class=standard-table
! Literal Value || Description
|-
| 0 || Position (origin)
|-
| 1 || Eye position (angles)
|}
 
==Inputs==
 
* {{I Targetname}}
 
* '''SetMeasureTarget <target_destination>'''
: Set the Entity to Measure, whose movement should be measured.
 
* '''SetMeasureReference <target_destination>'''
: Set the Measure Reference entity.
 
* '''Target <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.
 
* '''Enable'''
: Enable the logic_measure_movement.
 
* '''Disable'''
: Disable the logic_measure_movement.
 
==Outputs==
 
* {{O Targetname}}

Revision as of 23:29, 8 June 2011

Template:Base point

Entity Description

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

Note.pngNote:Useful for simulating motion outside of the hierarchy system.
Warning.pngWarning:Does not properly update collision physics on the object being moved.

Keyvalues

Entity to Measure ([todo internal name (i)]) <targetname>
Entity whose movement you want to measure.
Measure Reference ([todo internal name (i)]) <targetname>
The movement of Entity to Measure will be measured relative to this entity.
Entity to Move ([todo internal name (i)]) <targetname>
This entity will be moved to mimic the motions of Entity to Measure.
Movement Reference ([todo internal name (i)]) <targetname>
The Entity to Move will move relative to this entity.
Movement scale ([todo internal name (i)]) <float>
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.
Measurement Type ([todo internal name (i)]) <choices>
What to measure.
  • 0 : Position
  • 1 : Eye position
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

Inputs

SetMeasureTarget <stringRedirectInput/string>
Set the Entity to Measure, whose movement should be measured.
SetMeasureReference <stringRedirectInput/string>
Set the Measure Reference entity.
Target <stringRedirectInput/string>
Set the Entity to Move, which will be moved to mimic the measured entity.
SetTargetReference <stringRedirectInput/string>
Set the Movement Reference entity.
SetTargetScale <floatRedirectInput/float>
Set the scale to divide the measured movements by.
Enable
Enable the logic_measure_movement.
Disable
Disable the logic_measure_movement.


Outputs