Discuss Scratch

Toodchop
Scratcher
100+ posts

"Percentage Between" Operators Block

Bump.
pippy2011eight
Scratcher
100+ posts

"Percentage Between" Operators Block

here's a use for it:
set [my variable] to ((50)% between (1) and (10)::operators reporter)

Last edited by pippy2011eight (Sept. 11, 2025 01:49:27)

ispretty
Scratcher
500+ posts

"Percentage Between" Operators Block

pippy2011eight wrote:

here's a use for it:
set [my variable] to (pick random beetween (1) and (10))
you can already do that in normal scratch
pippy2011eight
Scratcher
100+ posts

"Percentage Between" Operators Block

ispretty wrote:

It would be a great tool for anyone working with animations, game mechanics, or even math lessons. Let me know what you think!

pippy2011eight wrote:

here's a use for it:
set [my variable] to ((50)% between (1) and (10)::operators reporter)
you can already do that in normal scratch
how?

Last edited by pippy2011eight (Sept. 11, 2025 01:49:05)

mtaka4
Scratcher
100+ posts

"Percentage Between" Operators Block

Toodchop wrote:

-snip for 1 million bumps-
i think you should snip the quotes. king of the page!

Last edited by mtaka4 (Sept. 11, 2025 01:46:59)

pippy2011eight
Scratcher
100+ posts

"Percentage Between" Operators Block


ispretty wrote:

It would be a great tool for anyone working with animations, game mechanics, or even math lessons. Let me know what you think!

pippy2011eight wrote:

here's a use for it:
set [my variable] to ((50)% between (1) and (10)::operators reporter)
you can already do that in normal scratch
how?

Last edited by pippy2011eight (Sept. 11, 2025 01:48:52)

Toodchop
Scratcher
100+ posts

"Percentage Between" Operators Block

Bump.
Toodchop
Scratcher
100+ posts

"Percentage Between" Operators Block

Bump.
Toodchop
Scratcher
100+ posts

"Percentage Between" Operators Block

Bump.
pippy2011eight
Scratcher
100+ posts

"Percentage Between" Operators Block

Toodchop wrote:

Bump.
hey, can you please stop saying bump, it's taking up the whole topic, and topics can only handle 500-somthing posts.
Bitebite12
Scratcher
1000+ posts

"Percentage Between" Operators Block

pippy2011eight wrote:

Toodchop wrote:

Bump.
hey, can you please stop saying bump, it's taking up the whole topic, and topics can only handle 500-somthing posts.
They are bumping their post, and topics used to only be able to handle 500 pages but now it is much higher.
TutoeTurtle
Scratcher
100+ posts

"Percentage Between" Operators Block

Toodchop wrote:

Za-Chary wrote:

Just curious, what are some practical uses for this block? In particular, you mention animations and game mechanics, but what specifically can this block be used for in those instances?
Great question! The “Percentage Between” block can be super useful in different scenarios, especially for game mechanics. Here's how:


1. Progress Bars:

You can use the block to calculate progress, like showing how far along the player is in a level or task. For example, if the player has scored 500 out of 1000 points, you can use the block to find 50%, and display that as progress on a bar.


2. Randomized Object Positioning:

Let’s say you want to spawn enemies between two points, like x=100 and x=300. The “Percentage Between” block can calculate random positions between those values, adding variety to the gameplay.


3. Game Mechanics (e.g., Score or Level Progression):

If you want to show how far the player is through a level or task based on a score, you can use the “Percentage Between” block to find out how far they’ve come. For example, with a score of 500 and a maximum score of 1000, the block can help you visualize 50% progress.
There are very easy workarounds for this:

1. For the progress bars, it seems you're starting at zero so really all you need to do is (value) / (maximum) to find the fraction.

2. For the randomized object positioning, just do (pick random number (100) (300)).

3. For the game mechanics, it sounds like this is the exact same argument as #1. So the answer is the same, divide value by maximum to get the fraction.
pippy2011eight
Scratcher
100+ posts

"Percentage Between" Operators Block

Bitebite12 wrote:

pippy2011eight wrote:

