Game Maker

Decimal

A property type for storing numbers with decimal points.

The Decimal property type is used for storing numbers that require precision, such as those with fractional parts.

  • Default Value: 0.0

Common Use Cases

  • Calculating damage with multipliers.
  • Storing precise coordinates or velocities.
  • Tracking health that isn't a whole number.
  • Custom physics calculations.

Operators (in Change Property action)

Includes all operators from the Number type, plus additional mathematical functions:

  • Set, Add, Subtract, Multiply, Divide, Modulo
  • Power: Raises the value to the power of the operand.
  • Square Root: Calculates the square root of the value.
  • Absolute Value: Makes the value positive.
  • Round, Floor, Ceil, Truncate: Standard rounding operations.
  • Invert Sign: Flips the number from positive to negative or vice versa.

Checks (in Property Condition)

  • Equals: Checks if the value is exactly equal to another decimal.
  • Greater Than / Greater Than or Equal To
  • Less Than / Less Than or Equal To