Functions: If_Number Function - Wynntils/Wynntils GitHub Wiki

If_Number function

Aliases

  • IF_NUM

Description

Based on condition, returns the first value if the comparison is true, otherwise return second value.

Arguments

This function has 3 required arguments.

  • condition (Boolean) → The condition to be met.
  • ifTrue (Number) → The value which will be returned when the condition is true.
  • ifFalse (Number) → The value which will be returned when the condition is false.

Schematics

IF_NUMBER(<condition>; <ifTrue>; <ifFalse>) → (Number)

Example

IF_NUMBER(TRUE;10;0)  10
⚠️ **GitHub.com Fallback** ⚠️