How To

How to set a random number to a variable ?

0

G-9 2019-11-12 12:05

I want to make a variable he has a random number between 1 and 4. Can you help me ?
(it is for a game : TEST OF RPG )
Thanks !


was8bit 2019-11-12 17:09

RND(3)+1
Creates an integer 1,2,3,4

For decimal amounts, use RND*4+1
Creates numbers 1.01 to 4.99


G-9 2019-11-14 07:39

thanks !


was8bit 2019-11-14 07:56

Glad i could help :)


LowRes Oranges are good 2019-11-22 22:16

Use RANDOMIZE TIMER if you want it to be really random. If you don't then it will be the same each time!


Log in to reply.