I've been needing a way to make gravity! PLease help!
I need a really simple way if that's possible because i'm sort of new to scratch.
Offline
Try this
[scratchblocks]
when gf clicked
set [y velocity] to (0)
forever
if <(key [up arrow] pressed) and (touching color [])>
set [y velocity] to (10)
end
change y by (y velocity)
if <(touching color [])>
set (y velocity) to (1)
else
change (y velocity) by (-0.5)
end
end
Offline
dankill51 wrote:
Try this
when gf clicked set [y velocit v] to (0) forever if <(key [up arrow v] pressed?) and (touching color [floor]?)> set [y velocity v] to (10) end change y by (y velocity) if (touching color [floor]?) set [y velocity v] to (0) else change [y velocity v] by (-0.5) end
Fixed and edited.
Last edited by ErnieParke (2012-09-29 17:19:33)
Offline
dankill51 wrote:
Oh thanks for fixing that lol
Your welcome. We all make mistakes once in awhile.
Offline