Parkour | A platformer
@Stage\n\n@Player\n\nwhen flag clicked\nset size to (80) %\nshow\nswitch costume to (default  v)\nset [gravity v] to [-1.5]\nset [jump force v] to [15]\nset [acceleration v] to [2]\nset [resistance v] to [0.8]\nReset and Begin Level\n\ndefine Move - in steps (steps)\nchange [falling v] by (1)\nrepeat (steps)\n    set [last value v] to (x position)\n    change x by ((speed x) / (steps))\n    Check Touching Solid\n    if <(touching) > [0]> then\n        set x to (last value)\n        set [speed x v] to [0]\n    end\n    set [last value v] to (y position)\n    change y by ((speed y) / (steps))\n    Check Touching Solid\n    if <(touching) > [0]> then\n        set y to (last value)\n        if <(speed y) < [0]> then\n            set [falling v] to [0]\n        end\n        set [speed y v] to [0]\n    end\nend\n\ndefine Check Touching Solid\nif <touching (levels v)?> then\n    set [touching v] to [1]\nelse\n    set [touching v] to [0]\nend\n\nwhen I receive [tick - player v]\nControls - Up and Down\nControls - Left and Right\nMove - in steps (([abs v] of (speed x) ) + ([abs v] of (speed y) ))\n\ndefine Controls - Up and Down\nif <<<key (up arrow v) pressed?> or <key (w v) pressed?>> or <<mouse down?> and <((mouse y) - (y position)) > [50]>>> then\n    if <(falling) < [3]> then\n        set [speed y v] to (JUMP FORCE)\n    end\nend\nchange [speed y v] by (GRAVITY)\n\ndefine Controls - Left and Right\nif <<<key (left arrow v) pressed?> or <key (a v) pressed?>> or <<mouse down?> and <(mouse x) < (x position)>>> then\n    change [speed x v] by ((0) - (ACCELERATION))\nend\nif <<<key (right arrow v) pressed?> or <key (d v) pressed?>> or <<mouse down?> and <(mouse x) > (x position)>>> then\n    change [speed x v] by (ACCELERATION)\nend\nset [speed x v] to ((speed x) * (RESISTANCE))\n\ndefine Reset and Begin Level\nset [scene # v] to [1]\nset [speed x v] to [0]\nset [speed y v] to [0]\nset [falling v] to [99]\ngo to x: (-100) y: (-50)\nbroadcast (Change Seen v)\nbroadcast (Game Loop v)\n\nwhen I receive [game loop v]\nforever\n    broadcast (Tick - Player v)\n    broadcast (Tick - Last v)\nend\n\nwhen I receive [tick - last v]\nif <(x position) > [235]> then\n    Begin Scene # ((SCENE #) + (1)) go to x: [-235]\nend\n\ndefine Begin Scene # (scene #) go to x: (x)\nset [scene # v] to (scene #)\nset x to (x)\nbroadcast (Change Seen v)\nstop [other scripts in sprite v]\nwait (0) seconds\nFix collision in Direction [0]\nbroadcast (Game Loop v)\n\ndefine Fix collision in Direction (dir)\nset [temp v] to (direction)\nset [distance v] to [1]\npoint in direction (dir)\nrepeat (512)\n    Check Touching Solid\n    if <(touching) < [1]> then\n        point in direction (temp)\n        stop [this script v]\n    end\n    move (distance) steps\n    turn right (180) degrees\n    change [distance v] by (1)\nend\n\nwhen [r v] key pressed\nReset and Begin Level\n\nwhen [right arrow v] key pressed\nif <<key (right arrow v) pressed?> or <key (d v) pressed?>> then\n    switch costume to (right v)\nend\nwait until <not <<key (right arrow v) pressed?> or <key (d v) pressed?>>>\nswitch costume to (default  v)\n\nwhen [d v] key pressed\nif <<key (right arrow v) pressed?> or <key (d v) pressed?>> then\n    switch costume to (right v)\nend\nwait until <not <<key (right arrow v) pressed?> or <key (space v) pressed?>>>\nswitch costume to (default  v)\n\nwhen [up arrow v] key pressed\nif <<key (up arrow v) pressed?> or <key (w v) pressed?>> then\n    switch costume to (up v)\nend\nwait until <not <<key (up arrow v) pressed?> or <key (w v) pressed?>>>\nswitch costume to (default  v)\n\nwhen [w v] key pressed\nif <<key (up arrow v) pressed?> or <key (w v) pressed?>> then\n    switch costume to (up v)\nend\nwait until <not <<key (up arrow v) pressed?> or <key (w v) pressed?>>>\nswitch costume to (default  v)\n\nwhen [left arrow v] key pressed\nif <<key (left arrow v) pressed?> or <key (a v) pressed?>> then\n    switch costume to (left v)\nend\nwait until <not <<key (left arrow v) pressed?> or <key (a v) pressed?>>>\nswitch costume to (default  v)\n\nwhen [a v] key pressed\nif <<key (left arrow v) pressed?> or <key (a v) pressed?>> then\n    switch costume to (left v)\nend\nwait until <not <<key (left arrow v) pressed?> or <key (a v) pressed?>>>\nswitch costume to (default  v)\n\nwhen [down arrow v] key pressed\nif <<key (down arrow v) pressed?> or <key (s v) pressed?>> then\n    switch costume to (down v)\nend\nwait until <not <<key (down arrow v) pressed?> or <key (s v) pressed?>>>\nswitch costume to (default  v)\n\nwhen [down arrow v] key pressed\nif <<key (down arrow v) pressed?> or <key (s v) pressed?>> then\n    switch costume to (down v)\nend\nwait until <not <<key (down arrow v) pressed?> or <key (s v) pressed?>>>\nswitch costume to (default  v)\n\n@Levels\n\nwhen flag clicked\nshow\ngo to x: (50) y: (5)\ngo to [back v] layer\n\nwhen I receive [change seen v]\nswitch costume to (join [Scene] (SCENE #))\n\n@Thumbnail\n\nwhen flag clicked\ngo to [back v] layer\nhide\n\n@Blank\n\n@Blank2\n\n
Use arrow keys or WASD to move...\nWorking on making it mobile-friendly...\nParkour up next level\nTook me 8 hours to make. Hope you like it\nThere are Fifteen levels...\nAll levels are possible (if you try).\nThank you for viewing\n