This article's documentation is for Source 2. Click here for more information.

math_remap

From Valve Developer Community
Revision as of 15:58, 19 June 2024 by FrozenH2O (talk | contribs) (Include missing inputs and outputs accessible by every Source 2 entity)
Jump to navigation Jump to search
C++ Class hierarchy
CMathRemap
CLogicalEntity
CServerOnlyEntity
CBaseEntity
C++ logicentities.cpp

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

Flags

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

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

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.
Start Disabled (StartDisabled) <boolean>
Stay dormant until activated (with theEnableinput).

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.

Base:

RunScriptFile
Load and execute a script file.
RunScriptCode
Execute a fragment of script code.
CallScriptFunction
Call a script function.
CallPrivateScriptFunction
Calls a script function from this entity's private script scope.
CallGlobalScriptFunction
Calls a script function in the global script scope.
Kill
Removes this entity from the world.
KillHierarchy
Removes this entity and all its children from the world.
AddOutput
Adds an entity I/O connection to this entity. Parameter format: OutputName→TargetName→InputName→Parameter→Delay→MaxRefires
FireUser1 to FireUser4
Fires the respectiveOnUseroutputs; see User Inputs and Outputs.


Outputs

OutValue <floatRedirectInput/float>
Fired when the InValue input is received, with the remapped input value as the parameter.
OnRoseAboveMin
Fired when the InValue input rises above the minimum legal value.
OnRoseAboveMax
Fired when the InValue input rises above the maximum legal value.
OnFellBelowMin
Fired when the InValue input falls below the minimum legal value.
OnFellBelowMax
Fired when the InValue input falls below the maximum legal value.