Skip to content

randomgenerator: members

3 implemented, 0 reserved. Entries are sorted by name.

randomgenerator.randfloat() -> number

Runs on: server and client. Origin: compatibility. Since: M1. Playground: yes.

Returns the next number from 0 up to, but not including, 1.

temp.g = new MRandomGenerator(7);
echo(temp.g.randfloat());

Specification: standard-library.md§17.4.6.

randomgenerator.randint() -> number

Runs on: server and client. Origin: compatibility. Since: M1. Playground: yes.

Returns the next whole number from 0 to 2147483647.

temp.g = new MRandomGenerator(7);
echo(temp.g.randint());

Specification: standard-library.md§17.4.6.

randomgenerator.seed: number

Runs on: server and client. Origin: compatibility. Since: M1. Playground: no.

State of the generator: reading gives the current seed, writing restarts the sequence from that value.

temp.g = new MRandomGenerator(7);
temp.g.seed = 7;
echo(temp.g.randint());

Specification: standard-library.md§17.4.6.

Engine version 0.1.0. Built 2026-11-18.