Author Topic: Random variables and items  (Read 1070 times)

What I want is to have it so when the minigame resets, a random number is generated. (From 1 to 3)

When a player activates the brick, a different item is given to them depending on the number generated.

Does anyone know how to do this?

Now I have a different problem. I got the random number generator to work, but now it seems to almost always put up 3, while I sometimes see 1, and almost never see 2 at all. Here are my events:




Does anyone know why this is happening? Is it just bad luck?


First line, the last parameter should be 1 not 0, if you're trying to get a number between 1 and 3.



No edit: Right, also, thanks Destiny! This would explain why I don't get a weapon sometimes.

No edit: Right, also, thanks Destiny! This would explain why I don't get a weapon sometimes.
ya, the range of it starts at the first value, and ends at the last