Random Chance in Game (Uses Blocks)

Wait, also is the higher the number the higher the chance?

1 Like

Can somebody please respond?

1 Like

Please, instead of making so many posts, edit one post to reduce clutter!
I can get back to you around 4:00 if you want.

1 Like

What do you mean by that…

Let me explain it to you:

Set RandomFish to  random integer from 1-20

This means that the RandomFish is a random integer from 1-20.

If RandomFish = 1
do Broadcast Message on Channel Beach 1

If the random integer from the number is 1 then it will broadcast a message on Beach 1. Lets just say that Beach 1 is an item granter granting Beach Fish.
But If the random integer is not 1 you will continue.

That’s pretty much it.

Oh!
You can vary the chance by giving the chance different.
For example if you want a common fish out of 100. You get it 40/100 right?
So you would make it:

If RandomFish < 40 
do Broadcast Message on Common 1

The chance is different. So that you get it more than the other fish.

If I didn’t tell you correctly please Ping me for more in depth on this.

There is already multiple pictures on how it works on this guide and it should be receiving on channel because there is no ‘wires’ in code.

3 Likes

Wait, if random Fish is greater than 40?

then it checks the next

else if

block

Also what is integer?

a number

Just show picture of how it works pls. I also want to know if I should wire it or if it should be receiving on channel.

spawns in
channels are always best.
less memory.

1 Like

Just tell me if this is right.

1 Like

you could always use the create text with block to simplify it a ton

@CookieKidorLegendGim yes, thats right, but everything has the same chance. you’ll need the <= block for that

Bro, so I could have done it way easier the whole time?

1 Like

Yep this is right.

But remember the chance of all the things are the exact same.

1 Like

Wait, but I want different chances for each one.

Also is this the block?
Screenshot 2026-01-12 4.05.48 PM

So you’re asking for odds of something occuring?

Basically I want something like this:

Gimfish: 1% chance

Green Fish: 49% chance

Blue Fish: 30% chance

Purple Fish: 20% chance

1 Like

Well uh
easiest way to do this would probably be to have it broadcast on the message if another number rolls
ex.
if the number is a 3, 6, or 9, it transmits on Fish4
search up the percentages to do it all to your liking
i’m not mathing right now lol

not really possible
they don’t really mingle with commoners like us nowadays
busy with updates and all that

2 Likes

yes.

you use that for chances
for example:

Set random to random integer from 1 to 100
If Random <= 50 
do broadcast message on channel: Fish1
If Random <= 75
do broadcast message on channel: Fish2
If Random <= 90 
do broadcast message on channel: Fish3
If Random <= 99 
do broadcast message on channel: Fish4
If Random = 100 
do broadcast message on channel: Fish5

The chance of Fish1 is 50%
The chance of Fish2 is 25%
The chance of Fish3 is 15%
The chance of Fish4 is 9%
The chance of Fish5 is 1%

nope

working on it

1 Like