Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

Random Number

A topic by Monkey_Luke created May 04, 2024 Views: 168 Replies: 3
Viewing posts 1 to 3
How to generate random numbers to use with variables?

Resolved.

variable=RANDOM(1,6)

Assigns "variable" a random number between 1 and 6 included.

Yes, but be advised:  variable=RANDOM(1,6) will actually generate a random number between 1 and 5, not between 1 and 6! I know this is confusing, but it's because of the way that most random number generators work.

Because it's starts from zero if to be specific.