Discuss Scratch

mangagirl2004
Scratcher
77 posts

How do I make a character jump?!

Can someone tell me how to make a character jump, because I have a project due on April 22nd. HELP ME!!!
Talk_To_Them
Scratcher
100+ posts

How do I make a character jump?!

If you want to make it jump regularly, then do this: This should help you, let me know if you need more help:)

when green flag clicked
forever
if <key [up arrow v] pressed?> then
change y by (50) // This makes it go up ^
wait (0.05) secs
change y by (-50) // This is to make your sprite fall down
end

end

But if you want your sprite to jump smoothly, like without lag, you'll need this:

You will need to add THIS variable in:
(Gravity)


when [up arrow v] key pressed
set [Gravity v] to [10 ]
change y by (5)
repeat until <touching color ("Whatever color you want to make the sprite land on") ?>
change y by (Gravity) // This is to make you fall back down
change [Gravity v] by (-1) // Same with this <
end
change y by (5)
inbestigators123
Scratcher
3 posts

How do I make a character jump?!

but why did u make a variable called ‘whatever colour you want the sprite land on’
-Accio-
Scratcher
1000+ posts

How do I make a character jump?!

inbestigators123 wrote:

but why did u make a variable called ‘whatever colour you want the sprite land on’
They weren't actually indicating that you should put a variable there. They basically are saying that you can select whichever colour you want for that part. For example, if the floor is black, then you should put black where the variable is.

Also, in the future, please don't post on old, resolved topics. Please create your own topic for questions that you have.

Powered by DjangoBB