Scratch | A Platformer
@Stage\n\n@Merry Christmas！\n\nmove (#FF0000) steps\n\nmove (#FF9500) steps\n\nmove (#FFEA00) steps\n\nmove (#1CBA07) steps\n\nmove (#00A6FF) steps\n\nmove (#C300FF) steps\n\n@Player\n\ndefine Respawn\ngo to x: (-214) y: (0)\nset [xv v] to [0]\nset [yv v] to [0]\n\nwhen flag clicked\nset [level v] to [1]\nRespawn\nforever\n    if <<key (left arrow v) pressed?> or <key (a v) pressed?>> then\n        change [xv v] by (-1.5)\n        point in direction (-90)\n    end\n    if <<key (right arrow v) pressed?> or <key (d v) pressed?>> then\n        change [xv v] by (1.5)\n        point in direction (90)\n    end\n    set [xv v] to ((xv) * (0.85))\n    change x by (xv)\n    if <touching (ground v)?> then\n        change y by (1)\n    end\n    if <touching (ground v)?> then\n        change y by (1)\n    end\n    if <touching (ground v)?> then\n        change y by (1)\n    end\n    if <touching (ground v)?> then\n        change y by (1)\n    end\n    if <touching (ground v)?> then\n        change y by (-4)\n        change x by ((xv) * (-1))\n        if <<key (up arrow v) pressed?> or <key (w v) pressed?>> then\n            if <(xv) > [0]> then\n                set [xv v] to [-10]\n            else\n                set [xv v] to [10]\n            end\n            set [yv v] to [15]\n        else\n            set [xv v] to [0]\n        end\n    end\n    change [yv v] by (-1)\n    change y by (yv)\n    if <touching (ground v)?> then\n        change y by ((yv) - ((yv) * (2)))\n        set [yv v] to [0]\n    end\n    change y by (-1)\n    if <<touching (ground v)?> and <<key (up arrow v) pressed?> or <key (w v) pressed?>>> then\n        set [yv v] to [15]\n    end\n    if <touching (danger v)?> then\n        Respawn\n    end\n    change y by (1)\n    if <(x position) > [239]> then\n        if <not <(level) = [16]>> then\n            change [level v] by (1)\n            Respawn\n        end\n    end\n    switch backdrop to (level)\n    if <<[mods v] contains (username)?> and <key (space v) pressed?>> then\n        go to (mouse-pointer v)\n    end\n    if <key (down arrow v) pressed?> then\n        set [xv v] to ((xv) / (2))\n        set [yv v] to ((yv) / (2))\n    end\n    if <<[mods v] contains (username)?> and <key ((join [en] [ter]) v) pressed?>> then\n        broadcast (Shoot v)\n        wait until <not <key ((join [en] [ter]) v) pressed?>>\n    end\n    if <<not <[mods v] contains (username)?>> and <key (space v) pressed?>> then\n        broadcast (Shoot v)\n        wait until <not <key (space v) pressed?>>\n    end\nend\n\nwhen flag clicked\nhide variable [boss health v]\nhide variable [lives v]\nwait until <(level) = [16]>\nset [lives v] to [5]\nshow variable [boss health v]\nshow variable [lives v]\nrepeat until <(boss health) = [0]>\n    if <(lives) = [0]> then\n        change [boss health v] by (5)\n        set [lives v] to [5]\n    end\n    if <touching (the boss v)?> then\n        change [lives v] by (-1)\n        change [boss health v] by (1)\n        wait until <not <touching (the boss v)?>>\n    end\n    if <touching (boss bullet v)?> then\n        change [lives v] by (-1)\n        change [boss health v] by (1)\n        wait until <not <touching (boss bullet v)?>>\n    end\n    if <touching (danger v)?> then\n        change [lives v] by (-1)\n        change [boss health v] by (1)\n        wait until <not <touching (danger v)?>>\n    end\n    if <touching color (#ff0000)?> then\n        change [lives v] by (-1)\n        change [boss health v] by (1)\n        wait until <not <touching color (#ff0000)?>>\n    end\nend\nchange [level v] by (1)\n\n@Ground\n\nwhen flag clicked\nforever\n    switch costume to (level)\nend\n\n@Danger\n\nwhen flag clicked\nswitch costume to (level 1 v)\nforever\n    switch costume to (level)\nend\n\n@All Text\n\nwhen flag clicked\nswitch costume to (level 1 v)\nforever\n    switch costume to (level)\nend\n\n@TM\n\nwhen flag clicked\nset [ghost v] effect to (100)\n\n@The Boss\n\nwhen flag clicked\nset [boss health v] to [10]\nhide\nwait until <(level) = [16]>\nshow\nrepeat until <(boss health) = [0]>\n    if <touching (bullet v)?> then\n        change [boss health v] by (-1)\n        wait until <not <touching (bullet v)?>>\n    end\n    if <touching (laser v)?> then\n        change [boss health v] by (-5)\n        wait until <not <touching (laser v)?>>\n    end\nend\nhide\n\nwhen flag clicked\nhide\nwait until <(level) = [16]>\nshow\nrepeat until <(boss health) < [1]>\n    broadcast (Boss v)\n    wait (pick random (0.75) to (3.00)) seconds\nend\nhide\n\n@Bullet\n\nwhen flag clicked\nhide\n\nwhen I receive [shoot v]\npoint in direction ([direction v] of [player v])\ngo to (player v)\ncreate clone of (_myself_ v)\n\nwhen I start as a clone\nshow\nrepeat until <<touching (_edge_ v)?> or <touching (the boss v)?>>\n    move (10) steps\nend\nmove (10) steps\nwait (0.5) seconds\ndelete this clone\n\n@Boss Bullet\n\nwhen flag clicked\nhide\n\nwhen I receive [boss v]\npoint in direction (-90)\ngo to (the boss v)\ncreate clone of (_myself_ v)\n\nwhen I start as a clone\nset y to (pick random (-77) to (0))\nshow\nrepeat until <<touching (_edge_ v)?> or <touching (player v)?>>\n    move (10) steps\nend\nmove (10) steps\nwait (0.5) seconds\ndelete this clone\n\n@Laser\n\nwhen flag clicked\nhide\nwait until <(level) = [16]>\nrepeat until <not <(level) = [16]>>\n    go to (random position v)\n    set y to (0)\n    broadcast (Done v)\n    wait (pick random (3) to (7)) seconds\nend\n\nwhen I receive [done v]\nshow\nset [brightness v] effect to (-50)\nset [ghost v] effect to (30)\nwait (1) seconds\nclear graphic effects\nwait (1) seconds\nhide\n\n
Entry for @GrizzEllie2\n1ST PLACE\nPlay my new game: \n\n\n\n\nA level too hard? Use down arrow to slow down velocity, even without down arrow all levels before level 14 are possible. Down arrow is officially introduced at level 14.\nArrow keys to move, and don't touch reports buttons\nLike always, this platformer has a storyline.\nNote: This may be hard. If you have a suggestion for a skip button or some other suggestion, add a comment to this studio:\nhttps://scratch.mit.edu/studios/28405402/comments/\n#games #platformers #animal_supernova #all #scratch