Commands /
Evaluate Formula
The Evaluate Formula Command, evaluates a formula and saves the result as an integer or floating point to a global or local Variable.
Name | Explanation | Type |
---|---|---|
Formula | The formula to evaluate. | Formula |
Integer | Evaluates the formula result as an integer or whole number. | Toggle |
Floating Point | Evaluates the formula result as a floating point or fractional number. | Toggle |
Target | The variable to store the result in. | Variable |
Example 1: You can use this command to set statistics dependencies on Equipment?. For example, there is a strength (STR), and max hit points (Max_HP) statistic. Max_HP is affected by it.
The characters hit points (HP) formula is (300 + str * 10)
Within an Equipments? equip/unequip script.
You save the characters STR value to Variable (Global Variable 001).
Then use the Evaluate Formula Command with the formula (300 + globalint(1) * 10).