Skip to content

random

Description

Writes a random integer into an out-variable between the configured minimum and maximum. The minimum is inclusive; the maximum is exclusive (for example, action random 0 5 x yields 0–4).

Parameters

<value_count> <number_out (0-count-1)>

  • <name> — required operand
  • {a|b|c} — choose one alternative
  • [ … ] — optional clause

Example

megalo
action random 0 5 randumb

Example from HREK broken/derekball.txt.

Supported Versions

VersionSupported
49Yes
73Yes
106Yes
107Yes
107 (MCC)Yes

See also action syntax.