Math remap: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
m (Robot: fixing template case.)
(Cleanup)
Line 1: Line 1:
{{wrongtitle|title=math_remap}}
{{base point|math_remap}}
{{base_point}}


==Entity Description==
==Entity Description==
An entity that remaps a range of input values to a given range of output values.
An entity that remaps a range of input values to a given range of output values.


==Keyvalues==
== Keyvalues ==
*{{KV Targetname}}
{{KV|Minimum Valid Input Value|integer|Input values below this value will be ignored.}}
*'''in1''' <float>
{{KV|Maximum Valid Input Value|integer|Input values above this value will be ignored.}}
:Input values below this value will be ignored.
{{KV|Output Value When Input Is Min.|integer|When the input value is equal to 'Minimum Valid Input Value', this is the output value.}}
*'''in2''' <float>
{{KV|Output Value When Input Is Max.|integer|When the input value is equal to 'Maximum Valid Input Value', this is the output value.}}
:Input values above this value will be ignored.
{{KV Targetname}}
*'''out1''' <float>
{{KV EnableDisable}}
:When the input value is equal to 'Minimum Valid Input Value' ('''in1'''), this is the output value.
*'''out2''' <float>
:When the input value is equal to 'Maximum Valid Input Value' ('''in2'''), this is the output value.
*{{KV EnableDisableEP1}}
==Flags==
*1 : Ignore out of range input values


==Inputs==
== Flags ==
*{{I Targetname}}
* 1 : Ignore out of range input values
*'''InValue''' <float>
* 2 : Clamp output to output range
:Input value and fire the output with the remapped value.
 
*{{I EnableDisableEP1}}
== Inputs ==
==Outputs==
{{IO|InValue|Input value and fire the output with the remapped value.|param=float}}
*{{O Targetname}}
{{I Targetname}}
*'''OutValue''' <float>
{{I EnableDisable}}
:Fired when the '''InValue''' input is received, with the remapped input value as the parameter.
 
== Outputs ==
{{IO|OutValue|Fired when the <code>InValue</code> input is received, with the remapped input value as the parameter.|param=float}}
{{O Targetname}}

Revision as of 00:37, 9 June 2011

Template:Base point

Entity Description

An entity that remaps a range of input values to a given range of output values.

Keyvalues

Minimum Valid Input Value ([todo internal name (i)]) <integer>
Input values below this value will be ignored.
Maximum Valid Input Value ([todo internal name (i)]) <integer>
Input values above this value will be ignored.
Output Value When Input Is Min. ([todo internal name (i)]) <integer>
When the input value is equal to 'Minimum Valid Input Value', this is the output value.
Output Value When Input Is Max. ([todo internal name (i)]) <integer>
When the input value is equal to 'Maximum Valid Input Value', this is the output value.
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

Start Disabled (StartDisabled) <boolean>
Stay dormant until activated (with theEnableinput).

Flags

  • 1 : Ignore out of range input values
  • 2 : Clamp output to output range

Inputs

InValue <floatRedirectInput/float>
Input value and fire the output with the remapped value.

EnableDisable:

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

Outputs

OutValue <floatRedirectInput/float>
Fired when the InValue input is received, with the remapped input value as the parameter.