Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » Pulsing effect
- AnMSMmaniac
-
Scratcher
36 posts
Pulsing effect
How do I make a pulsing effect? I want just want it to do a simple growing smaller and bigger effect, and can you also tell me what to do to make the pulse faster or slower?
- Catscratcher07
-
Scratcher
1000+ posts
Pulsing effect
repeat (...)If you want to change the rate mid-project, make the repeat count and/or size change a variable.
change size by (...)
end
repeat (...)//same number
change size by (...)//negative of the first change size by.
end
- TutoeTurtle
-
Scratcher
100+ posts
Pulsing effect
adding to what @Catscratcher07 said, you can also do
forever
set size to ((([sin v] of ((timer) * (10))) * (5)) + (100)) %
end
- AnMSMmaniac
-
Scratcher
36 posts
Pulsing effect
Thanks! However, I want to make it go smoothly, not just switching between sizes. I want it to shrink size and grow larger with an animation.
Last edited by AnMSMmaniac (Sept. 16, 2024 22:03:14)
- yadayadayadagoodbye
-
Scratcher
1000+ posts
Pulsing effect
Thanks! However, I want to make it go smoothly, not just switching between sizes. I want it to shrink size and grow larger with an animation.Thats quite literally what that does. In Scratch, nothing is truly continuos. What looks like a smooth animation is always just a bunch of very fast, discrete change in costume, size, or position.
- not_electric_ajax
-
Scratcher
98 posts
Pulsing effect
I made this simple pulsing animation code, kinda looks like a beating heart.
when green flag clicked
forever
set size to (145) %
repeat (15)
change size by (-3)
end
end
- mafrtpoll
-
Scratcher
100+ posts
Pulsing effect
Create a sprite that is hidden and put this code in:
Add this into original sprite:
when green flag clicked
point in direction (45)
forever
turn cw (15) degrees //The larger the number the greater the rate.
end
Add this into original sprite:
when green flag clicked
set [fisheye v] effect to (0)
forever
change [fisheye v] effect by (([sin v] of ([Direction v] of [Second sprite v]))*(35)) //The larger the number the greater the intensity of the effect.
end
- Discussion Forums
- » Help with Scripts
-
» Pulsing effect