Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » Zooming in a sprite
- plantskym2
-
Scratcher
500+ posts
Zooming in a sprite
So I was just working on my animation, and the was working making the sprite zoom in. I realized that the sprite reached the max size, which was 143, because of the costume size. Is there a way to bypass this? I know that you can use a blank sprite and set size to really big then change the costume, but mine has to zoom in. Could anyone help? I was using
repeat (10)
change size by (20)
end
- Awes0meness55
-
Scratcher
0 posts
Zooming in a sprite
Just set the costume to a blank one, set the size, and then change the costume
- plantskym2
-
Scratcher
500+ posts
Zooming in a sprite
Just set the costume to a blank one, set the size, and then change the costumeBut I need to zoom in, not just make the sprite size bigger.
- TheNoisyNoisy
-
Scratcher
100+ posts
Zooming in a sprite
zooming in is making it bigger lolJust set the costume to a blank one, set the size, and then change the costumeBut I need to zoom in, not just make the sprite size bigger.
- c0der0928
-
Scratcher
100+ posts
Zooming in a sprite
just do this
repeat (10)
switch costume to [nothing v]
change size by (20)
switch costume to [original v]
end
- MrKingofScratch
-
Scratcher
100+ posts
Zooming in a sprite
If you put it in a custom block set to “run without screen refresh” you can hide the frames where the costume switched (or rather the frame won't be drawn until it's switched back)
define increase size by (amount)
//run without screen refresh
set [previousCostume v] to (costume #)//var is for this sprite only also you can use costume name if you have costume names that are numbers
switch costume to [small v]//a small costume
change size by (amount)
switch costume to (previousCostume)
repeat (40)
increase size by (2)
end
Last edited by MrKingofScratch (June 11, 2024 03:19:45)
- plantskym2
-
Scratcher
500+ posts
Zooming in a sprite
I mean I want a smooth zoom in where they can actually see it being zoomed.zooming in is making it bigger lolJust set the costume to a blank one, set the size, and then change the costumeBut I need to zoom in, not just make the sprite size bigger.
just do thisdoesn't workrepeat (10)
switch costume to [nothing v]
change size by (20)
switch costume to [original v]
end
If you put it in a custom block set to “run without screen refresh” you can hide the frames where the costume switched (or rather the frame won't be drawn until it's switched back)Thank you, I will try that!define increase size by (amount)
//run without screen refresh
set [previousCostume v] to (costume #)//var is for this sprite only also you can use costume name if you have costume names that are numbers
switch costume to [small v]//a small costume
change size by (amount)
switch costume to (previousCostume)
repeat (40)
increase size by (2)
end
- Discussion Forums
- » Help with Scripts
-
» Zooming in a sprite