Randomizer for Rare Events

I'm new to Squiffy, and I'm wondering if there's any way to implement event rarity to a game?

For example:
Say, there's a "continue" option. When the player clicks it, the computer randomizes a number (say, 1-10)
If the generator spits out a number greater than 5, the player gets x event.
If the generator spits out a number greater than 2, but less than 5, the player gets y event.
If the generator spits out 1, the player gets z event.

Is there any way to do this?


Yep, using javascript Math.random() method at the begining of the new section.


This topic is now closed. Topics are closed after 180 days of inactivity.

Support

Forums