Math remap (Source 2): Difference between revisions
Jump to navigation
Jump to search
(Create source 2 math_remap page) |
No edit summary |
||
(One intermediate revision by one other user not shown) | |||
Line 1: | Line 1: | ||
{{tabs|main=source|source=1|source2=1|math_remap}} | {{tabs|main=source|source=1|source2=1|math_remap}} | ||
{{this is a|point entity|name=math_remap|engine=Source 2}} It remaps a range of input values to a given range of output values. | {{this is a|point entity|name=math_remap|engine=Source 2}} It remaps a range of input values to a given range of output values. | ||
__NOTOC__ | __NOTOC__ | ||
Line 16: | Line 15: | ||
== Inputs == | == Inputs == | ||
{{ | {{I|InValue|Input value and fire the output with the remapped value.|param=float}} | ||
{{I EnableDisable}} | {{I EnableDisable}} | ||
== Outputs == | == Outputs == | ||
{{ | {{O|OutValue|Fired when the <code>InValue</code> input is received, with the remapped input value as the parameter.|param=float}} | ||
{{ | {{O|OnRoseAboveMin|Fired when the InValue input rises above the minimum legal value.}} | ||
{{ | {{O|OnRoseAboveMax|Fired when the InValue input rises above the maximum legal value.}} | ||
{{ | {{O|OnFellBelowMin|Fired when the InValue input falls below the minimum legal value.}} | ||
{{ | {{O|OnFellBelowMax|Fired when the InValue input falls below the maximum legal value.}} |
Latest revision as of 11:08, 26 September 2024
math_remap
is a point entity available in all 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
ortarget
).
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 the
Enable
input).
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.
- 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.