Skip to content

SeedRandom

Narta Xaymar Dirks edited this page Dec 2, 2026 · 1 revision

SeedRandom BlitzLLVM

SeedRandom:Void random:Int32, seed:Int32
Parameter Mode Type Default Description
random In Int32 required The generator.
seed In Int32 required Where its numbers start. 0 takes one from the clock.

Description

BlitzLLVM This command does not exist in the original Blitz products. BlitzLLVM adds it.

Starts a generator of CreateRandom again from a seed. Afterwards it gives the same numbers as a new generator made with that seed. A seed of 0 takes one from the clock, like CreateRandom().

Differences

  • Not in the originals; SeedRnd seeds the one generator of Rnd and Rand.

Examples

rng = CreateRandom()
SeedRandom rng, 42
a = SampleRandom(rng, 1, 1000)
SeedRandom rng, 42
Print a = SampleRandom(rng, 1, 1000)
1

Related Commands

CreateRandom BlitzLLVM, FreeRandom BlitzLLVM, RandomState BlitzLLVM, RndSeed BlitzBasic, SampleRandom BlitzLLVM, SeedRnd BlitzBasic, SetRandomState BlitzLLVM

Home · Command Index


Getting started

Language

Tools


Language Features
BlitzBasic
Blitz3D
BlitzPlus
Differences

More

Clone this wiki locally