Discuss Scratch

helloworld11
New to Scratch
3 posts

How do I switch level when touching paddle a number of times?

Will someone help me figure out how to change the speed of the ball when touches the paddle for a certain amount of times? Here is the link to the project.
http://scratch.mit.edu/projects/12728115/

Thanks

scubajerry
Scratcher
1000+ posts

How do I switch level when touching paddle a number of times?

make a variable HITS
set it to 0

change it my 1 every time you hit the paddle
when it get to your magic number

set costume to or next costume
set counter to 0
helloworld11
New to Scratch
3 posts

How do I switch level when touching paddle a number of times?

Thank You!
helloworld11
New to Scratch
3 posts

How do I switch level when touching paddle a number of times?

I'm confused on what,“change it my 1 every time you hit the paddle
when it get to your magic number” Could you please explain clearer?
turkey3_test
Scratcher
1000+ posts

How do I switch level when touching paddle a number of times?

set [hits v] to [0]
repeat until <(hits) = [3]> //"3" being the amount of times to be hit before the speed changes
wait until <touching [paddle v]>
change [hits v] by (1)
wait until <not <touching [paddle v]?>>
end
change [speed v] by (1)

Powered by DjangoBB