Doublejump script:
(script of the controlling sprite)
when green flag clicked forever if <touching [ ground v ]> set [move y v ] to ( 1) set [jump v ] to ( 1 ) end change y by ( move y) change [ move y v ] by ( -0.5) end when gf clicked forever if <<key[ up arrow v ]pressed?> and < touching [ ground v ]>> set [ move y v ] to ( 10 ) wait until <<not <key [up-arrow v] pressed?>> or < touching [ground v]>> wait until < <key [up-arrow v] pressed?> or < touching [ground v]>> if <key[ up arrow v ]pressed?> if < (jump) = (1) > set [jump v ] to ( 0 ) change [ move y v ] by ( 10 ) end end
Last edited by TM_ (2012-08-12 07:19:04)
Offline