Discuss Scratch
- Discussion Forums
 - » Suggestions
 - » "Percentage Between" Operators Block
        
         
- 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
here's a use for it:you can already do that in normal scratchset [my variable] to (pick random beetween (1) and (10))
- pippy2011eight
 - 
                            
						
						
                            Scratcher
                        
						
						 
100+ posts
"Percentage Between" Operators Block
It would be a great tool for anyone working with animations, game mechanics, or even math lessons. Let me know what you think!
here's a use for it:you can already do that in normal scratchset [my variable] to ((50)% between (1) and (10)::operators reporter)
how?
Last edited by pippy2011eight (Sept. 11, 2025 01:49:05)
- mtaka4
 - 
                            
						
						
                            Scratcher
                        
						
						 
100+ posts
"Percentage Between" Operators Block
-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
It would be a great tool for anyone working with animations, game mechanics, or even math lessons. Let me know what you think!
here's a use for it:you can already do that in normal scratchset [my variable] to ((50)% between (1) and (10)::operators reporter)
how?
Last edited by pippy2011eight (Sept. 11, 2025 01:48:52)
- pippy2011eight
 - 
                            
						
						
                            Scratcher
                        
						
						 
100+ posts
"Percentage Between" Operators Block
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
They are bumping their post, and topics used to only be able to handle 500 pages but now it is much higher.Bump.hey, can you please stop saying bump, it's taking up the whole topic, and topics can only handle 500-somthing posts.
- TutoeTurtle
 - 
                            
						
						
                            Scratcher
                        
						
						 
100+ posts
"Percentage Between" Operators Block
There are very easy workarounds for this: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.
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
oh, (I know what bumping is) I thought it was still 500They are bumping their post, and topics used to only be able to handle 500 pages but now it is much higher.Bump.hey, can you please stop saying bump, it's taking up the whole topic, and topics can only handle 500-somthing posts.
- Toodchop
 - 
                            
						
						
                            Scratcher
                        
						
						 
100+ posts
"Percentage Between" Operators Block
Yeah, “bumping” is useful, not off-topic spam.oh, (I know what bumping is) I thought it was still 500They are bumping their post, and topics used to only be able to handle 500 pages but now it is much higher.Bump.hey, can you please stop saying bump, it's taking up the whole topic, and topics can only handle 500-somthing posts.
- pippy2011eight
 - 
                            
						
						
                            Scratcher
                        
						
						 
100+ posts
"Percentage Between" Operators Block
I know, I just thought it was going to fill up the topicYeah, “bumping” is useful, not off-topic spam.oh, (I know what bumping is) I thought it was still 500They are bumping their post, and topics used to only be able to handle 500 pages but now it is much higher.Bump.hey, can you please stop saying bump, it's taking up the whole topic, and topics can only handle 500-somthing posts.
- Toodchop
 - 
                            
						
						
                            Scratcher
                        
						
						 
100+ posts
"Percentage Between" Operators Block
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.There are very easy workarounds for this: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.
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.
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
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)
- Discussion Forums
 - » Suggestions
 - 
            » "Percentage Between" Operators Block 
         
            





