Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » Slowing Down
- joshuaho
-
Scratcher
1000+ posts
Slowing Down
Suppose that I make a sprite that is spinning. But if I wanted it to slow down until it stops, how can I do it, so that it slows down smoothly until it stops spinning?
- adelk01
-
Scratcher
8 posts
Slowing Down
Hello
Take a look to this project. It is for you
http://scratch.mit.edu/projects/11324460/
I divided the path into 3 parts and for each part I changed the time of gliding. In the beginning it is fast and for the last third part it is slow.
Please, let me know if it helps. You can do it also into 4 different steps.
Take a look to this project. It is for you
http://scratch.mit.edu/projects/11324460/
I divided the path into 3 parts and for each part I changed the time of gliding. In the beginning it is fast and for the last third part it is slow.
Please, let me know if it helps. You can do it also into 4 different steps.
- turkey3
-
Scratcher
1000+ posts
Slowing Down
You can make it turn by a variable called degrees, and ech time it turns change the degrees variable by (-.05) until it is < .001, if you know what I mean.
- joshuaho
-
Scratcher
1000+ posts
Slowing Down
Wait… it slows down, stops, but then starts turning again!Suppose that I make a sprite that is spinning. But if I wanted it to slow down until it stops, how can I do it, so that it slows down smoothly until it stops spinning?I made a script here for you in my scripts sandbox at the bottom.
Last edited by joshuaho (July 10, 2013 03:26:34)
- turkey3
-
Scratcher
1000+ posts
Slowing Down
If that happens, then change the = 0 in the script to < 0Wait… it slows down, stops, but then starts turning again!Suppose that I make a sprite that is spinning. But if I wanted it to slow down until it stops, how can I do it, so that it slows down smoothly until it stops spinning?I made a script here for you in my scripts sandbox at the bottom.
- joshuaho
-
Scratcher
1000+ posts
Slowing Down
That did not work. Instead, it started turning the other way, then this way, and that way, then it stopped.If that happens, then change the = 0 in the script to < 0Wait… it slows down, stops, but then starts turning again!Suppose that I make a sprite that is spinning. But if I wanted it to slow down until it stops, how can I do it, so that it slows down smoothly until it stops spinning?I made a script here for you in my scripts sandbox at the bottom.
Last edited by joshuaho (July 11, 2013 04:19:17)
- dracae
-
Scratcher
1000+ posts
Slowing Down
Did you see mine?That did not work. Instead, it started turning the other way, then this way, and that way, then it stopped.If that happens, then change the = 0 in the script to < 0Wait… it slows down, stops, but then starts turning again!Suppose that I make a sprite that is spinning. But if I wanted it to slow down until it stops, how can I do it, so that it slows down smoothly until it stops spinning?I made a script here for you in my scripts sandbox at the bottom.

- joshuaho
-
Scratcher
1000+ posts
Slowing Down
Weird… I used that script… but it did not work.Did you see mine?That did not work. Instead, it started turning the other way, then this way, and that way, then it stopped.If that happens, then change the = 0 in the script to < 0Wait… it slows down, stops, but then starts turning again!Suppose that I make a sprite that is spinning. But if I wanted it to slow down until it stops, how can I do it, so that it slows down smoothly until it stops spinning?I made a script here for you in my scripts sandbox at the bottom.
Last edited by joshuaho (July 11, 2013 18:53:41)
- fleurymarc
-
Scratcher
71 posts
Slowing Down
*sighs* I guess it is time for another little BUMP
This is my project with the slow down script.
I believe that you can fix your specific issue by changing the test from “Spin speed = 0” to “Spin speed < 0”
But it's difficult to test because there are a few other issues with your scripts. I would suggest setting your variables to their starting values in the script that will use them.
(It's also strange that you are rotating the disc by 500 degrees. That's more than one complete spin each time that block gets run. A number like 50 probably makes more sense.
–
Marc.
Last edited by fleurymarc (July 13, 2013 22:48:58)
- fleurymarc
-
Scratcher
71 posts
Slowing Down
I've remixed it with some fixes.
One of the things I changed was making it so that both the ON and OFF buttons are visible at the same time, but this was more just for testing. You should be able to change it back easily.
–
Marc.
One of the things I changed was making it so that both the ON and OFF buttons are visible at the same time, but this was more just for testing. You should be able to change it back easily.
–
Marc.
- joshuaho
-
Scratcher
1000+ posts
Slowing Down
I've remixed it with some fixes.Thx!!
One of the things I changed was making it so that both the ON and OFF buttons are visible at the same time, but this was more just for testing. You should be able to change it back easily.
–
Marc.
- yagerdestroyer
-
Scratcher
1 post
Slowing Down
How do you get a sprite to slow down if your code looks like this???
Follow Link
https://scratch.mit.edu/projects/210004571/#editor
Follow Link
https://scratch.mit.edu/projects/210004571/#editor
- deck26
-
Scratcher
1000+ posts
Slowing Down
How do you get a sprite to slow down if your code looks like this???Please create your own topic rather than necroposting on a 5 year old topic.
Follow Link
https://scratch.mit.edu/projects/210004571/#editor
- Discussion Forums
- » Help with Scripts
-
» Slowing Down









