Discuss Scratch

AnAccount_StopAsking
Scratcher
500+ posts

Control blocks

I think this block is more reasonable but there's a CHANCE(pun intended) be unreasonable to be a new block.

It's basically a chance one (e.g. 50 being the input will have what is put in between have a 50% chance of

Last edited by AnAccount_StopAsking (March 27, 2020 15:56:36)

AnAccount_StopAsking
Scratcher
500+ posts

Control blocks

AnAccount_StopAsking wrote:

I think this block is more reasonable but there's a CHANCE(pun intended) be unreasonable to be a new block.

It's basically a chance one (e.g. 50 being the input will have what is put in between have a 50% chance of
happening.
aKidCalledAris
Scratcher
67 posts

Control blocks

Here's a good workaround:

whenclickedsetrandomtopickrandom1to2ifrandom=2then. . .else. . .

Replace the “…” blocks with the code you want to run
Maximouse
Scratcher
1000+ posts

Control blocks

So you are suggesting something like this?

if25%chancethendosomethingelsedosomethingelse
AnAccount_StopAsking
Scratcher
500+ posts

Control blocks

Maximouse wrote:

So you are suggesting something like this?

if25%chancethendosomethingelsedosomethingelse
The workaround isn't right.
It only does the “something” if the chance is a quarter, making it being full chance.

Last edited by AnAccount_StopAsking (March 27, 2020 20:37:41)

Maximouse
Scratcher
1000+ posts

Control blocks

AnAccount_StopAsking wrote:

Maximouse wrote:

So you are suggesting something like this?

if25%chancethendosomethingelsedosomethingelse
Yes
This would actually be useful, because @aKidCalledAris's workaround only works for chances 1/n when n is an integer. The only real workaround I know is
ifpickrandom0.0to100.0<chancethen. . .
AnAccount_StopAsking
Scratcher
500+ posts

Control blocks

aKidCalledAris wrote:

Here's a good workaround:

whenclickedsetrandomtopickrandom1to2ifrandom=2then. . .else. . .

Replace the “…” blocks with the code you want to run
Makes sense.
aKidCalledAris
Scratcher
67 posts

Control blocks

Maximouse wrote:

AnAccount_StopAsking wrote:

Maximouse wrote:

So you are suggesting something like this?

if25%chancethendosomethingelsedosomethingelse
Yes
This would actually be useful, because @aKidCalledAris's workaround only works for chances 1/n when n is an integer. The only real workaround I know is
ifpickrandom0.0to100.0<chancethen. . .
Yeah, that actually is much better, hehe.

Last edited by aKidCalledAris (March 27, 2020 20:43:39)

AnAccount_StopAsking
Scratcher
500+ posts

Control blocks

aKidCalledAris wrote:

Maximouse wrote:

AnAccount_StopAsking wrote:

Maximouse wrote:

So you are suggesting something like this?

if25%chancethendosomethingelsedosomethingelse
Yes
This would actually be useful, because @aKidCalledAris's workaround only works for chances 1/n when n is an integer. The only real workaround I know is
ifpickrandom0.0to100.0<chancethen. . .
Yeah, that actually is much better, hehe.
I prefer yours, but opinion respected.

Powered by DjangoBB