Discuss Scratch

tyranuscrafter
Scratcher
25 posts

Height Limits

Im working in a clicker game but idk how to do height limits for the clicking thing, when you spam click so many times the size becomes bigger than the screen, but i wanna put it a limit, so how can i do this??

I make cool games.
Thingied
Scratcher
1000+ posts

Height Limits

when green flag clicked
forever
if <(size)>(size limit :: grey)> then // (gray blocks are placeholders) If it's over the limit, set the size to the limit
set size to (size limit :: grey)
deck26
Scratcher
1000+ posts

Height Limits

So you have a script that increases size - just add an if block

if <(size) < [yourlimit] > then

end
and only increase the size when below a certain value. No need for a separate forver loop to monitor this, just check where you would be increasing size.

Last edited by deck26 (Sept. 21, 2021 15:24:13)

tyranuscrafter
Scratcher
25 posts

Height Limits

Thingied wrote:

when green flag clicked
forever
if <(size)>(size limit :: grey)> then // (gray blocks are placeholders) If it's over the limit, set the size to the limit
set size to (size limit :: grey)
Thanks!!

I make cool games.
tyranuscrafter
Scratcher
25 posts

Height Limits

deck26 wrote:

So you have a script that increases size - just add an if block

if <(size) < [yourlimit] > then

end
and only increase the size when below a certain value. No need for a separate forver loop to monitor this, just check where you would be increasing size.
Thank you very much!!

I make cool games.

Powered by DjangoBB