Instructions/Remap: Difference between revisions

From Desynced Wiki
(Created page with "{{Instruction_Top}} ==== Description ==== ==== Uses ==== ==== Similar Instructions ==== {{Instruction_Bottom}}")
 
 
Line 3: Line 3:
==== Description ====
==== Description ====


Changes value, based on input low & input high, to a relative number between target low and target high.


Clicking on these registers does not allow you to input a negative number into any of the registers.  However, you may use negative values stored in registers, parameters, or variables and it will work.  For example, I was able to input 1, 0, 10, 0, -10 and got the output -1, using a variable set to -10 with 'set number'.
Unfortunately, remap does not work with coordinates, only values.  However, you can use 'separate coordinate' and 'combine coordinate' to extract, recombine coordinate pairs for movement targets.  This is especially sad since 'map' is in the name.
==== Uses ====
==== Uses ====



Latest revision as of 22:36, 19 October 2024


Remap
     File:Instructions-Remap.png
     Remaps a value between two ranges
Lua ID remap_value
Category Global
Icon Compare Values.png
Argument One: Type Input
Argument One: Name Value
Argument One: Description Value to Remap
Argument Two: Type Input
Argument Two: Name Input Low
Argument Two: Description Low value for input
Argument Three: Type Input
Argument Three: Name Input High
Argument Three: Description High value for input
Argument Four: Type Input
Argument Four: Name Target Low
Argument Four: Description Low value for target
Argument Five: Type Input
Argument Five: Name Target high
Argument Five: Description High value for target
Argument Six: Type Output
Argument Six: Name Result
Argument Six: Description Remapped value



Description[edit | edit source]

Changes value, based on input low & input high, to a relative number between target low and target high.

Clicking on these registers does not allow you to input a negative number into any of the registers. However, you may use negative values stored in registers, parameters, or variables and it will work. For example, I was able to input 1, 0, 10, 0, -10 and got the output -1, using a variable set to -10 with 'set number'.

Unfortunately, remap does not work with coordinates, only values. However, you can use 'separate coordinate' and 'combine coordinate' to extract, recombine coordinate pairs for movement targets. This is especially sad since 'map' is in the name.

Uses[edit | edit source]

Similar Instructions[edit | edit source]