Toodchop wrote:

Bump.
hey, can you please stop saying bump, it's taking up the whole topic, and topics can only handle 500-somthing posts.
They are bumping their post, and topics used to only be able to handle 500 pages but now it is much higher.
oh, (I know what bumping is) I thought it was still 500
Toodchop
Scratcher
100+ posts

"Percentage Between" Operators Block

pippy2011eight wrote:

Bitebite12 wrote:

pippy2011eight wrote:

Toodchop wrote:

Bump.
hey, can you please stop saying bump, it's taking up the whole topic, and topics can only handle 500-somthing posts.
They are bumping their post, and topics used to only be able to handle 500 pages but now it is much higher.
oh, (I know what bumping is) I thought it was still 500
Yeah, “bumping” is useful, not off-topic spam.
Toodchop
Scratcher
100+ posts

"Percentage Between" Operators Block

Bump.
pippy2011eight
Scratcher
100+ posts

"Percentage Between" Operators Block

Toodchop wrote:

pippy2011eight wrote:

Bitebite12 wrote:

pippy2011eight wrote:

Toodchop wrote:

Bump.
hey, can you please stop saying bump, it's taking up the whole topic, and topics can only handle 500-somthing posts.
They are bumping their post, and topics used to only be able to handle 500 pages but now it is much higher.
oh, (I know what bumping is) I thought it was still 500
Yeah, “bumping” is useful, not off-topic spam.
I know, I just thought it was going to fill up the topic
Toodchop
Scratcher
100+ posts

"Percentage Between" Operators Block

TutoeTurtle wrote:

Toodchop wrote:

Za-Chary wrote:

Just curious, what are some practical uses for this block? In particular, you mention animations and game mechanics, but what specifically can this block be used for in those instances?
Great question! The “Percentage Between” block can be super useful in different scenarios, especially for game mechanics. Here's how:


1. Progress Bars:

You can use the block to calculate progress, like showing how far along the player is in a level or task. For example, if the player has scored 500 out of 1000 points, you can use the block to find 50%, and display that as progress on a bar.


2. Randomized Object Positioning:

Let’s say you want to spawn enemies between two points, like x=100 and x=300. The “Percentage Between” block can calculate random positions between those values, adding variety to the gameplay.


3. Game Mechanics (e.g., Score or Level Progression):

If you want to show how far the player is through a level or task based on a score, you can use the “Percentage Between” block to find out how far they’ve come. For example, with a score of 500 and a maximum score of 1000, the block can help you visualize 50% progress.
There are very easy workarounds for this:

1. For the progress bars, it seems you're starting at zero so really all you need to do is (value) / (maximum) to find the fraction.

2. For the randomized object positioning, just do (pick random number (100) (300)).

3. For the game mechanics, it sounds like this is the exact same argument as #1. So the answer is the same, divide value by maximum to get the fraction.
But for 2, I think it was supposed to meant that the block can be used to find a value between 100 and 300, not return a random number between those, those were helped by ChatGPT.

Last edited by Toodchop (Sept. 14, 2025 13:06:05)

cheddargirl
Scratch Team
1000+ posts

"Percentage Between" Operators Block

I ended up having to remove the bump chain posts because it made reading through the topic difficult, please be constructive when posting and don't make large quote chains. Do also be mindful that repetitive bump posts can also make it difficult for the Scratch Team to read through suggestions, so use bumps sparingly.
Toodchop
Scratcher
100+ posts

"Percentage Between" Operators Block

cheddargirl wrote:

I ended up having to remove the bump chain posts because it made reading through the topic difficult, please be constructive when posting and don't make large quote chains. Do also be mindful that repetitive bump posts can also make it difficult for the Scratch Team to read through suggestions, so use bumps sparingly.
Thank you for the feedback! I apologize for the bump chain posts and will be more mindful in the future. I promise to avoid doing that again and will ensure my posts are more constructive from now on.

Bump.

Last edited by Toodchop (Sept. 15, 2025 09:35:30)

Toodchop
Scratcher
100+ posts

"Percentage Between" Operators Block

Bump.

Powered by DjangoBB