Discuss Scratch

gtar1
Scratcher
100+ posts

Help With Jumping

So, I have the same script for the circle as in this project, https://scratch.mit.edu/projects/203019554/ , but I want to make the player jump when the space bar is pressed.

If they say the sky's the limit, then why are there footprints on the moon?

I hope this helps! If you need any further, clarification, just ask!
cbletson
Scratcher
19 posts

Help With Jumping

do
when [ space] key pressed
repeat (10)
change y by (2)

end
repeat (10)
change y by (-2)
end
cbletson
Scratcher
19 posts

Help With Jumping

cbletson wrote:

do
when [ space] key pressed
repeat (10)
change y by (2)

end
repeat (10)
change y by (-2)
end
you dont have to use 10 and 2 but make sure how ever many you go up u go down the same amount
gtar1
Scratcher
100+ posts

Help With Jumping

cbletson wrote:

do
when [ space] key pressed
repeat (10)
change y by (2)

end
repeat (10)
change y by (-2)
end
I would like it to be a bit smoother, like in a platformer

If they say the sky's the limit, then why are there footprints on the moon?

I hope this helps! If you need any further, clarification, just ask!
Mittensbrother
Scratcher
100+ posts

Help With Jumping

More examples of jump scripts than you can shake a stick at here on the Wiki:

https://wiki.scratch.mit.edu/wiki/Jumping
ParadoxScratching
Scratcher
100+ posts

Help With Jumping

This should help a lot

https://scratch.mit.edu/projects/67727504/

Did I help? If so, consider following me!

Forums not helping out your scripts? Want me to answer your questions in particular? Put your projects you have a question of in this studio! I would try my best to answer you. I care more about understanding the problem than knowing how to fix the problem.
https://scratch.mit.edu/studios/4636701/

Powered by DjangoBB

Standard | Mobile