Skip to main content

Math

Evaluate Math Expression

Set a variable to the result of evaluating a math expression.

References
/docs/scripting/math-expressions

Evaluate Math Expression
Variable
$Variable0
Expression
e.g. 5 + (6 * $health)...
  • Variable: The variable to use.
  • Expression: The expression to evaluate.

If Math Expression

Conditionally execute part of the script if the specified math expression evaluates to true.

References
/docs/scripting/math-expressions

If Math Expression
Expression
e.g. $health >= 0...
True
Add Event
Else
  • Expression: The expression to evaluate.
  • True: The script to run if the condition is true.
  • False: The script to run if the condition is false.

Math Functions

Allows you to perform various maths functions on a variable to add/subtract/multiply/divide/modulus a value/variable/random number.

Math Functions
Variable
$Variable0
Operation
Set To
Value
True
  • Variable: The variable to use.
  • Operation: The operation to use for modifying the variable value.
  • Value: The value to combine with the variable using the selected operation.

Seed Random Number Generator

Place this to run in response to user input to ensure random numbers change between playthroughs.

Seed Random Number Generator
Place this to run in response to user input to ensure random numbers change between playthroughs