Sonic Movie 2 - A Platformer                          #games

Instructions: Curated 11-19-15 by @Flame2957!\nArrow keys to move\nThere are 13 levels now. \nYay! My first game with wall detection!\nThis my second most popular project!\nThis project had over 11000 views, 1500 loves and 1200 faves! Thanks so much!

@Stage\n\nwhen flag clicked\nforever\n    play sound [A Lost Past_ - Lena Orsa \(1\) v] until done\nend\n\n@player\n\nwhen flag clicked\nset x to (-200)\nset y to (20)\nset [yv v] to [0]\nset [xv v] to [0]\nforever\n    set rotation style [left-right v]\n    change [yv v] by (-1)\n    if <key (right arrow v) pressed?> then\n        change [xv v] by (0.7)\n        point in direction (90)\n    end\n    if <key (left arrow v) pressed?> then\n        change [xv v] by (-0.7)\n        point in direction (-90)\n    end\n    change x by (XV)\n    if <touching (ground v)?> then\n        change y by (1)\n        if <touching (ground v)?> then\n            change y by (1)\n            if <touching (ground v)?> then\n                change y by (1)\n                if <touching (ground v)?> then\n                    change y by (1)\n                    if <touching (ground v)?> then\n                        change y by (1)\n                        if <touching (ground v)?> then\n                            change x by ((XV) * (-1))\n                            change x by (-1)\n                            change y by (-5)\n                            change x by (1)\n                            if <key (up arrow v) pressed?> then\n                                if <(XV) > [0]> then\n                                    set [xv v] to [-8]\n                                else\n                                    set [xv v] to [8]\n                                end\n                                set [yv v] to [10]\n                            else\n                                set [xv v] to [0]\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\n    change y by (YV)\n    if <touching (ground v)?> then\n        change y by ((YV) * (-1))\n        set [yv v] to [0]\n    end\n    change y by (-1)\n    if <touching (ground v)?> then\n        if <key (up arrow v) pressed?> then\n            set [yv v] to [15]\n        end\n    end\n    change y by (1)\n    if <touching (kill v)?> then\n        broadcast (killed v)\n        wait (0.3) seconds\n        set [yv v] to [0]\n        set [xv v] to [0]\n        set x to (-200)\n        set y to (20)\n    end\n    if <(x position) > [222]> then\n        broadcast (killed v)\n        wait (0.3) seconds\n        set [yv v] to [0]\n        set [xv v] to [0]\n        change [_lvl v] by (1)\n        set x to (-200)\n        set y to (20)\n    end\nend\n\n@ground\n\nwhen flag clicked\nset [_lvl v] to [1]\nforever\n    switch costume to (_lvl)\nend\n\n@kill\n\nwhen flag clicked\nforever\n    set [brightness v] effect to (-60)\n    switch costume to (_lvl)\nend\n\n@screen cov\n\nwhen flag clicked\nhide\n\nwhen I receive [killed v]\ngo to x: (0) y: (0)\nshow\nrepeat until <(round (y position)) = [-360]>\n    go to [front v] layer\n    change y by (((-360) - (y position)) / (4))\nend\nwait (0.1) seconds\nrepeat until <(round (y position)) = [-15]>\n    change y by (((-15) - (y position)) / (4))\nend\nhide\n\n@thumbnail\n\nwhen flag clicked\nforever\n    go to x: (0) y: (0)\n    show\n    go to [front v] layer\n    set [ghost v] effect to (100)\nend\n\n