How do I lowering the chance of choosing a variable

0 favourites
  • 3 posts
From the Asset Store
Easily store, modify, read and manipulate colors with Color Variables!
  • Hello! Prompt how to register in one action that from number of a random house (0, 100) the value with decrease in a chance of a drop of this value was chosen. Ie the number 0 will drop out in ~ 50% of cases the higher the number tending to 100 the lower the chance of falling out of this number, ie the number 100 will drop out to us in the 0.01% case.

    I did so round (choose (random (10, 15), random (10, 25), random (10, 30), random (10, 35), random (10, 40), random (10, 45), random (10, 50))) * 0.01 but the highest number of all-out drops out very often, is there a special team that will direct me to the true path?

  • You can get something similar (but not exactly what you described) with this formula:

    round(random(10)*random(10))

    For a much "steeper" results you can do this:

    round(random(1)*random(1)*random(1)*100)

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • You can get something similar (but not exactly what you described) with this formula:

    round(random(10)*random(10))

    For a much "steeper" results you can do this:

    round(random(10)*random(10)*random(10)/10)

    It's great! How I racked my brains and did not think of it, I'll drink a cup of tea for you!

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)