Math remap

From Valve Developer Community

This point-based entity is available in all Source games.

Table of contents

Entity Description

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

Keyvalues

Defines the name that other entities refer to this entity by.
  • hammerid [Episode Two Update]
<integer readonly> This id is used for debugging purposes in Hammer.
  • in1 <float>
Input values below this value will be ignored.
  • in2 <float>
Input values above this value will be ignored.
  • out1 <float>
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.
  • StartDisabled [Episode One Update]
<boolean>

Flags

  • 1 : Ignore out of range input values

Inputs

  • Kill
Removes this entity from the world.
Removes this entity and all its children from the world.
  • AddOutput <string>
Evaluates a keyvalue/output on this entity. It can be potentially very dangerous, use with care.
Format: <key> <value>
Format: <output name> <targetname>:<inputname>:<parameter>:<delay>:<max times to fire (-1 == infinite)>
Causes this entity's OnUser1-4 outputs to be fired. See User Inputs and Outputs.
  • InValue <float>
Input value and fire the output with the remapped value.
  • Enable [Episode One Update]
Enable this entity.
  • Disable [Episode One Update]
Disable this entity.

Outputs

Fired in response to FireUser1-4 inputs. See User Inputs and Outputs.
!activator = activator
  • OutValue <float>
Fired when the InValue input is received, with the remapped input value as the parameter.