japan |platformer

Instructions: Use arrow keys to move the rest of the instructions are in-game.\n(☞ﾟヮﾟ)☞Touch the sign for advice on how to beat the level.\nTouch the portal to advance to the next level.\n\n(☞ﾟヮﾟ)☞ PLATFORMER ADVENTURE2 !!! https://scratch.mit.edu/projects/119791344/\n\n(☞ﾟヮﾟ)☞Featured Wednesday, November 11, 2015

@Stage\n\n@Player\n\ndefine Amazing Platformer Engine\nchange [xvel v] by ((<<key (d v) pressed?> or <<key (right arrow v) pressed?> or <<mouse down?> and <(mouse x) > (x position)>>>> - <<key (a v) pressed?> or <<key (left arrow v) pressed?> or <<mouse down?> and <(mouse x) < (x position)>>>>) * (2))\nset [xvel v] to ((XVel) * (0.8))\nchange x by (XVel)\nchange x by (((0) - (XVel)) * <touching (ground v)?>)\nchange y by (-1)\nif <<touching (ground v)?> and <<key (w v) pressed?> or <<key (up arrow v) pressed?> or <<mouse down?> and <(mouse y) > (y position)>>>>> then\n    set [yvel v] to [14]\nend\nchange [yvel v] by (-1)\nchange y by ((YVel) + (1))\nif <touching (ground v)?> then\n    change y by ((0) - (YVel))\n    set [yvel v] to [0]\nend\nif <touching (portal v)?> then\n    if <not <(Level) = [9]>> then\n        Respawn\n        change [level v] by (1)\n        broadcast (Enemy Respawn v)\n    else\n        go to x: (-214) y: (0)\n        broadcast (Fade v)\n    end\nend\nif <touching (bouncy v)?> then\n    set [yvel v] to [18]\nend\nif <<<<touching (danger v)?> or <touching (moving danger v)?>> or <touching (cannon v)?>> or <<(y position) < [-170]> or <<touching (enemy ai v)?> or <touching (cannon2 v)?>>>> then\n    set [resx v] to (x position)\n    set [resy v] to (y position)\n    Respawn\n    create clone of (_myself_ v)\n    broadcast (Enemy Respawn v)\nend\n\ndefine Respawn\ngo to x: (-214) y: (0)\nset [xvel v] to [0]\nset [yvel v] to [0]\n\nwhen flag clicked\nhide\nRespawn\nset [level v] to [1]\n\nwhen I receive [begin gameplay v]\nshow\nRespawn\nforever\n    Amazing Platformer Engine\nend\n\nwhen I start as a clone\ngo to x: (ResX) y: (ResY)\nrepeat (10)\n    turn right (60) degrees\n    change y by (5)\n    change [ghost v] effect by (10)\nend\nhide\nset [resx v] to [0]\nset [resy v] to [0]\ndelete this clone\n\n@Ground\n\nwhen flag clicked\nforever\n    switch costume to (Level)\nend\n\n@Danger\n\nwhen flag clicked\nforever\n    switch costume to (Level)\nend\n\n@Text and Decorations\n\nwhen flag clicked\nforever\n    switch costume to (Level)\nend\n\n@Story\n\nwhen flag clicked\nswitch costume to (alpha v)\nwait (5) seconds\nswitch costume to (1 v)\nshow\nrepeat (4)\n    wait until <mouse down?>\n    next costume\n    wait until <not <mouse down?>>\nend\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nbroadcast (Begin Gameplay v)\nhide\n\n@Portal\n\nwhen flag clicked\nforever\n    switch costume to (Level)\nend\n\n@Intro\n\ndefine Animate (x) (y) (size) (direction) (speed)\nchange x by (((round (x)) - (round (x position))) / (speed))\nchange y by (((round (y)) - (round (y position))) / (speed))\nchange size by (((round (size)) - (round (size))) / (speed))\nturn right (((round (direction)) - (round (direction))) / (speed)) degrees\n\ndefine Color (color) Brightness (brightness) Transparency (transparency)\nset [color v] to (color)\nset [brightness v] to (brightness)\nset [transparency v] to (transparency)\nset [color v] effect to (Color)\nset [brightness v] effect to (Brightness)\nset [ghost v] effect to (Transparency)\n\ndefine Size (size) (speed)\nchange size by (((round (size)) - (round (size))) / (speed))\n\nwhen flag clicked\nwait (0.25) seconds\nClone Sprite ID [Start] [1]\nwait (1.3) seconds\nClone Sprite ID [Cover] [1]\nwait (0.4) seconds\nClone Sprite ID [Logo] [1]\nClone Sprite ID [Particles] [50]\nwait (1) seconds\nset [xmot v] to [-200]\nrepeat (7)\n    Color [20] Brightness [0] Transparency [0]\n    set [id v] to [Bars2]\n    create clone of (_myself_ v)\n    change [xmot v] by (75)\n    wait (0.02) seconds\nend\nwait (0.2) seconds\nCreate Bars\nwait (0.15) seconds\nBouncy Bars\nwait (0.3) seconds\nClone Sprite ID [Fill] [1]\nwait (0.5) seconds\nClone Sprite ID [Text] [1]\nwait (1) seconds\nbroadcast (End Intro v)\n\nwhen I start as a clone\nif <(ID) = [Start]> then\n    clear graphic effects\n    switch costume to (size bypass v)\n    Animate [0] [0] [0] [90] [1]\n    Color [20] Brightness [25] Transparency [0]\n    switch costume to (shape 1 v)\n    show\n    repeat until <[1200] = (round (size))>\n        switch costume to (size bypass v)\n        Size [1200] [5]\n        switch costume to (shape 1 v)\n    end\n    wait (2) seconds\n    delete this clone\nend\n\nwhen I start as a clone\nif <(ID) = [Cover]> then\n    clear graphic effects\n    switch costume to (size bypass v)\n    Animate [0] [0] [0] [90] [1]\n    Color [0] Brightness [100] Transparency [0]\n    switch costume to (shape 1 v)\n    show\n    repeat until <[325] = (round (size))>\n        switch costume to (size bypass v)\n        Size [325] [4]\n        switch costume to (shape 1 v)\n    end\n    wait (2.5) seconds\n    delete this clone\nend\n\nwhen I start as a clone\nif <(ID) = [Logo]> then\n    clear graphic effects\n    Animate [0] [-5000000] [0] [90] [1]\n    Color [0] Brightness [0] Transparency [0]\n    switch costume to (logo v)\n    show\n    repeat until <([abs v] of (((Move) * (0.7)) + (((100) - (round (size))) * (0.3))) ) < [0.05]>\n        set [move v] to (((Move) * (0.7)) + (((100) - (round (size))) * (0.3)))\n        set [ghost v] effect to (Move)\n        change size by (Move)\n        set y to (Move)\n    end\n    wait (2) seconds\n    delete this clone\nend\n\nwhen I start as a clone\nif <(ID) = [Particles]> then\n    clear graphic effects\n    switch costume to (size bypass v)\n    Animate [0] [0] (pick random (90) to (110)) (pick random (0) to (360)) [1]\n    Color [20] Brightness (pick random (0) to (25)) Transparency (pick random (0) to (15))\n    switch costume to (particle v)\n    show\n    set [i v] to (pick random (22) to (35))\n    set [j v] to [0.8]\n    repeat until <(y position) < [-160]>\n        if on edge, bounce\n        set [i v] to ((i) * (0.88))\n        change [j v] by (-0.25)\n        move (i) steps\n        change y by (j)\n    end\n    delete this clone\nend\n\nwhen I start as a clone\nif <(ID) = [Bars2]> then\n    go to [front v] layer\n    if <(XMot) = [325]> then\n        go [backward v] (2) layers\n    end\n    Animate [200] [150] [0] [2] [1]\n    Color (Color) Brightness (Brightness) Transparency (Transparency)\n    clear graphic effects\n    show\n    switch costume to (thin bar v)\n    repeat until <[100] = (round (size))>\n        Animate (XMot) [0] [100] [90] [5]\n        Color [20] Brightness [5] Transparency [0]\n    end\n    go to x: (XMot) y: (0)\n    point in direction (90)\n    wait (1) seconds\n    delete this clone\nend\n\ndefine Create Bars\nset [id v] to [Smooth Bar]\ngo to x: (-1000000000) y: (10000000000)\nset [xmot v] to [-220]\nrepeat (10)\n    create clone of (_myself_ v)\n    change [xmot v] by (50)\nend\n\nwhen I start as a clone\nif <(ID) = [Smooth Bar]> then\n    show\n    switch costume to (bar v)\n    set size to (100) %\n    show\n    go to [front v] layer\n    point in direction (90)\n    repeat until <<(round (x position)) = (XMot)> and <(round (y position)) = [0]>>\n        Pos (XMot) [0] [4]\n        Color [20] Brightness [50] Transparency [0]\n    end\n    wait (1) seconds\n    delete this clone\nend\n\ndefine Bouncy Bars\nset [id v] to [Bouncy Bars]\nset [bar y v] to [240]\nrepeat (10)\n    create clone of (_myself_ v)\n    change [bar y v] by (-60)\nend\nset [bar y v] to [0]\n\nwhen I start as a clone\nif <(ID) = [Bouncy Bars]> then\n    go to [front v] layer\n    show\n    set size to (0) %\n    switch costume to (bar2 v)\n    go to x: (-100000000) y: (Bar Y)\n    point in direction (0)\n    repeat (10)\n        set [bar y v] to (((Bar Y) * (.6)) + (((0) - (x position)) / (3)))\n        change x by (Bar Y)\n        change size by (((130) - (size)) / (5))\n        Color [20] Brightness [15] Transparency [0]\n        go to [front v] layer\n    end\n    repeat (20)\n        set [bar y v] to (((Bar Y) * (.6)) + (((0) - (x position)) / (3)))\n        change x by (Bar Y)\n        change size by (((130) - (size)) / (5))\n        Color [20] Brightness [15] Transparency [0]\n    end\nend\n\nwhen I start as a clone\nif <(ID) = [Fill]> then\n    clear graphic effects\n    switch costume to (size bypass v)\n    Animate [100] [5000000000000] [0] [-90] [1]\n    Color [0] Brightness [100] Transparency [0]\n    switch costume to (bar2 v)\n    go to [front v] layer\n    show\n    repeat until <<[0] = (round (x position))> and <[0] = (round (y position))>>\n        switch costume to (size bypass v)\n        Animate [0] [0] [130] [0] [5]\n        switch costume to (bar2 v)\n    end\n    Animate [0] [0] [130] [0] [1]\nend\n\ndefine Clone Sprite ID (id) (#)\nset [id v] to (id)\nrepeat (#)\n    create clone of (_myself_ v)\nend\n\ndefine Pos (x) (y) (speed)\nchange x by (((round (x)) - (round (x position))) / (speed))\nchange y by (((round (y)) - (round (y position))) / (speed))\n\nwhen I start as a clone\nif <(ID) = [Fill]> then\n    clear graphic effects\n    switch costume to (size bypass v)\n    Animate [100] [5000000000000] [0] [-90] [1]\n    Color [0] Brightness [100] Transparency [0]\n    switch costume to (bar2 v)\n    go to [front v] layer\n    show\n    repeat until <<[0] = (round (x position))> and <[0] = (round (y position))>>\n        switch costume to (size bypass v)\n        Animate [0] [0] [130] [0] [5]\n        switch costume to (bar2 v)\n    end\n    Animate [0] [0] [130] [0] [1]\nend\n\nwhen I start as a clone\nif <(ID) = [Text]> then\n    go to [front v] layer\n    show\n    clear graphic effects\n    switch costume to (text v)\n    go to x: (1000) y: (1000)\n    point in direction (158)\n    set size to (200) %\n    repeat until <<<<[0] = (round (x position))> and <[0] = (round (y position))>> and <[90] = (round (direction))>> and <[100] = (round (size))>>\n        Animate [0] [0] [100] [90] [5]\n    end\nend\n\nwhen I receive [end intro v]\ndelete this clone\n\n@Moving Danger\n\nwhen flag clicked\nforever\n    switch costume to (Level)\n    set y to (([sin v] of ((timer) * (100)) ) * (5))\nend\n\n@Bouncy\n\nwhen flag clicked\nforever\n    switch costume to (Level)\nend\n\n@TN\n\nwhen flag clicked\nset [ghost v] effect to (100)\ngo to [front v] layer\nforever\n    set [timeflow v] to (timer)\nend\n\nwhen [timer v] > (TimeFlow)\ngo to [front v] layer\nclear graphic effects\nshow\n\n@Cannon\n\ndefine Oof (x) (y)\nif <(y) < (y position)> then\n    set [oof v] to (([atan v] of (((x) - (x position)) / ((y) - (y position))) ) + (180))\nelse\n    set [oof v] to ([atan v] of (((x) - (x position)) / ((y) - (y position))) )\nend\npoint in direction (Oof)\n\nwhen flag clicked\nforever\n    if <<(Level) = [5]> or <(Level) = [8]>> then\n        show\n    else\n        hide\n    end\n    Oof ([x position v] of [player v]) ([y position v] of [player v])\nend\n\nwhen flag clicked\nforever\n    if <<(Level) = [5]> or <(Level) = [8]>> then\n        wait (1.5) seconds\n        create clone of (_myself_ v)\n    end\nend\n\nwhen I start as a clone\nswitch costume to (bullet v)\nshow\nrepeat until <<touching (_edge_ v)?> or <<touching (player v)?> or <touching (ground v)?>>>\n    move (7) steps\nend\ndelete this clone\n\nwhen I receive [enemy respawn v]\ndelete this clone\n\n@Enemy AI\n\ndefine Amazing Enemy AI\nchange [xvel v] by ((<([x position v] of [player v]) > (x position)> - <([x position v] of [player v]) < (x position)>) * (1.25))\nset [xvel v] to ((XVel) * (0.8))\nchange x by (XVel)\nchange x by (((0) - (XVel)) * <touching (ground v)?>)\nchange y by (-1)\nif <<([y position v] of [player v]) > ((y position) - (15))> and <touching (ground v)?>> then\n    set [yvel v] to [13]\nend\nchange [yvel v] by (-1)\nchange y by ((YVel) + (1))\nif <touching (ground v)?> then\n    change y by ((0) - (YVel))\n    set [yvel v] to [0]\nend\nif <touching (bouncy v)?> then\n    set [yvel v] to [18]\nend\nif <<touching (moving danger v)?> or <(y position) < [-170]>> then\n    set [resx v] to (x position)\n    set [resy v] to (y position)\n    if <not <(Level) > [7]>> then\n        create clone of (_myself_ v)\n    end\n    hide\nend\n\ndefine Respawn\ngo to x: (214) y: (0)\nset [xvel v] to [0]\nset [yvel v] to [0]\n\nwhen flag clicked\nhide\n\nwhen I receive [begin gameplay v]\nforever\n    Amazing Enemy AI\nend\n\nwhen I start as a clone\ngo to x: (ResX) y: (ResY)\nrepeat (10)\n    turn right (60) degrees\n    change y by (5)\n    change [ghost v] effect by (10)\nend\nhide\nset [resx v] to [0]\nset [resy v] to [0]\ndelete this clone\n\nwhen I receive [begin gameplay v]\nhide\nwait until <(Level) = [6]>\nRespawn\nshow\nwait until <(Level) = [8]>\nforever\n    hide\nend\n\nwhen I receive [enemy respawn v]\nif <(Level) > [5]> then\n    show\nend\nRespawn\n\n@Cannon2\n\ndefine Oof (x) (y)\nif <(y) < (y position)> then\n    set [oof v] to (([atan v] of (((x) - (x position)) / ((y) - (y position))) ) + (180))\nelse\n    set [oof v] to ([atan v] of (((x) - (x position)) / ((y) - (y position))) )\nend\npoint in direction (Oof)\n\nwhen flag clicked\nforever\n    if <(Level) = [8]> then\n        show\n    else\n        hide\n    end\n    Oof ([x position v] of [player v]) ([y position v] of [player v])\nend\n\nwhen flag clicked\nwait (1) seconds\nforever\n    if <(Level) = [8]> then\n        wait (1.35) seconds\n        create clone of (_myself_ v)\n    end\nend\n\nwhen I start as a clone\nswitch costume to (bullet v)\nshow\nrepeat until <<touching (_edge_ v)?> or <<touching (player v)?> or <touching (ground v)?>>>\n    move (7) steps\nend\ndelete this clone\n\nwhen I receive [enemy respawn v]\ndelete this clone\n\n@Fade\n\nwhen flag clicked\nswitch costume to (fade v)\nhide\n\nwhen I receive [fade v]\nswitch costume to (fade v)\nset [ghost v] effect to (100)\ngo to [front v] layer\nshow\nrepeat (10)\n    change [ghost v] effect by (-10)\nend\nwait (1) seconds\nswitch costume to (fade2 v)\nrepeat (20)\n    set [brightness v] effect to (50)\n    change [whirl v] effect by (100)\nend\nclear graphic effects\nswitch costume to (win v)\n\nwhen I receive [begin gameplay v]\nforever\n    play sound [Adventure v] until done\nend\n\nwhen I receive [fade v]\nstop all sounds\n\n@Skip\n\nwhen flag clicked\nhide\n\nwhen I receive [begin gameplay v]\nshow\nforever\n    if <<touching (mouse-pointer v)?> and <mouse down?>> then\n        change [level v] by (1)\n        wait until <not <<touching (mouse-pointer v)?> and <mouse down?>>>\n    end\nend\n\n