Randomizer Linking

So I was making an item randomizer with blocks but it doesn’t have enough space to do it in one block. And I can’t figure out a way to link a randomizer so that it doesn’t dispense two items out.

Can you show screenshots of your code real quick?

1 Like

Maybe the chances are made so that if a higher number is rolled, it starts rolling a different randomizer.

Example:
Randomizer 1 rolls a number from 1-20, but the items only go up to 10. If a number higher than 10 is rolled, then that triggers the next randomizer to do 11-20

Sure thing!

well, you can do a few things. 1, you can set random to a variable at the start to save quite a few blocks.
I also believe there might be a text block block save you can do but im not 100% sure…?’

edit: there is

image

This did help but I still have a storage issue.

1 Like

I’ll try this as well.

1 Like

so you have 50 possibilities, right?

that’s
Assuming each text broadcast covers 5 possilbities, that’s.

5 + 7(10) = 75

So can I see your entire code, real quick, cuz you should be able to fit all 50, unless I miscounted.

1 Like

Not quite. I need a randomizer for all these with their rarities and these aren’t even all the gadgets in the game. edit (I’ll prob get rid of a few tho)

Alright then, you’re gonna need to do what CC suggested to link 2 code blocks together.

2 Likes

Or you could try a simpler solution:

This takes less space than 1 block, and does more in a few steps!
Def not boosting ego/self-promoting trust

assign numbers to gadget rarities, so call a common blaster “Blaster1” and an uncommon blaster “Blaster2”, and then use concatenation. i dont really have the time to explain what that is rn sorry

1 Like

Just use 2 random blocks like so:

Broadcast message on channel (Create text with | random integer from [1] to [insert here the number of gadgets you have]
                                               | random integer from [1] to [5]

The first number (or first 2 if there are more than 10 gadgets, I’m too lazy to figure it out) represents which gadget, and the second the rarity.

For example, 11 might represent a common blaster while 13 represents a rare blaster. Meanwhile, 33 represents a rare PML. If you need more digits, than something like 114 might be an epic snowball launcher. You get the point.

It’s not necessarily the most efficient way but it’s much easier for the brain to comprehend all of the channels (instead of figuring out that 55 is a legendary wand or whatnot).

2 Likes