Discuss Scratch

Dfrsea
Scratcher
8 posts

How to make smooth jumps?

_turtle64 wrote:

Dfrsea wrote:

However, here is a script with smooth gravity:
when green flag clicked
forever
if <key [up arrow/space] pressed?> then
set [ gravity] to [0]
repeat until <[gravity] = [whatever jump height you want, I used ten]>
change y by (Gravity)
change [gravity] by (whatever, you want. I used 1, which worked pretty well and was smooth)
end
repeat until <[gravity] = [0]>
change y by (Gravity)
change [gravity] by (the opposite of the first change gravity by, for me it would be -1)
end
end
end
Dont necropost.
How is this necroposting?
CybaWrecker
Scratcher
21 posts

How to make smooth jumps?

ok thanks guys
ill use this some other time
lucleon622525
Scratcher
10 posts

How to make smooth jumps?

when [ space] key pressed
change y by 10
wait (0.5) secs
change y by (-10)

Powered by DjangoBB