Mountains || a Platformer #games #all

Instructions: \nWelcome to Mountains,a platformer!\nInstructions\narrow keys to move.\nReport the bugs in the comments please.\n\n\n

@Stage\n\nwhen flag clicked\nforever\n    play sound [Plugged  v] until done\nend\n\n@Player\n\nwhen flag clicked\nswitch costume to (costume2 v)\nforever\n    if <<<key (left arrow v) pressed?> or <key (right arrow v) pressed?>> or <key (up arrow v) pressed?>> then\n        create clone of (_myself_ v)\n    end\nend\n\nwhen flag clicked\ngo to x: (-216) y: (100)\nset [level v] to [1]\nshow\nforever\n    go to [back v] layer\n    set [y v] to [0]\n    set [x v] to [0]\n    forever\n        change [y v] by (-1)\n        set [x v] to ((x) * (0.9))\n        if <key (left arrow v) pressed?> then\n            change [x v] by (-1)\n        end\n        if <key (right arrow v) pressed?> then\n            change [x v] by (1)\n        end\n        change x by (x)\n        if <touching (platforms v)?> then\n            change y by (1)\n        end\n        if <touching (platforms v)?> then\n            change y by (1)\n        end\n        if <touching (platforms v)?> then\n            change y by (1)\n        end\n        if <touching (platforms v)?> then\n            change y by (1)\n        end\n        if <touching (platforms v)?> then\n            change y by (-4)\n            change x by ((x) * (-1))\n            if <key (up arrow v) pressed?> then\n                set [y v] to [10]\n                if <([abs v] of (x) ) = (x)> then\n                    set [x v] to [-4]\n                else\n                    set [x v] to [4]\n                end\n            else\n                set [x v] to [0]\n            end\n        end\n        change y by (y)\n        if <touching (platforms v)?> then\n            change y by ((y) - ((y) * (2)))\n            set [y v] to [0]\n        end\n        change y by (-1)\n        if <<key (up arrow v) pressed?> and <touching (platforms v)?>> then\n            set [y v] to [15]\n        end\n        change y by (1)\n        if <touching (bounce pads v)?> then\n            set [y v] to [19]\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <<touching (danger v)?> or <touching (lava v)?>> then\n        go to x: (-216) y: (60)\n    end\n    if <(x position) = [239]> then\n        broadcast (Next Level v)\n        change [level v] by (1)\n        go to x: (-216) y: (60)\n    end\nend\n\nwhen I start as a clone\nrepeat (100)\n    change [ghost v] effect by (15)\n    change size by (-15)\nend\ndelete this clone\n\nwhen flag clicked\nshow\n\nwhen I receive [the end v]\nhide\n\n@Platforms\n\nwhen flag clicked\nswitch costume to (level 1 v)\ngo to x: (0) y: (0)\n\nwhen I receive [next level v]\nnext costume\n\n@Danger\n\nwhen flag clicked\ngo to [back v] layer\nswitch costume to (level 1 v)\ngo to x: (0) y: (0)\n\nwhen I receive [next level v]\nnext costume\n\n@Text and Decoration\n\ndefine position: x: (x) , y: (y)\ngo to x: (x) y: (y)\nif <<(round (x)) = (round (x position))> and <(round (y)) = (round (y position))>> then\n    show\nelse\n    hide\nend\n\nwhen flag clicked\nshow\ngo to [back v] layer\nswitch costume to (level 1 v)\ngo to x: (0) y: (0)\nforever\n    go to [back v] layer\nend\n\nwhen I receive [next level v]\nnext costume\n\n@Bounce pads\n\nwhen flag clicked\nshow\ngo to [back v] layer\nswitch costume to (level 1 v)\ngo to x: (0) y: (0)\n\nwhen I receive [next level v]\nnext costume\n\n@Thumbnail\n\nwhen flag clicked\nshow\nforever\n    reset timer\n    set [ghost v] effect to (100)\n    go to [front v] layer\nend\n\n@Assets [all]\n\nwhen flag clicked\nhide\n\n@Lava\n\nwhen flag clicked\ngo to [back v] layer\nswitch costume to (level 1 v)\ngo to x: (0) y: (0)\nforever\n    repeat (5)\n        wait (0.01) seconds\n        change y by (-3)\n    end\n    wait (0.1) seconds\n    repeat (5)\n        change y by (3)\n    end\nend\n\nwhen I receive [next level v]\nnext costume\n\n