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

math_remap

From Valve Developer Community
Jump to: navigation, search
class hierarchy
CMathRemap defined in logicentities.cpp
CLogicalEntity
CServerOnlyEntity
CBaseEntity

math_remap is a point entity available in all Source Source games. It remaps a range of input values to a given range of output values.

Flags

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

Keyvalues


Targetname:
Name (targetname) <string>
The targetname that other entities refer to this entity by.
Minimum Valid Input Value (in1) <integer>
Input values below this value will be ignored.
Maximum Valid Input Value (in2) <integer>
Input values above this value will be ignored.
Output Value When Input Is Min. (out1) <integer>
When the input value is equal to "Minimum Valid Input Value", this is the output value.
Output Value When Input Is Max. (out2) <integer>
When the input value is equal to "Maximum Valid Input Value", this is the output value.
Note.pngNote:These do not have to be in order - the math_remap will create an inverse relationship between the input and output if the output keyvalues are swapped.

EnableDisable:

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

Inputs

InValue <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 <float>
Fired when the InValue input is received, with the remapped input value as the parameter.