Platformer Engine v1.2 [Mobile-Friendly]
@Stage\n\nwhen flag clicked\nforever\n    play sound [Unlimited v] until done\nend\n\n@Level\n\nwhen I receive [game on v]\ngo to x: (0) y: (0)\nswitch costume to (level v)\nshow\n\nwhen I receive [next level v]\nnext costume\n\n@Spikes\n\nwhen flag clicked\nshow\nswitch costume to (costume1 v)\nforever\n    go to [back v] layer\nend\n\nwhen I receive [next level v]\nnext costume\n\n@Sun\n\nwhen flag clicked\nshow\ngo to x: (36) y: (28)\nforever\n    glide (2) secs to x: (79) y: (0)\n    glide (2) secs to x: (36) y: (28)\nend\n\n@Lava\n\nwhen flag clicked\nswitch costume to (costume1 v)\nshow\n\nwhen I receive [next level v]\nnext costume\n\n@TB\n\nwhen flag clicked\nhide\n\ngo to [front v] layer\n\n@Player\n\ndefine Tick\nset [mobile being used? v] to <<mouse down?> and <<(mouse x) < (x position)> or <<(mouse x) > (x position)> or <(mouse y) > (y position)>>>>\nif <<touching (spikes v)?> or <touching (lava v)?>> then\n    change [deaths v] by (1)\nend\nif <key (r v) pressed?> then\n    go to x: (-207) y: (-79)\nend\nif <key (o v) pressed?> then\n    change [skips v] by (1)\n    change [level v] by (1)\n    wait (0.000000000000000000001) seconds\n    broadcast (Next Level v)\nend\nif <touching (trampoline v)?> then\n    set [yv v] to [21]\nend\nif <touching (lava v)?> then\n    broadcast (Death v)\nend\nif <touching (spikes v)?> then\n    broadcast (Death v)\nend\nif <<(x position) > [150]> or <(x position) = [150]>> then\n    change [level v] by (1)\n    broadcast (Next Level v)\nend\nif <<(y position) = [-220]> or <(y position) < [-220]>> then\n    broadcast (Death v)\nend\nif <not <<(mobile being used?) = [true]> or <<key (right arrow v) pressed?> or <<key (left arrow v) pressed?> or <<key (a v) pressed?> or <key (d v) pressed?>>>>>> then\n    switch costume to (normal v)\nend\nif <<<key (right arrow v) pressed?> or <key (d v) pressed?>> or <<mouse down?> and <(mouse x) > (x position)>>> then\n    switch costume to (normal v)\n    change [xv v] by (1)\nend\nif <<<key (left arrow v) pressed?> or <key (a v) pressed?>> or <<mouse down?> and <(mouse x) < (x position)>>> then\n    switch costume to (left v)\n    change [xv v] by (-1)\nend\nset [xv v] to ((XV) * (0.9))\nchange x by (XV)\nif <touching (level v)?> then\n    change y by (1)\n    if <touching (level v)?> then\n        change y by (1)\n        if <touching (level v)?> then\n            change y by (1)\n            if <touching (level v)?> then\n                change y by (1)\n            end\n        end\n    end\nend\nif <touching (level v)?> then\n    change x by ((XV) * (-1))\n    change y by (-4)\n    if <<key (up arrow v) pressed?> or <<key (w v) pressed?> or <<mouse down?> and <(mouse y) > (y position)>>>> then\n        if <(XV) > [0]> then\n            set [xv v] to [-5]\n        else\n            set [xv v] to [5]\n        end\n        set [yv v] to [15]\n    else\n        set [yv v] to [0]\n    end\nend\nchange [yv v] by (-1)\nchange y by (YV)\nif <touching (level v)?> then\n    change y by ((YV) * (-1))\n    set [yv v] to [0]\nend\nchange y by (-1)\nif <touching (level v)?> then\n    if <<<key (up arrow v) pressed?> or <key (w v) pressed?>> or <<mouse down?> and <(mouse y) > (y position)>>> then\n        set [yv v] to [15]\n    end\nend\nchange y by (1)\n\nforever\n    \n        set [yv v] to [15]\n    end\nend\n\nwhen I receive [game on v]\nswitch backdrop to (blue sky v)\nswitch costume to (normal v)\nshow\ngo to x: (-220) y: (-79)\nset size to (100) %\nset [skips v] to [0]\nset [deaths v] to [0]\nset [level v] to [1]\nset [xv v] to [0]\nset [yv v] to [0]\nforever\n    Tick\nend\n\nwhen I receive [next level v]\ngo to x: (-277) y: (-119)\n\nwhen flag clicked\nbroadcast (Game On v)\n\nwhen I receive [death v]\ngo to x: (-271) y: (-119)\nset [xv v] to [0]\nset [yv v] to [0]\n\nwhen I receive [next level v]\nset [xv v] to [0]\nset [yv v] to [0]\n\n
GAME CONTEST\nhttps://scratch.mit.edu/projects/652703716\nDEFENSE v1.0 https://scratch.mit.edu/projects/639522059\n____________________________________________\n>Welcome to Platformer Engine v1.0! By: @CodeCO2\n_____________________________________________\n>Info:\n>This is my first project =-)\n>This is a very basic platformer engine, which might seem generic to you, but it's NOT a game. I won't be making any generic games =-)\n_____________________________________________\n>Instructions:\n>Left Arrow/A-----Move Left\n>Right Arrow/D--Move Right\n>Up Arrow/W-----Jump\n>R to reset\n>O to skip a level\n>Mobile-Friendly!\n_____________________________________________\n>Please leave a love, fave, and follow!\n_____________________________________________\n>Credits:\n>@CodeCO2 (me) for code and art.\n>Unlimited-@-Xaf-\n>@-CloudCodes- scratch vector icons\n>@griffpatch for some code\n_____________________________________________\n>Tags:\n>#games#games#games#games#games#games#games#games#games#games#games#games#games#games\n#all#all#all#all#all#all#all#all#all#all#all#all#all#all#all#all#all#all#all#all#all#all#all#all#all#all#all#all#all#all#all\n#music#music#music#music#music#music#music#music#music#music#music#music#music#music#music#music\n#art#art#art#art#art#art#art#art#art#art#art#art#art#art#art#art#art#art#art#art#art#art#art#art#art#art#art#art#art#art\n#trending#trending#trending#trending#trending#trending#trending#trending#trending#trending#trending#trending\n#popular#popular#popular#popular#popular#popular#popular#popular#popular#popular#popular##popular#popular\n