Grasslands 3 - A Platformer Game #Games #All

Instructions: Arrow keys \nPart 1: https://scratch.mit.edu/projects/547159445/\nPart 2: https://scratch.mit.edu/projects/548305720/\nHave fun!\nNo Advertising\n

@Stage\n\nwhen flag clicked\nswitch backdrop to (backdrop1 v)\n\n@Platforms\n\nwhen flag clicked\nswitch costume to (level 9 v)\ngo to x: (0) y: (0)\n\nwhen I receive [next level v]\nnext costume\n\nwhen flag clicked\nswitch backdrop to (backdrop3 v)\n\nwhen flag clicked\nforever\n    if <(level) = [8]> then\n        switch backdrop to (backdrop3 v)\n    end\nend\n\nnext backdrop\n\nwhen flag clicked\nforever\n    if <(level) = [7]> then\n        switch backdrop to (backdrop4 v)\n    end\nend\n\nwhen I receive [you win! v]\n\nplay sound [pop v] until done\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\nswitch costume to (level 2 v)\nshow\ngo to [front v] layer\ngo to x: (0) y: (0)\ngo to [front v] layer\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@Lava\n\nwhen flag clicked\ngo to [back v] layer\nswitch costume to (level 3 v)\ngo to x: (0) y: (0)\nforever\n    repeat (10)\n        change y by (-1.5)\n    end\n    wait (0.1) seconds\n    repeat (10)\n        change y by (1.5)\n    end\nend\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@Player\n\nwhen flag clicked\nswitch costume to (costume2 v)\nforever\n    if <<key (up arrow v) pressed?> or <<key (down arrow v) pressed?> or <<key (right arrow v) pressed?> or <key (left 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: (100)\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: (100)\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\nwhen flag clicked\nshow\nforever\n    play sound [song v] until done\nend\n\nwhen flag clicked\nforever\n    go to [front v] layer\nend\n\n@Sprite3\n\nwhen flag clicked\nhide\n\nshow\ngo to [front v] layer\n\n