Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » Smoothing with mouse hover
- Not_Entirely_Sure
-
Scratcher
9 posts
Smoothing with mouse hover
I already know how to make sprites bigger when your mouse is hovering over it, but how do i make it smoothly get bigger instead of just getting big instantly? please and thank you
- Malicondi
-
Scratcher
1000+ posts
Smoothing with mouse hover
I already know how to make sprites bigger when your mouse is hovering over it, but how do i make it smoothly get bigger instead of just getting big instantly? please and thank youtry this

foreverHope this helps!
if <touching (mouse pointer v)?> then
repeat (10)
change size by (3)
end
else
repeat until <(size :: looks) = (100)>
change size by (-3)
end
end
Last edited by Malicondi (Feb. 10, 2024 17:31:02)
- Not_Entirely_Sure
-
Scratcher
9 posts
Smoothing with mouse hover
it gets bigger and smaller smoothly but it reaches the size limit instead of having boundrys
- -TUB-
-
Scratcher
100+ posts
Smoothing with mouse hover
Try this:
forever
if <touching [mouse pointer v]> then
change size by (((120) - (size)) * (0.2))
else
change size by (((100) - (size)) * (0.2))
end
end
- Not_Entirely_Sure
-
Scratcher
9 posts
Smoothing with mouse hover
hope it works, ill try it
Last edited by Not_Entirely_Sure (Feb. 11, 2024 00:24:40)
- Not_Entirely_Sure
-
Scratcher
9 posts
Smoothing with mouse hover
it did work, only problem is it expands from a corner (goes to the top left) instead of expanding from the center
- alebro6DW
-
Scratcher
100+ posts
Smoothing with mouse hover
when ... :: grey :: hat
forever
set size to (distance to [mouse-pointer v]) %
end
- Discussion Forums
- » Help with Scripts
-
» Smoothing with mouse hover