Discuss Scratch
- Sup2point0
-
Scratcher
32 posts
New Variable Display Type: Progress Bar
Wouldn't it be cool if you could display a variable as a progress bar, rather than a number?
So far to get a good progress bar I've had to make 50 or 100 costumes, which is extremely time consuming.
All you'd have to do is set the maximum value like the slider mode, then Scratch would automatically calculate the fraction and fill up the bar.
So, for example, if you set the max. value to 100, then you set the variable to 50, it would fill up half of the bar!
This would be so useful for many different things:
-Level Progress
-Batteries?
-Timers
-Upgrades (as in xp/xp required)
-Loading Screens
And it also shouldn't be too laggy.
The only con I can think of is that it wouldn't fit in that well with Scratch.
So far to get a good progress bar I've had to make 50 or 100 costumes, which is extremely time consuming.
All you'd have to do is set the maximum value like the slider mode, then Scratch would automatically calculate the fraction and fill up the bar.
So, for example, if you set the max. value to 100, then you set the variable to 50, it would fill up half of the bar!
This would be so useful for many different things:
-Level Progress
-Batteries?
-Timers
-Upgrades (as in xp/xp required)
-Loading Screens
And it also shouldn't be too laggy.
The only con I can think of is that it wouldn't fit in that well with Scratch.
Last edited by Sup2point0 (May 17, 2020 09:59:22)
- -InsanityPlays-
-
Scratcher
1000+ posts
New Variable Display Type: Progress Bar
Wouldn't it be cool if you could display a variable as a progress bar, rather than a number?Okay, so here's my opinion. I think this would be a good idea to add to Scratch, but not in the variables bar. Maybe there could be another block series in the Data section called Bars. Here are some ideas:
So far to get a good progress bar I've had to make 50 or 100 costumes, which is extremely time consuming.
All you'd have to do is set the maximum value like the slider mode, then Scratch would automatically calculate the fraction and fill up the bar.
So, for example, if you set the max. value to 100, then you set the variable to 50, it would fill up half of the bar!
This would be so useful for many different things:
-Level Progress
And it also shouldn't be too laggy.
The only con I can think of is that it wouldn't fit in that well with Scratch.
set [health v] to (100)::#f5428dHope this helped ya! And btw, I dunno if this is a duplicate, the Scratch Team need a better way to search for duplicates.
change [health v] by (-10)::#f5428d
show bar [health v]::#f5428d
hide bar [health v]::#f5428d
when bar [energy v] [< v] (10)::hat #f5428d
when bar [power v] [> v] (10)::hat #f5428d
when bar [health v] [= v] (0)::hat #f5428d
- HighFlyer222
-
Scratcher
100+ posts
New Variable Display Type: Progress Bar
I think this doesn’t have a duplicate, I searched but couldn’t find anything.
I support this idea. It would be really useful for most projects, and yes, making a progress bar with 100 costumes is hard.
Addition to the post above me: a change color block as well.
If strech effect existed right now, we wouldn’t have needed this actually lol
I support this idea. It would be really useful for most projects, and yes, making a progress bar with 100 costumes is hard.
Addition to the post above me: a change color block as well.
If strech effect existed right now, we wouldn’t have needed this actually lol
- kitten769
-
Scratcher
1000+ posts
New Variable Display Type: Progress Bar
No support. You can just use a variable and pen for this.
define Draw Progress Bar (length) (variable) // This script draws it
go to x: (-50) y: (0)
set pen color to [#a00000]
pen down
change x by (length)
go to x: (-50) y: (0)
set pen color to [#b6c0f4]
change x by (variable)
when green flag clicked
forever
erase all :: pen
Draw Progress Bar (length) (variable) :: custom
end
- pavcato
-
Scratcher
1000+ posts
New Variable Display Type: Progress Bar
Semi-Support. This would make it easier to make them, but why does Scratch need them in the first place? Most waiting times are instantaneous.
- Sup2point0
-
Scratcher
32 posts
New Variable Display Type: Progress Bar
No support. You can just use a variable and pen for this.define Draw Progress Bar (length) (variable) // This script draws it
go to x: (-50) y: (0)
set pen color to [#a00000]
pen down
change x by (length)
go to x: (-50) y: (0)
set pen color to [#b6c0f4]
change x by (variable)
when green flag clicked
forever
erase all :: pen
Draw Progress Bar (length) (variable) :: custom
end
Cool script - the only problem I have with pen is, the pen is rounded at the edges, which causes some complications, and it also contributes to the clone limit (which I always struggle with in my games)
- Sup2point0
-
Scratcher
32 posts
New Variable Display Type: Progress Bar
Semi-Support. This would make it easier to make them, but why does Scratch need them in the first place? Most waiting times are instantaneous.
As for the loading screen, it's just a feature which I've seen loads of Scratchers use for some reason.
- --Explosion--
-
Scratcher
1000+ posts
New Variable Display Type: Progress Bar
Support but what would the color be? Also would it show the percentage? Would it change color? How big would it be? Anyways, just a few questions to think about! 

- xXRedTheCoderXx
-
Scratcher
1000+ posts
New Variable Display Type: Progress Bar
No support. You can just use a variable and pen for this.I've always tried to avoid pen in my projects, which is why I never use it when making bars. Why? Because pen is always at the last layer! I hate that!define Draw Progress Bar (length) (variable) // This script draws it
go to x: (-50) y: (0)
set pen color to [#a00000]
pen down
change x by (length)
go to x: (-50) y: (0)
set pen color to [#b6c0f4]
change x by (variable)
when green flag clicked
forever
erase all :: pen
Draw Progress Bar (length) (variable) :: custom
end
So, that work around doesn't work for many projects.
Edit: Forgot to mention that I really like this idea. It should be added!

Last edited by xXRedTheCoderXx (May 17, 2020 16:49:35)
- kitten769
-
Scratcher
1000+ posts
New Variable Display Type: Progress Bar
It is still much easier.No support. You can just use a variable and pen for this.I've always tried to avoid pen in my projects, which is why I never use it when making bars. Why? Because pen is always at the last layer! I hate that!define Draw Progress Bar (length) (variable) // This script draws it
go to x: (-50) y: (0)
set pen color to [#a00000]
pen down
change x by (length)
go to x: (-50) y: (0)
set pen color to [#b6c0f4]
change x by (variable)
when green flag clicked
forever
erase all :: pen
Draw Progress Bar (length) (variable) :: custom
end
So, that work around doesn't work for many projects.
Edit: Forgot to mention that I really like this idea. It should be added!
- xXRedTheCoderXx
-
Scratcher
1000+ posts
New Variable Display Type: Progress Bar
But like I said, it doesn't work for most projects.It is still much easier.No support. You can just use a variable and pen for this.I've always tried to avoid pen in my projects, which is why I never use it when making bars. Why? Because pen is always at the last layer! I hate that!define Draw Progress Bar (length) (variable) // This script draws it
go to x: (-50) y: (0)
set pen color to [#a00000]
pen down
change x by (length)
go to x: (-50) y: (0)
set pen color to [#b6c0f4]
change x by (variable)
when green flag clicked
forever
erase all :: pen
Draw Progress Bar (length) (variable) :: custom
end
So, that work around doesn't work for many projects.
Edit: Forgot to mention that I really like this idea. It should be added!

- IlyaMiheevilia
-
Scratcher
4 posts
New Variable Display Type: Progress Bar
Full support! I think native progressbars will look more fancy than the pen ones.
- oO0sansolo0Oo
-
Scratcher
5 posts
New Variable Display Type: Progress Bar
percentage mased maybe?
No support. You can just use a variable and pen for this.how would you add a cap to the lengthand make the display show a percentage, im trying to make a percentage based exp system ive tried quite a few times on chnging this display ive also checked to see if i had he code right and forme it still doesnt work as you intended itdefine Draw Progress Bar (length) (variable) // This script draws it
go to x: (-50) y: (0)
set pen color to [#a00000]
pen down
change x by (length)
go to x: (-50) y: (0)
set pen color to [#b6c0f4]
change x by (variable)
when green flag clicked
forever
erase all :: pen
Draw Progress Bar (length) (variable) :: custom
end
Last edited by oO0sansolo0Oo (April 16, 2021 13:50:27)
- Sup2point0
-
Scratcher
32 posts
New Variable Display Type: Progress Bar
percentage mased maybe?
how would you add a cap to the lengthand make the display show a percentage, im trying to make a percentage based exp system ive tried quite a few times on chnging this display ive also checked to see if i had he code right and forme it still doesnt work as you intended it
set x to ((x when empty)+(((x when full) - (x when empty))*((current xp)/(xp required))))
should work
- reallysoftuser
-
Scratcher
1000+ posts
New Variable Display Type: Progress Bar
No support. You can just use a variable and pen for this.See my signaturedefine Draw Progress Bar (length) (variable) // This script draws it
go to x: (-50) y: (0)
set pen color to [#a00000]
pen down
change x by (length)
go to x: (-50) y: (0)
set pen color to [#b6c0f4]
change x by (variable)
when green flag clicked
forever
erase all :: pen
Draw Progress Bar (length) (variable) :: custom
end
- Bacteria999
-
Scratcher
1000+ posts
New Variable Display Type: Progress Bar
Support, seems interesting.
- oO0sansolo0Oo
-
Scratcher
5 posts
New Variable Display Type: Progress Bar
ty! ill try it outpercentage mased maybe?
how would you add a cap to the lengthand make the display show a percentage, im trying to make a percentage based exp system ive tried quite a few times on chnging this display ive also checked to see if i had he code right and forme it still doesnt work as you intended itset x to ((x when empty)+(((x when full) - (x when empty))*((current xp)/(xp required))))
should work
- oO0sansolo0Oo
-
Scratcher
5 posts
New Variable Display Type: Progress Bar
lol didnt workpercentage mased maybe?
how would you add a cap to the lengthand make the display show a percentage, im trying to make a percentage based exp system ive tried quite a few times on chnging this display ive also checked to see if i had he code right and forme it still doesnt work as you intended itset x to ((x when empty)+(((x when full) - (x when empty))*((current xp)/(xp required))))
should work
- lm1996
-
Scratcher
1000+ posts
New Variable Display Type: Progress Bar
No support. You can just use a variable and pen for this.Tbh that's extremely complicated.define Draw Progress Bar (length) (variable) // This script draws it
go to x: (-50) y: (0)
set pen color to [#a00000]
pen down
change x by (length)
go to x: (-50) y: (0)
set pen color to [#b6c0f4]
change x by (variable)
when green flag clicked
forever
erase all :: pen
Draw Progress Bar (length) (variable) :: custom
end
- bluedragon8633
-
Scratcher
1000+ posts
New Variable Display Type: Progress Bar
Support! I think it should just be a display type, only you can set the color. It should be an option rather like a slider, but one that the user can't change.












