Platformer Starter
@Stage\n\n@Sprite1\n\ndefine Pull myself out of the ceiling and fall\nif <touching color (#000000)?> then\n    repeat until <not <touching color (#000000)?>>\n        change y by ((-1) * (Gravity))\n    end\nend\nset [y_vel v] to [-.1]\n\nwhen flag clicked\nInitiailize\nforever\n    Do Y Movement\n    Do X Movement\nend\n\ndefine If hovering then JUMP\nchange y by ((-1) * (Gravity))\nif <touching color (#000000)?> then\n    set [y_vel v] to [6]\nend\nchange y by ((1) * (Gravity))\n\nwhen [timer v] > (4)\nforever\n    if <key (right arrow v) pressed?> then\n        point in direction (90)\n        set [x_vel v] to [3]\n    else\n        if <key (left arrow v) pressed?> then\n            point in direction (-90)\n            set [x_vel v] to [-3]\n        end\n    end\n    if <key (up arrow v) pressed?> then\n        If hovering then JUMP\n    end\nend\n\ndefine Do Y Movement\nif <not <touching color (#000000)?>> then\n    change y by ((Y_vel) * (Gravity))\n    if <touching color (#000000)?> then\n        change y by (((Y_vel) * (Gravity)) / (-2))\n        if <(Y_vel) < [0]> then\n            Stop falling and hover\n        else\n            Pull myself out of the ceiling and fall\n        end\n    end\n    if <(Y_vel) > [-5]> then\n        change [y_vel v] by (-0.3)\n    end\nend\n\ndefine Do X Movement\nchange x by (X_vel)\nWrap around the screen\nif <touching color (#000000)?> then\n    Pull myself out of the wall\n    Wrap around the screen\nend\nset [x_vel v] to ((X_vel) * (0.9))\n\ndefine Stop falling and hover\nif <touching color (#000000)?> then\n    repeat until <not <touching color (#000000)?>>\n        change y by ((1) * (Gravity))\n    end\nelse\n    repeat until <touching color (#000000)?>\n        change y by ((-1) * (Gravity))\n    end\n    change y by ((1) * (Gravity))\nend\nset [y_vel v] to [0]\n\ndefine Pull myself out of the wall\nchange x by ((X_vel) * (-1))\nset [x_vel v] to [0]\n\ndefine Wrap around the screen\nif <(x position) > [239]> then\n    set x to (-239)\nend\nif <(x position) < [-239]> then\n    set x to (239)\nend\n\ndefine Initiailize\nshow\nclear graphic effects\nset rotation style [left-right v]\npoint in direction (90)\ngo to x: (-136) y: (11)\nset size to (30) %\nset [x_vel v] to [0]\nset [y_vel v] to [-5]\n\nwhen flag clicked\nset [gravity v] to [1]\nforever\n    wait until <touching color (#a7a8a6)?>\n    wait until <not <touching color (#a7a8a6)?>>\n    set [gravity v] to ((X_vel) / ([abs v] of (X_vel) ))\nend\n\n@Sprite2\n\nwhen flag clicked\nhide\ngo to x: (15) y: (160)\nrepeat (8)\n    create clone of (_myself_ v)\n    wait (1) seconds\n    change x by (30)\nend\n\nwhen I start as a clone\nshow\nrepeat until <color (#000000) is touching (#000000)?>\n    change y by (-10)\nend\nrepeat until <not <color (#000000) is touching (#000000)?>>\n    change y by (1)\nend\n\nwait until <key (space v) pressed?>\n\n
Use arrows