Skip to main content

Chance and cooldown

Chance​

function.chance

True with the given probability in percent

InTypeWhat it is
PercentNumberHow likely it is true, from 0 to 100
OutTypeWhat it is
ResultBooleanTrue with the given chance

Cooldown​

function.cooldown

True at most once per duration; the first evaluation is true

InTypeWhat it is
DurationNumberHow long to wait after passing, in the picked unit
OutTypeWhat it is
ResultBooleanTrue once the time has passed since it was last true

Random Integer​

function.random_integer

A random integer between lower and upper, both inclusive

InTypeWhat it is
LowerIntegerThe smallest possible integer
UpperIntegerThe largest possible integer
OutTypeWhat it is
ResultIntegerA random integer between both, inclusive

Random Number​

function.random_number

A random number from lower, inclusive, to upper, exclusive

InTypeWhat it is
LowerNumberThe smallest possible number
UpperNumberThe largest possible number
OutTypeWhat it is
ResultNumberA random number between both