Try this:
when gf clicked forever if <<key [up-arrow v] pressed?> and <touching [ground v]?>> set [y-velocity v] to (10) // or any other positive num. you want end if <not<touching [ground v]?>> change [y-velocity v] by (-0.4) // or any other negative num. you want end if <key [right-arrow v] pressed?> change [x-velocity v] by (0.2) // top comment end if <key [left-arrow v] pressed?> change [x-velocity v] by (-0.2) // second-to-top comment end set [x-velocity v] to ((x-velocity) * (0.9)) set [y-velocity v] to ((y-velocity) * (0.96)) change x by (x-velocity) change y by (y-velocity) endHope this helps!
Last edited by powerpoint56 (2012-08-22 20:26:00)
Offline
powerpoint56 wrote:
Try this:
when gf clicked forever if <<key [up-arrow v] pressed?> and <touching [ground v]?>> set [y-velocity v] to (10) // or any other positive num. you want end if <not<touching [ground v]?>> change [y-velocity v] by (-0.4) // or any other negative num. you want end if <key [right-arrow v] pressed?> change [x-velocity v] by (0.2) // top comment end if <key [left-arrow v] pressed?> change [x-velocity v] by (-0.2) // second-to-top comment end set [x-velocity v] to ((x-velocity) * (0.9)) set [y-velocity v] to ((y-velocity) * (0.96)) change x by (x-velocity) change y by (y-velocity)Hope this helps!
(Check out this wiki article; it's very helpful)
Added/changed a few things.
Offline
ErnieParke wrote:
powerpoint56 wrote:
Try this:
when gf clicked forever if <<key [up-arrow v] pressed?> and <touching [ground v]?>> set [y-velocity v] to (10) // or any other positive num. you want end if <not<touching [ground v]?>> change [y-velocity v] by (-0.4) // or any other negative num. you want end if <key [right-arrow v] pressed?> change [x-velocity v] by (0.2) // top comment end if <key [left-arrow v] pressed?> change [x-velocity v] by (-0.2) // second-to-top comment end set [x-velocity v] to ((x-velocity) * (0.9)) set [y-velocity v] to ((y-velocity) * (0.96)) change x by (x-velocity) change y by (y-velocity)Hope this helps!
(Check out this wiki article; it's very helpful)Added/changed a few things.
Thanks!
Offline