Discuss Scratch

De_Eagle
Scratcher
51 posts

How do I make a sprite jump?

O.K, so I tried many different things and nothing sees to work. Does anyone know how to make a sprite jump (not fly)? Please help me!
1234abcdcba4321
Scratcher
1000+ posts

How do I make a sprite jump?

foreveriftouchingcolorcolor of ground?thenifkeyup arrowpressed?thenrepeat10changeyby3repeat5changeyby1wait0.05secselsechangeyby-3

You can make it more advanced later.

Last edited by 1234abcdcba4321 (Feb. 1, 2014 20:01:21)

VyzymZ
Scratcher
29 posts

How do I make a sprite jump?

You can make a variables called velocity & gravity, for better and cleaner movement.

whenclickedsetvelocityto0setgravityto-0.3foreveriftouchingground?thenifkeyspacepressed?thensetvelocitytopickrandom4to7setypositiontoyposition+velocityelsesetvelocitytovelocity+gravitysetypositiontoyposition+velocity
But this script make the game more lag.

Last edited by VyzymZ (Feb. 1, 2014 22:44:51)

De_Eagle
Scratcher
51 posts

How do I make a sprite jump?

Thanks I tried it and it worked . I no longer have to just fly!
minecraftmaster23
Scratcher
6 posts

How do I make a sprite jump?

the red x position wher is it
minecraftmaster23
Scratcher
6 posts

How do I make a sprite jump?

[u
plz i need help on the y position block
minecraftmaster23
Scratcher
6 posts

How do I make a sprite jump?

VyzymZ wrote:

You can make a variables called velocity & gravity, for better and cleaner movement.

whenclickedsetvelocityto0setgravityto-0.3foreveriftouchingground?thenifkeyspacepressed?thensetvelocitytopickrandom4to7setypositiontoyposition+velocityelsesetvelocitytovelocity+gravitysetypositiontoyposition+velocity
But this script make the game more lag.

thaks it works
picopaper
Scratcher
500+ posts

How do I make a sprite jump?

Here's my favorite jumping script:
whenclickedforeverchangeyvby-0.5changeybyyviftouchingground?andkeyup arrowpressed?thensetyvto8iftouchingground?thenchangeybyyv*-1setyvto0
This gives a good parabolic arc while still preventing “sink effect.” However, there is a slight bounce before you land.
Hope this helps!
1234abcdcba4321
Scratcher
1000+ posts

How do I make a sprite jump?

picopaper wrote:

Here's my favorite jumping script:
whenclickedforeverchangeyvby-0.5changeybyyviftouchingground?andkeyup arrowpressed?thensetyvto8changeyby8iftouchingground?thenchangeybyyv*-1setyvto0
This gives a good parabolic arc while still preventing “sink effect.” However, there is a slight bounce before you land.
Hope this helps!

That script doesn't work. I fixed it for you.
picopaper
Scratcher
500+ posts

How do I make a sprite jump?

1234abcdcba4321 wrote:

picopaper wrote:

Here's my favorite jumping script:
whenclickedforeverchangeyvby-0.5changeybyyviftouchingground?andkeyup arrowpressed?thensetyvto8changeyby8iftouchingground?thenchangeybyyv*-1setyvto0
This gives a good parabolic arc while still preventing “sink effect.” However, there is a slight bounce before you land.
Hope this helps!

That script doesn't work. I fixed it for you.
Sorry about that.
FluffyEmie4
Scratcher
3 posts

How do I make a sprite jump?

how do you get the red bocks?

Last edited by FluffyEmie4 (May 19, 2016 20:15:22)

Powered by DjangoBB