The Egg Platformer
@Stage\n\n@Player\n\nwhen flag clicked\nshow\nset [level v] to [1]\nswitch costume to (right v)\nforever\n    set [x vel v] to [0]\n    set [y vel v] to [0]\n    set [jump v] to [0]\n    go to x: (-210) y: (-55)\n    repeat until <<(x position) > [220]> or <touching (danger v)?>>\n        change [x vel v] by (<key (right arrow v) pressed?> - <key (left arrow v) pressed?>)\n        set [x vel v] to ((X Vel) * (0.9))\n        create clone of (_myself_ v)\n        change x by (round (X Vel))\n        if <touching (platform v)?> then\n            change x by (round ((X Vel) * (-1)))\n            if <key (up arrow v) pressed?> then\n                if <(X Vel) > [0]> then\n                    set [x vel v] to [-8]\n                else\n                    set [x vel v] to [8]\n                end\n                set [jump v] to [0]\n            else\n                set [x vel v] to [0]\n            end\n        end\n        change [y vel v] by (-1)\n        change y by (Y Vel)\n        if <touching (platform v)?> then\n            change y by ((Y Vel) * (-1))\n            if <(Y Vel) < [0]> then\n                set [jump v] to [0]\n            end\n            set [y vel v] to [0]\n        end\n        if <key (up arrow v) pressed?> then\n            if <(Jump) = [0]> then\n                set [y vel v] to [15]\n                set [jump v] to [1]\n            end\n        end\n        if <(x position) > [220]> then\n            broadcast (New map v)\n        end\n    end\nend\n\nwhen I start as a clone\nswitch costume to (trail v)\nrepeat (10)\n    change size by (-5)\n    change [ghost v] effect by (10)\n    change [color v] effect by (25)\nend\ndelete this clone\n\nwhen flag clicked\nset drag mode [draggable v]\nset size to (70) %\nforever\n    if <<key (right arrow v) pressed?> or <key (d v) pressed?>> then\n        switch costume to (right v)\n    else\n        if <key (left arrow v) pressed?> then\n            switch costume to (left v)\n        end\n    end\nend\n\nwhen I receive [game over v]\nhide\n\nwhen flag clicked\nforever\n    play sound [china-town-13501 \(1\) v] until done\nend\n\n@Platform\n\nwhen I receive [new map v]\nswitch costume to (Level)\n\nwhen flag clicked\nshow\nswitch costume to (Level)\n\nwhen I receive [game over v]\nhide\n\n@Danger\n\nwhen flag clicked\nshow\nswitch costume to (Level)\ngo to [back v] layer\nshow\n\nwhen I receive [new map v]\nswitch costume to (Level)\n\nwhen I receive [game over v]\nhide\n\n@Thumbnail\n\nwhen flag clicked\ngo to x: (0) y: (0)\ngo to [front v] layer\nset [ghost v] effect to (100)\n\n@Settings\n\nwhen I receive [game over v]\nswitch backdrop to (game over v)\n\nwhen flag clicked\nset [level v] to [1]\nswitch backdrop to (play v)\n\nwhen I receive [new map v]\nchange [level v] by (1)\nif <(Level) > [6]> then\n    broadcast (Game Over v)\nend\n\n
Use arrow keys to move the egg: Left/Right and Up to jump over the chicks.\n\nHave Fun!