Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » Height Limits
- 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] > thenand 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.
end
Last edited by deck26 (Sept. 21, 2021 15:24:13)
- tyranuscrafter
- Scratcher
25 posts
Height Limits
Thanks!!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)
I make cool games.
- tyranuscrafter
- Scratcher
25 posts
Height Limits
Thank you very much!! So you have a script that increases size - just add an if blockif <(size) < [yourlimit] > thenand 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.
end
I make cool games.
- Discussion Forums
- » Help with Scripts
- » Height Limits