Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » Speed up
- Vilwen
-
Scratcher
17 posts
Speed up
How can i speed up a ball when i gets to 10 points and then more in 20 and more in 30 and more in 40 and all stop on 50 because it is gona be a text on the screen and it seys Victory
- Hamish752
-
Scratcher
1000+ posts
Speed up
This isn't exactly what you asked for, but I think you'll find this better, since it speeds up gradually, rather then just increasing every so often. You can adjust how quickly you want to accelerate
when green flag clickedTo sense when you reach 50 do:
reset timer
forever
set [Speed v] to ((timer) * (Put however much speed you want to increase per second here))
end
when green flag clicked
forever
if <(Speed) > [49]> then
say [Victory!]
end
end
- daemys
-
Scratcher
100+ posts
Speed up
How i do that then?
It depends on how you do the ball motion. Here is a solution
forever
move (speed) steps
if on edge, bounce
if <((score) mod (10))=(0)>
change [speed v] by (1)
end
end
- coke11
-
Scratcher
1000+ posts
Speed up
Try this:
Let me know if this helps!
when green flag clicked
if <(score) = [1-9]> then
forever
wait (2) secs
turn ccw (pick random (20) to (45) degrees
move (10) steps
if <[score] = [10]>> then
stop [this script v]
end
Let me know if this helps!
Last edited by coke11 (Sept. 12, 2015 19:43:11)
- daemys
-
Scratcher
100+ posts
Speed up
Try this:when green flag clicked
if <(score) = [1-9]> then
forever
wait (2) secs
turn ccw (pick random (20) to (45) degrees
move (10) steps
if <[score] = [10]>> then
stop [this script v]
end
Let me know if this helps!
Could you please post a correct example?
- coke11
-
Scratcher
1000+ posts
Speed up
Try this:when green flag clicked
if <(score) = [1-9]> then
forever
wait (2) secs
turn ccw (pick random (20) to (45) degrees
move (10) steps
if <[score] = [10]>> then
stop [this script v]
end
Let me know if this helps!
Could you please post a correct example?
What do you mean? This is correct.
- daemys
-
Scratcher
100+ posts
Speed up
What do you mean? This is correct.Did you ever try to run this? This is completely incorrect and will never help to anyone.
What is
if score=1-9 ? Comparison with a string?
Why should we wait 2 seconds in the start of forever loop?
Why should we stop the script at the end of the first iteration of forever loop?
- coke11
-
Scratcher
1000+ posts
Speed up
What do you mean? This is correct.Did you ever try to run this? This is completely incorrect and will never help to anyone.
What is
if score=1-9 ? Comparison with a string?
Why should we wait 2 seconds in the start of forever loop?
Why should we stop the script at the end of the first iteration of forever loop?
The reason it is sorta messed up is because I am programming it in the forums.
- ZozaTech
-
Scratcher
500+ posts
Speed up
But how is something 1-9? And what is turn ccw.What do you mean? This is correct.Did you ever try to run this? This is completely incorrect and will never help to anyone.
What is
if score=1-9 ? Comparison with a string?
Why should we wait 2 seconds in the start of forever loop?
Why should we stop the script at the end of the first iteration of forever loop?
The reason it is sorta messed up is because I am programming it in the forums.

- coke11
-
Scratcher
1000+ posts
Speed up
But how is something 1-9? And what is turn ccw.What do you mean? This is correct.Did you ever try to run this? This is completely incorrect and will never help to anyone.
What is
if score=1-9 ? Comparison with a string?
Why should we wait 2 seconds in the start of forever loop?
Why should we stop the script at the end of the first iteration of forever loop?
The reason it is sorta messed up is because I am programming it in the forums.
I just use the turn left/right and and it says ccw. You try. And for 1-9 i was just trying to show what you would have to do 9 times. Or like a custom block with a number input.
- ZozaTech
-
Scratcher
500+ posts
Speed up
The script will not work. How can you have a forever loop inside an if loop.But how is something 1-9? And what is turn ccw.What do you mean? This is correct.Did you ever try to run this? This is completely incorrect and will never help to anyone.
What is
if score=1-9 ? Comparison with a string?
Why should we wait 2 seconds in the start of forever loop?
Why should we stop the script at the end of the first iteration of forever loop?
The reason it is sorta messed up is because I am programming it in the forums.
I just use the turn left/right and and it says ccw. You try. And for 1-9 i was just trying to show what you would have to do 9 times. Or like a custom block with a number input.

Last edited by ZozaTech (Sept. 12, 2015 20:04:06)
- daemys
-
Scratcher
100+ posts
Speed up
The reason it is sorta messed up is because I am programming it in the forums.
Even if you are programming it in the foums. You are trying to help. ‘Sorta messed up’ is not an excuse. Your post must be completely accurate and working. Otherwise the people will never solve their problems.
And still explain please what is the importance of the blocks
wait (2) secsand
stop [this script v]
- Discussion Forums
- » Help with Scripts
-
» Speed up