Simple Guides 1: How to make it so that getting items from a box is randomized!

Hey! I’m starting the series for those who are newer to gimkit creative, can get some frequently asked questions quickly, and as simple as I can explain it. I once was a new player, and know how difficult it can be making a function work, so I wanted to start the series.

Now for the actual part…

So, lets say your making a survival game, and you want some good ol’ RNG in it. (Random Number Generation, aka randomizer.) But, oh no! You don’t know how to, and now you have to have set items, ruining the fun/vibe of it. Don’t worry, I’ve have this problem before and can teach you how to solve it!

                     Section 1, The button.
  • Get a button, and make it not visible to players.

  • Make the button transmit something. I will use A in this tutorial.

  • Make sure it deactivates when receiving your channel.

  • Choose your prop to go over it. I’m using an emoji, you can if you want to too!

In the end, it should be looking like this:
Screenshot 2024-01-18 5.56.33 PM

     Nice job! Next section now. Let's make the Randomizing.
  • Place down a trigger, and make it trigger when receiving that channel from that button! (For me it was A.) Make sure players can’t see it in game, and that it can’t be triggered when stepped on. Then, click the button in the top left, called blocks.

  • When you do that, a menu should appear. Click that when triggered block!

  • Copy the picture below, it may look intimidating, but with patience, you can do it.

  • To create the pink block, click variables, and name one. I will use B.

  • Copy picture below. I will use only 4 different items, so the only things you need to change, are the numbers in the integer. Use 1, then the next number will depend on how many different items you want dropped. So for me, its 4.

When successfully done, place down item granters. Depending on how many different items you want, Example, 6 dif items, 6 Granters. 3 Items, 3 Granters.

  • When Item Granters Placed, See how I made it broadcast Rand? Assign each item to a rand.

  • Example, lets say you get a strawberry when you get Rand1. Put your Rand_ (Underscore is a number) in the, “Give item when receiving” To that number.

  • When your finished, it should look a little something like this!

  • If you want more items in there, because currently I made it where you get one of them randomly, Just copy the trigger! If you want to have different boxes with different items, You will have to change all the channels so that it doesn’t give you another loot table.

                            The End!
    

Thank you so much for reading! I hope you got what you needed, and can finish that game your making. If it doesn’t work, tell me in the replies! And I can fix that problem up for you. Once again, thank you. I hope to make more like this in the future soon!

1 Like

Erm…isn’t there already guides on this?

Nice formatting tho.

2 Likes

I think for randomizing, but not for the box too itself.

Nice!
You can click on the gear box to make a single else if . Also, you can use concatenation! Get a create text block into the broadcast message block. Add a random integer between _ and _ in the bottom part of the block and in the top put “Rand”

4 Likes

Alright! Thank you for the tip. I will take that into consideration for my next creations.

small bump

Nice guide! However, is there a way to make the items have a chance?

Yes, changing the integer higher and using inequalities and some basic math, you can! Im currently busy, so you might have to ask someone else.

1 Like