Skip to content

SeedRnd

Narta Xaymar Dirks edited this page Oct 28, 2026 · 7 revisions

Blitz3DBlitzPlusBlitzBasic

SeedRnd

SeedRnd:Void seed:Int32
Parameter Mode Type Default Description
seed In Int32 required The starting value.

Description

Restarts the random number generator from a seed. The same seed always gives the same numbers from Rand and Rnd, which is useful for replays and procedurally generated levels. Every program starts with the same seed (4660), so it gets the same random numbers on every run until you use SeedRnd MilliSecs() for different ones.

Examples

SeedRnd 42
a = Rand(1, 1000)
SeedRnd 42
b = Rand(1, 1000)
Print a = b
1

Related Commands

Rnd, RndSeed

Home · Command Index



Differences
Language Features
BlitzBasic
Blitz3D
BlitzPlus

Clone this wiki locally