Event Instruction C6

From Final Fantasy Hacktics Wiki
Jump to: navigation, search

{C6} MinMax

MinMax(xVR,xPR,MINIM,MAXIM)

Alters a variable's value when it is too small or too great so that it fits within a given range.


See also: {C1} LoadAddress{C2} UnitAddress{C3} WorldUnitAddress{C4} SaveAddress


Variable : Byte (hex)

ID of the Variable which will be written to.

Warning: Only x00-x7F (words) are valid with this instruction!

Click here for the list of Variables


Parameters : Byte (hex)

  • x01: No minimum value
  • x02: No maximum value


Minimum Value : Half-word (unsigned)

If the value is smaller than this number, is will be set to this value. Includes negative numbers.


Maximum Value : Half-word (unsigned)

If the value is greater than this number, it will be set to this value.