Ninja Cat - A Platformer (Collab)
@Stage\n\nwhen flag clicked\nset volume to (100) %\nswitch backdrop to (backdrop3 v)\nforever\n    broadcast (Headband v)\nend\n\nwhen I receive [end intro v]\nforever\n    play sound [Jim Yosef - Link \[NCS Release\] v] until done\nend\n\nwhen [m v] key pressed\nset volume to (0) %\n\n@Player\n\ndefine Platformer Physics (speed) (friction) (jump height) (gravity)\nchange [y vel v] by (gravity)\nif <<key (right arrow v) pressed?> or <<mouse down?> and <(x position) < (mouse x)>>> then\n    point in direction (90)\n    change [x vel v] by (speed)\nend\nif <<key (left arrow v) pressed?> or <<mouse down?> and <(mouse x) < (x position)>>> then\n    point in direction (-90)\n    change [x vel v] by ((speed) * (-1))\nend\nset [x vel v] to ((x vel) * (friction))\nchange x by (x vel)\nset [slope v] to [0]\nif <touching (level v)?> then\n    repeat until <<not <touching (level v)?>> or <(slope) = [-8]>>\n        change [slope v] by (-1)\n        change y by (1)\n    end\nend\nif <touching (level v)?> then\n    change y by (slope)\n    repeat until <not <touching (level v)?>>\n        change x by ((([abs v] of (x vel) ) / (x vel)) * (-1))\n    end\n    set [x vel v] to [0]\nend\nchange y by (y vel)\nif <touching (level v)?> then\n    repeat until <not <touching (level v)?>>\n        change y by ((([abs v] of (y vel) ) / (y vel)) * (-1))\n    end\n    set [y vel v] to [0]\nend\nchange y by (-1)\nif <<<key (up arrow v) pressed?> or <<(mouse y) > (y position)> and <mouse down?>>> and <touching (level v)?>> then\n    set [y vel v] to (jump height)\nend\nchange y by (1)\n\nwhen flag clicked\n\nwhen I receive [reset level v]\nReset effects\n\ndefine Reset effects\nclear graphic effects\nset size to (20) %\ngo to x: (-204) y: (36)\nset [x vel v] to [0]\nset [y vel v] to [0]\n\nwait (.1) seconds\nset [death v] to [0]\nset [death v] to [1]\n\nwhen I receive [next level v]\nReset effects\n\nwhen [s v] key pressed\nif <(Level) < [18]> then\n    set [cheat? v] to [1]\n    broadcast (Next Level v)\nend\n\nwhen [r v] key pressed\nbroadcast (Reset Level v)\n\nwhen [p v] key pressed\nif <[1] < (Level)> then\n    set [cheat? v] to [1]\n    broadcast (Previous Level v)\n    Reset effects\nend\n\ndefine Death\nset [death v] to [1]\nwait (.01) seconds\nset [death v] to [0]\n\nwhen I receive [end intro v]\nshow\nset size to (20) %\nset [cheat? v] to [0]\nswitch costume to (w/o headband v)\ngo to [front v] layer\ngo to [front v] layer\nbroadcast (Reset Level v)\nforever\n    Platformer Physics [2.5] [.7] [15] [-1]\nend\n\nwhen flag clicked\nhide\nhide\n\nwhen I receive [end intro v]\nset size to (20) %\nforever\n    if <(x position) > [233]> then\n        Death\n        broadcast (Next Level v)\n    end\n    if <touching (danger v)?> then\n        Death\n        broadcast (Reset Level v)\n    end\n    if <touching (acid v)?> then\n        Death\n        broadcast (Reset Level v)\n    end\n    if <[-195] > (y position)> then\n        Death\n        broadcast (Reset Level v)\n    end\n    if <touching (enemies v)?> then\n        Death\n        broadcast (Reset Level v)\n    end\n    if <touching (enemies2 v)?> then\n        Death\n        broadcast (Reset Level v)\n    end\nend\n\n@Level\n\nwhen flag clicked\nhide variable [level v]\nhide variable [time display v]\nhide variable [time: v]\nhide variable [☁ wr v]\n\nwhen I receive [next level v]\nnext costume\n\nwhen I receive [previous level v]\nswitch costume to ((costume [number v]) - (1))\n\nwhen I receive [end intro v]\nset [level v] to [0]\nswitch costume to (level 1 v)\ngo to x: (0) y: (0)\nclear graphic effects\nshow\nforever\n    set [level v] to (costume [number v])\nend\n\nwhen I receive [end intro v]\nforever\n    set [time display v] to (Time:)\n    if <(Level) = [18]> then\n        hide variable [time: v]\n        show variable [☁ wr v]\n        hide variable [level v]\n        show variable [time display v]\n    else\n        show variable [level v]\n        hide variable [☁ wr v]\n        hide variable [time display v]\n        show variable [time: v]\n    end\nend\n\n@Background art\n\nwhen flag clicked\nshow\ngo to [back v] layer\ngo to [back v] layer\ngo to [back v] layer\ngo to [back v] layer\ngo to [back v] layer\ngo to [back v] layer\ngo to [back v] layer\nforever\n    go to x: (0) y: (0)\n    switch costume to ((Level) + (1))\nend\n\n@Danger\n\nwhen flag clicked\ngo to [back v] layer\ngo to [back v] layer\ngo to [back v] layer\ngo to [back v] layer\nforever\n    go to x: (0) y: (0)\n    switch costume to (Level)\nend\n\n@Coins\n\nwhen flag clicked\nhide\ndelete this clone\n\nwhen I receive [reset level v]\nlevel change\nrepeat (3)\n    position\n    position\nend\n\ndefine position\nif <(coin level render) = [1]> then\n    go to x: (-85) y: (40)\nend\nif <(coin level render) = [2]> then\n    go to x: (198) y: (-75)\nend\nif <(coin level render) = [3]> then\n    go to x: (57) y: (-70)\nend\nif <(coin level render) = [4]> then\n    go to x: (-14) y: (-64)\nend\nif <(coin level render) = [5]> then\n    go to x: (149) y: (84)\nend\nif <(coin level render) = [6]> then\n    go to x: (21) y: (10)\nend\nif <(coin level render) = [7]> then\n    go to x: (97) y: (50)\nend\nif <(coin level render) = [8]> then\n    go to x: (-205) y: (5)\nend\nif <(coin level render) = [9]> then\n    go to x: (-5) y: (30)\nend\nif <(coin level render) = [10]> then\n    go to x: (-5) y: (30)\nend\nif <(coin level render) = [11]> then\n    go to x: (-5) y: (30)\nend\nif <(coin level render) = [12]> then\n    go to x: (-5) y: (30)\nend\nif <(coin level render) = [13]> then\n    go to x: (42) y: (-15)\nend\nif <(coin level render) = [14]> then\n    go to x: (216) y: (-90)\nend\nif <(coin level render) = [15]> then\n    go to x: (216) y: (-50)\nend\nif <(coin level render) = [16]> then\n    go to x: (216) y: (-50)\nend\nif <(coin level render) = [17]> then\n    go to x: (11) y: (33)\nend\nif <(coin level render) = [18]> then\n    hide\nend\n\nwhen I receive [next level v]\nlevel change\nrepeat (3)\n    position\n    position\nend\n\nwhen I receive [previous level v]\nlevel change\nrepeat (3)\n    position\nend\n\nwhen flag clicked\nposition\nset size to (60) %\nclear graphic effects\nshow\n\ndefine level change\nwait (0) seconds\nif <(Level) < [18]> then\n    show\n    show\nend\nwait until <<touching (player v)?> or <<(cheat?) = [1]> or <(Death) = [1]>>>\nif <touching (player v)?> then\n    change [time: v] by (-0.5)\nend\nhide\n\nwhen flag clicked\n\nwhen flag clicked\n\nshow\nshow\n\nset [☁ wr v] to [60]\n\nwhen I receive [end intro v]\nforever\n    position\n    set [coin level render v] to (Level)\nend\n\nwhen I receive [end intro v]\nset [time: v] to [0]\nrepeat until <<(Level) = [18]> or <(cheat?) = [1]>>\n    wait (1) seconds\n    change [time: v] by (1)\nend\nif <(cheat?) = [0]> then\n    if <(☁ WR) > (Time:)> then\n        if <[30] < (Time:)> then\n            set [☁ wr v] to (Time:)\n        end\n    end\nend\n\n@Landscape effects\n\nwhen flag clicked\nforever\n    go to [back v] layer\n    go to x: (([x position v] of [player v]) / (20)) y: ((0) - (([y position v] of [player v]) / (20)))\nend\n\nwhen flag clicked\nforever\n    if <(Level) = [18]> then\n        switch costume to (costume2 v)\n    else\n        switch costume to (costume1 v)\n    end\nend\n\n@Thumbnail\n\nwhen flag clicked\nclear graphic effects\nshow\nswitch costume to (costume2 v)\nset size to (100) %\nswitch costume to (costume1 v)\ngo to [front v] layer\ngo [backward v] (4) layers\n\nwhen [7 v] key pressed\n\nwhen I receive [end intro v]\nforever\n    go to x: (0) y: (0)\n    set [ghost v] effect to (100)\n    go to [front v] layer\nend\n\n@Headband\n\nwhen flag clicked\nhide\n\nwhen I receive [headband v]\npoint in direction ([direction v] of [player v])\ngo to (player v)\n\nwhen I receive [end intro v]\nshow\nset rotation style [left-right v]\ngo to [front v] layer\ngo [backward v] (1) layers\ngo to [front v] layer\ngo [backward v] (1) layers\n\n@Acid\n\nwhen flag clicked\nset [acid y v] to [0]\ngo to x: (0) y: (-60)\ngo to [back v] layer\nforever\n    change y by ([sin v] of (Acid y) )\n    change [acid y v] by (9)\n    if <(Level) = [5]> then\n        show\n    else\n        if <(Level) = [8]> then\n            show\n        else\n            if <(Level) = [9]> then\n                show\n            else\n                if <(Level) = [14]> then\n                    show\n                else\n                    hide\n                end\n            end\n        end\n    end\nend\n\n@Enemies\n\nwhen flag clicked\nswitch costume to (with headband v)\nbroadcast (Reset Level v)\nforever\n    Platformer Physics [1] [.7] [8] [-1]\nend\n\ndefine Platformer Physics (speed) (friction) (jump height) (gravity)\nchange [y vel v] by (gravity)\nif <([x position v] of [player v]) > (x position)> then\n    point in direction (90)\n    change [x vel v] by (speed)\nend\nif <(x position) > ([x position v] of [player v])> then\n    point in direction (-90)\n    change [x vel v] by ((speed) * (-1))\nend\nset [x vel v] to ((x vel) * (friction))\nchange x by (x vel)\nset [slope v] to [0]\nif <touching (level v)?> then\n    repeat until <<not <touching (level v)?>> or <(slope) = [-8]>>\n        change [slope v] by (-1)\n        change y by (1)\n    end\nend\nif <touching (level v)?> then\n    change y by (slope)\n    repeat until <not <touching (level v)?>>\n        change x by ((([abs v] of (x vel) ) / (x vel)) * (-1))\n    end\n    set [x vel v] to [0]\nend\nchange y by (y vel)\nif <touching (level v)?> then\n    repeat until <not <touching (level v)?>>\n        change y by ((([abs v] of (y vel) ) / (y vel)) * (-1))\n    end\n    set [y vel v] to [0]\nend\nchange y by (-1)\nif <<(([y position v] of [player v]) - (3)) > (y position)> and <touching (level v)?>> then\n    set [y vel v] to (jump height)\nend\nchange y by (1)\n\ndefine Reset effects\nset size to (20) %\nset [x vel v] to [0]\nset [y vel v] to [0]\ngo to x: (204) y: (36)\nclear graphic effects\n\nwhen flag clicked\nforever\n    if <(Level) = [10]> then\n        show\n    else\n        if <(Level) = [11]> then\n            show\n        else\n            if <(Level) = [12]> then\n                show\n            else\n                if <(Level) = [16]> then\n                    show\n                else\n                    hide\n                end\n            end\n        end\n    end\nend\n\ngo to [front v] layer\n\nwhen I receive [next level v]\nReset effects\n\nwhen I receive [previous level v]\nReset effects\n\nwhen I receive [reset level v]\nReset effects\n\nwhen flag clicked\nforever\n    if <touching (danger v)?> then\n        Reset effects\n    end\n    if <touching (acid v)?> then\n        Reset effects\n    end\n    if <(y position) < [-190]> then\n        Reset effects\n    end\nend\n\nhide\n\n@Enemies2\n\nwhen flag clicked\nswitch costume to (with headband v)\nbroadcast (Reset Level v)\nforever\n    Platformer Physics [1] [.7] [8] [-1]\nend\n\ndefine Platformer Physics (speed) (friction) (jump height) (gravity)\nchange [y vel v] by (gravity)\nif <([x position v] of [player v]) > (x position)> then\n    point in direction (90)\n    change [x vel v] by (speed)\nend\nif <(x position) > ([x position v] of [player v])> then\n    point in direction (-90)\n    change [x vel v] by ((speed) * (-1))\nend\nset [x vel v] to ((x vel) * (friction))\nchange x by (x vel)\nset [slope v] to [0]\nif <touching (level v)?> then\n    repeat until <<not <touching (level v)?>> or <(slope) = [-8]>>\n        change [slope v] by (-1)\n        change y by (1)\n    end\nend\nif <touching (level v)?> then\n    change y by (slope)\n    repeat until <not <touching (level v)?>>\n        change x by ((([abs v] of (x vel) ) / (x vel)) * (-1))\n    end\n    set [x vel v] to [0]\nend\nchange y by (y vel)\nif <touching (level v)?> then\n    repeat until <not <touching (level v)?>>\n        change y by ((([abs v] of (y vel) ) / (y vel)) * (-1))\n    end\n    set [y vel v] to [0]\nend\nchange y by (-1)\nif <<(([y position v] of [player v]) - (3)) > (y position)> and <touching (level v)?>> then\n    set [y vel v] to (jump height)\nend\nchange y by (1)\n\ndefine Reset effects\nclear graphic effects\nset size to (20) %\nset [x vel v] to [0]\nset [y vel v] to [0]\ngo to x: (160) y: (36)\n\nwhen flag clicked\nforever\n    if <(Level) = [12]> then\n        show\n    else\n        if <(Level) = [15]> then\n            show\n        else\n            if <(Level) = [16]> then\n                show\n            else\n                hide\n            end\n        end\n    end\nend\n\ngo to [front v] layer\n\nwhen I receive [next level v]\nReset effects\n\nwhen I receive [previous level v]\nReset effects\n\nwhen I receive [reset level v]\nReset effects\n\nwhen flag clicked\nforever\n    if <touching (danger v)?> then\n        Reset effects\n    end\n    if <touching (acid v)?> then\n        Reset effects\n    end\nend\n\n@Intro for Ninja Cat\n\ndefine Go To: (x) (y) Speed (s) Size: (size) Direction: (direction)\nif <<(sorry) = [1]> and <(costume [number v]) = [5]>> then\n    repeat until <touching (_edge_ v)?>\n        change x by (((x) - (x position)) / (s))\n        change y by (((y) - (y position)) / (s))\n        turn right (((direction) - (direction)) / (s)) degrees\n        change size by (((size) - (size)) / (s))\n        change [ghost v] effect by (-10)\n    end\n    repeat (6)\n        change x by (((x) - (x position)) / (s))\n        change y by (((y) - (y position)) / (s))\n        turn right (((direction) - (direction)) / (s)) degrees\n        change size by (((size) - (size)) / (s))\n        change [ghost v] effect by (-10)\n    end\nelse\n    repeat until <<<(x) = (round (x position))> and <(y) = (round (y position))>> and <<(size) = (round (size))> and <(direction) = (round (direction))>>>\n        change x by (((x) - (x position)) / (s))\n        change y by (((y) - (y position)) / (s))\n        turn right (((direction) - (direction)) / (s)) degrees\n        change size by (((size) - (size)) / (s))\n        change [ghost v] effect by (-10)\n    end\nend\n\nstop [this script v]\n\nwhen flag clicked\nset [clone id v] to [0]\nset [sorry v] to [0]\nCreate Clone: [White]\nhide\nclear graphic effects\nset size to (100) %\ngo to x: (0) y: (0)\nCreate Clone: [Tile]\nwait (0.2) seconds\nCreate Clone: [AgentJ]\nstart sound [Low Whoosh v]\nCreate Clone: [Avanu]\nwait (1.3) seconds\nCreate Clone: [Ninja Cat]\nwait (2.5) seconds\nCreate Clone: [NINJA]\nwait (0.5) seconds\nCreate Clone: [CAT]\n\ndefine Create Clone: (thing)\nset [clone id v] to (thing)\ncreate clone of (_myself_ v)\n\nwhen I start as a clone\nif <(Clone ID) = [AgentJ]> then\n    point in direction (90)\n    switch costume to (agentj logo v)\n    set size to (85) %\n    go to [front v] layer\n    show\n    go to x: (-120) y: (-999)\n    Go To: [-120] [0] Speed [5] Size: [100] Direction: [90]\n    wait (0.3) seconds\n    start sound [High Whoosh v]\n    Go To: [-240] [260] Speed [5] Size: [100] Direction: [90]\n    forever\n        if <(sorry) = [2]> then\n            delete this clone\n        end\n    end\nend\nif <(Clone ID) = [Avanu]> then\n    point in direction (90)\n    set size to (100) %\n    switch costume to (avanu logo v)\n    set size to (85) %\n    go to [front v] layer\n    show\n    go to x: (120) y: (-999)\n    Go To: [120] [0] Speed [5] Size: [100] Direction: [90]\n    wait (0.3) seconds\n    set [sorry v] to [1]\n    Go To: [240] [260] Speed [5] Size: [100] Direction: [90]\n    hide\n    forever\n        if <(sorry) = [2]> then\n            delete this clone\n        end\n    end\nend\nif <(Clone ID) = [Tile]> then\n    point in direction (90)\n    switch costume to (tile v)\n    set size to (1) %\n    show\n    go to x: (-999) y: (-999)\n    Go To: [0] [0] Speed [4.5] Size: [100] Direction: [90]\n    forever\n        if <(sorry) = [2]> then\n            delete this clone\n        end\n    end\nend\nif <(Clone ID) = [Ninja Cat]> then\n    switch costume to (ninja cat v)\n    set size to (1) %\n    show\n    go to x: (-999) y: (-999)\n    point in direction (-179)\n    Go To: [0] [0] Speed [5] Size: [100] Direction: [90]\n    wait (0.7) seconds\n    start sound [Low Whoosh v]\n    Go To: [0] [-80] Speed [5] Size: [100] Direction: [90]\n    forever\n        if <(sorry) = [2]> then\n            delete this clone\n        end\n    end\nend\nif <(Clone ID) = [NINJA]> then\n    set [ghost v] effect to (100)\n    switch costume to (ninja v)\n    set size to (200) %\n    show\n    go to x: (-120) y: (90)\n    point in direction (90)\n    start sound [Crunch v]\n    Go To: [-105] [100] Speed [3] Size: [90] Direction: [90]\n    forever\n        if <(sorry) = [2]> then\n            delete this clone\n        end\n    end\nend\nif <(Clone ID) = [CAT]> then\n    set [ghost v] effect to (100)\n    switch costume to (cat v)\n    set size to (200) %\n    show\n    go to x: (120) y: (90)\n    point in direction (90)\n    start sound [Crunch v]\n    Create Clone: [Tile 2]\n    Go To: [115] [90] Speed [3] Size: [100] Direction: [90]\nend\nif <(Clone ID) = [Tile 2]> then\n    go to [front v] layer\n    wait (1) seconds\n    go to [front v] layer\n    set [ghost v] effect to (0)\n    switch costume to (tile v)\n    set size to (100) %\n    set [color v] effect to (-30)\n    show\n    go to x: (-999) y: (0)\n    point in direction (90)\n    Go To: [0] [0] Speed [4] Size: [100] Direction: [90]\n    set [sorry v] to [2]\n    wait (0.1) seconds\n    forever\n        change [ghost v] effect by (5)\n    end\nend\nif <(Clone ID) = [White]> then\n    show\n    go to x: (0) y: (0)\nend\n\nhide\n\nforever\n\nshow\nswitch costume to (size hack looool v)\n\nchange x by (10)\n\nchange size by (-1000)\nchange size by (1000)\n\nswitch costume to (avanu logo v)\n\nset size to (200) %\n\ngo to [front v] layer\n\nwhen flag clicked\nwait until <(sorry) = [2]>\nwait (1) seconds\nbroadcast (End Intro v)\n\n
Ninja Cat - A Platformer - [ SECOND PLACE YAY ]\nIn this game, you are a ninja cat who is on a quest to go through mysterious lands. How fast can you get through the game? Coins subtract 0.5 seconds from your time. \n|CONTROLS|\n[ARROW KEYS] to move\n[S] to skip a level (this will disable your chance at beating the world record)\n[P] to go to previous level (this will also disable your chance at beating the world record)\n\nIf you enjoyed, please leave a heart, star and maybe a follow?