ACSUtils Wiki

An ACS library for ZDoom-based ports

User Tools

Site Tools


Random number functions

These functions are wrappers around Random.

  • int randint() – returns a random integer.
  • bool randbool() – returns either true or false.
  • int randsign() – returns either 1 or -1. Intended use: randsign() * 100.


  • any RandomPick2(any a1, any a2)
  • any RandomPick3(any a1, any a2, any a3)
  • any RandomPick8(any a1, any a2, any a3, …)

Returns one of the arguments.

This set of functions intends to replicate A_RandomPick in ACS. Since ACS doesn't support variable argument count or default arguments, 8 versions of the same function for different argument counts are available.

new/random.txt · Last modified: 2018/02/20 16:00 by korshun