How do I creat a loot box?

0 favourites
  • 3 posts
From the Asset Store
Perfect, complete, easy to use to use, out-of-the-box inventory system
  • I'm trying to create a loot box that has 6 result options:

    Common 82.87%

    Rare 10.36%

    Super Rare 5.18%

    Epic 1.04%

    legend 0.52%

    Super Legend 0.04%

    How to do this ?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Use a variable called "lootchance".

    Lets say you click a button, set "lootchance" to random(1,100)

    After that when you want the player to get loot, you add a condition checking what number "lootchance" is set to,

    if equal to or lower than 82.87 > Give player loot common

    If equal to or higher than 82.88 BUT lower than 93,24 > give player loot rare

    if equal to or higher than 93.24 but lower than 98.42 > give player super rare

    if equal to or higher than 98.42 but lower than 99.46 > give player Epic

    if equal to or higher than 99.46 but lower than 99.98 > give player Legendary

    if equal to or higher than 99.60> give player Super Legend

    Prob a better way of explaining and doing it, I'm drunk, hope it helps anyways, merry christmas.

  • Use a variable called "lootchance".

    Lets say you click a button, set "lootchance" to random(1,100)

    After that when you want the player to get loot, you add a condition checking what number "lootchance" is set to,

    if equal to or lower than 82.87 > Give player loot common

    If equal to or higher than 82.88 BUT lower than 93,24 > give player loot rare

    if equal to or higher than 93.24 but lower than 98.42 > give player super rare

    if equal to or higher than 98.42 but lower than 99.46 > give player Epic

    if equal to or higher than 99.46 but lower than 99.98 > give player Legendary

    if equal to or higher than 99.60> give player Super Legend

    Prob a better way of explaining and doing it, I'm drunk, hope it helps anyways, merry christmas.

    Thanks

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