Random

From ZDoom Wiki
Jump to: navigation, search

int Random (int min, int max)

Usage

Returns a random integer between min and max (inclusive).

Parameters

  • min: The minimum value to return.
  • max: The maximum value to return.

Return value

A random integer between min and max (inclusive).

Examples

This script damages the activator with damage from 1 to 10 when activated:

script 1 (void)
{
    DamageThing (Random (1, 10));
}
Personal tools
Namespaces
Variants
Actions
Navigation
ACS
DECORATE
ZDoom mods
Toolbox