How can I make "Random" a bit less "random"

DrGlickertDrGlickert Member Posts: 1,135
edited November -1 in Working with GS (Mac)
So in my bubble shooter game I have 7 different colored balls, and an additional "power" ball that breaks through everything, so technically 8 balls.

I have a random ball generator that generates random numbers which correspond to different balls. Random(1,8) makes the "Power" ball come up 1/8 times. Ideally I'd like the "Power" ball to come up about 8-10% of the time. So a little less than 1/8.

Any ideas on how to make the "Power ball" come up a little less frequently?

I was doing Random (1,15), where 1/8 was blue, 2/9 was red, 3/10 was green, etc. However, I've changed some rules and an no longer do this. Any ideas?

Comments

  • oberningoberning Member Posts: 105
    you could use timers
  • AquariusAquarius Member Posts: 282
    maybe some RITALIN?
  • ValanValan Member, BASIC Posts: 410
    Make the normals balls be random. Setup a counter for the power ball. Make a rule so that every 8 times the ball changes it becomes the power ball. The count itself could random so it brings up a power ball the 7th or 9th time.
    Hope this helps.
  • b2iscoolb2iscool Member Posts: 135
    The way i would do it is have two attributes the random and the powerup so you would change your attribute (random) to a random number (1,8) when its 8 and powerup attribute 1 then change powerup attribute to 0 and spawn the "powerball" otherwise change mystery to 1 and change random attribute to random(1,7) so every other time its 8 you would get the powerball otherwise you would just get a different ball...make sense?
Sign In or Register to comment.