Ninja- A Platformer
@Stage\n\nwhen flag clicked\nforever\n    play sound [epic-japanese-music-shadow-ninja-youtubemp3free v] until done\nend\n\n@Particles\n\nwhen I start as a clone\ngo to [back v] layer\ngo to x: (-240) y: (pick random (-290) to (240))\nset [ghost v] effect to (pick random (70) to (80))\nset size to (pick random (100) to (150)) %\nshow\nglide (2.2) secs to x: (240) y: (pick random (-240) to (240))\ndelete this clone\n\nwhen flag clicked\nhide\nforever\n    create clone of (_myself_ v)\nend\n\nwhen flag clicked\nforever\n    turn left (100) degrees\nend\n\n@Player\n\nwhen I receive [play v]\nswitch costume to (1 v)\nforever\n    create clone of (_myself_ v)\nend\n\nwhen I start as a clone\nswitch costume to (2 v)\nset [ghost v] effect to (0)\nrepeat (20)\n    change size by (-2.5)\n    change [ghost v] effect by (7)\nend\ndelete this clone\n\ndefine Place Player: (x) (y) Set Size To: (size)\ngo to x: (x) y: (y)\nset size to (size) %\n\ndefine Gravity, Platform Detection, Physics....\nswitch costume to (1 v)\nforever\n    change [y v] by (-1)\n    if <<<key (a v) pressed?> or <key (left arrow v) pressed?>> or <<mouse down?> and <(mouse x) < (x position)>>> then\n        change [x v] by (-1)\n        switch costume to (6 v)\n    end\n    if <<<key (d v) pressed?> or <key (right arrow v) pressed?>> or <<mouse down?> and <(mouse x) > (x position)>>> then\n        switch costume to (1 v)\n        change [x v] by (1)\n    end\n    set [x v] to ((x) * (0.9))\n    change x by (x)\n    if <touching (level hitbox v)?> then\n        change y by (1)\n    end\n    if <touching (level hitbox v)?> then\n        change y by (1)\n    end\n    if <touching (level hitbox v)?> then\n        change y by (1)\n    end\n    if <touching (level hitbox v)?> then\n        change y by (1)\n    end\n    if <touching (level hitbox v)?> then\n        change y by (-4)\n        change x by ((x) * (-1))\n        if <<<key (up arrow v) pressed?> or <key (w v) pressed?>> or <<mouse down?> and <(mouse y) > [0]>>> then\n            set [y v] to [11]\n            if <(x) > [0]> then\n                set [x v] to [-10]\n            else\n                set [x v] to [10]\n            end\n        else\n            set [x v] to [0]\n        end\n    end\n    change y by (y)\n    if <touching (level hitbox 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?> or <key (w v) pressed?>> or <<mouse down?> and <((mouse y) - (y position)) > [50]>>> and <touching (level hitbox v)?>> then\n        set [y v] to [12]\n    end\n    change y by (1)\n    if <<<<touching (obstacles v)?> or <touching (evil ninja  v)?>> or <(y position) < [-175]>> or <key (r v) pressed?>> then\n        repeat (10)\n            change [pixelate v] effect by (-10)\n        end\n        Place Player: [-189] [-110] Set Size To: [40]\n        switch costume to (1 v)\n        repeat (10)\n            change [pixelate v] effect by (10)\n        end\n        change [deaths v] by (1)\n        set [y v] to [0]\n        set [x v] to [0]\n    end\n    if <<(x position) > [230]> or <touching (next planet v)?>> then\n        wait (.000001) seconds\n        change [level v] by (1)\n        Place Player: [-189] [-115] Set Size To: [40]\n        broadcast (Black screen v)\n        set [y v] to [0]\n        set [x v] to [0]\n    end\nend\n\nwhen I receive [play v]\nset [level v] to [1]\nshow\nPlace Player: [-173] [-110] Set Size To: [40]\nhide variable [y v]\nhide variable [x v]\nset [y v] to [0]\nset [x v] to [0]\nforever\n    Gravity, Platform Detection, Physics....\nend\n\nwhen I receive [play v]\nforever\n    if <touching (trampoline v)?> then\n        set [y v] to [19]\n    end\nend\n\nwhen I receive [play v]\nswitch costume to (1 v)\nset [deaths v] to [0]\n\nwhen flag clicked\nhide\n\nwhen I receive [next planet v]\nnext costume\n\nwhen I receive [play v]\nforever\n    if <touching (next planet v)?> then\n        next costume\n    end\nend\n\nwhen flag clicked\nbroadcast (play v)\n\nwhen flag clicked\nforever\n    if <touching (portal 1 v)?> then\n        go to (portal 2 v)\n        change x by (20)\n        set [x v] to [5]\n        set [y v] to [0]\n    end\nend\n\nwait (5) seconds\n\n@Trampoline\n\nwhen I receive [play v]\nshow\nforever\n    switch costume to (Level)\nend\n\n@Obstacles\n\nwhen I receive [play v]\nshow\nforever\n    switch costume to (Level)\n    go to [back v] layer\nend\n\nwhen flag clicked\nhide\n\n@Level Hitbox\n\nwhen I receive [play v]\nshow\nforever\n    switch costume to (Level)\nend\n\n@Thumbnail\n\nwhen I receive [thumbnail show v]\nshow\ngo to [front v] layer\nwait (2) seconds\nhide\n\nwhen I receive [play v]\nforever\n    show\n    go to [front v] layer\n    set [ghost v] effect to (100)\nend\n\nwhen flag clicked\nhide\n\n@Level Art\n\nwhen I receive [play v]\nshow\nforever\n    switch costume to (Level)\nend\n\n@Portal 1\n\nwhen I receive [play v]\nshow\nforever\n    switch costume to (Level)\n    go to [back v] layer\nend\n\nwhen flag clicked\nforever\n    if <(Level) = [3]> then\n        go to x: (-13) y: (-99)\n    end\n    if <(Level) = [8]> then\n        go to x: (211) y: (-80)\n    end\nend\n\n@Portal 2\n\nwhen I receive [play v]\nshow\nforever\n    switch costume to (Level)\n    go to [back v] layer\nend\n\nwhen flag clicked\nforever\n    if <(Level) = [3]> then\n        go to x: (16) y: (124)\n    end\n    if <(Level) = [8]> then\n        go to x: (-241) y: (132)\n    end\nend\n\n@EVIL NINJA \n\nwhen I receive [play v]\nshow\nforever\n    set size to (40) %\nend\n\nwhen I receive [play v]\nforever\n    switch costume to (costume1 v)\n    glide (2) secs to x: (104) y: (-118)\n    wait (.0000001) seconds\n    switch costume to (costume2 v)\n    glide (2) secs to x: (-104) y: (-118)\nend\n\nwhen flag clicked\nforever\n    if <<(Level) = [7]> or <(Level) = [8]>> then\n        show\n    else\n        hide\n    end\nend\n\nswitch costume to (costume1 v)\nglide (2) secs to x: (104) y: (-118)\nwait (.0000001) seconds\nswitch costume to (costume2 v)\nglide (2) secs to x: (-104) y: (-118)\n\n@EVIL NINJA 2\n\nwhen I receive [play v]\nshow\nforever\n    set size to (40) %\nend\n\nwhen I receive [play v]\nforever\n    switch costume to (costume1 v)\n    glide (2) secs to x: (104) y: (-118)\n    wait (.0000001) seconds\n    switch costume to (costume2 v)\n    glide (2) secs to x: (-104) y: (-118)\nend\n\nwhen flag clicked\nforever\n    if <(Level) = [8]> then\n        show\n    else\n        hide\n    end\nend\n\n
This is Ninja- A Platformer:\n15 level platformer\nMake sure to leave a heart and star if you enjoyed it =D\nArrow Keys, WASD, or mouse to move\nPress r to restart the level\n