The Elementals - A Platformer
@Stage\n\nwhen I receive [gamestart v]\nstop all sounds\nforever\n    set volume to (100) %\n    play sound [25 Forest Land Overworld \(NSMBWii\) v] until done\nend\n\nwhen I receive [you win v]\nset volume to (0) %\n\nwhen flag clicked\nswitch backdrop to (backdrop1 v)\n\nwhen I receive [animation start v]\nset volume to (100) %\nstart sound [24 Forest Land \(NSMBWii\) v]\nwait (5) seconds\nrepeat (75)\n    change volume by (-1)\nend\nrepeat (25)\n    change volume by (-1)\nend\nstop all sounds\nstart sound [1-03 Attack of the Airships v]\nbroadcast (shadow v)\nrepeat (100)\n    change volume by (1)\nend\n\nwhen backdrop switches to [backdrop1 v]\nset [brightness v] effect to (-10)\n\nwhen flag clicked\nset [words v] to [0]\n\nbroadcast (Claw v)\n\nwhen I receive [shut down v]\nforever\n    set volume to (0) %\nend\n\n@The Elemental\n\nwhen flag clicked\npoint in direction (90)\nhide\nset [whirl v] effect to (0)\nswitch costume to (right side - 1 v)\nset size to (50) %\nset [x velocity v] to [0]\nset [y velocity v] to [0]\ngo to x: (-214) y: (-51)\n\nwhen I receive [gamestart v]\nbroadcast (animation code v)\nbroadcast (drop code v)\nshow\nforever\n    go to [front v] layer\n    if <<key (right arrow v) pressed?> or <key (d v) pressed?>> then\n        stop [other scripts in sprite v]\n        broadcast (drop code v)\n        broadcast (animation code v)\n        change [x velocity v] by (1)\n        switch costume to (right side - 1 v)\n        set [direction v] to [r]\n    end\n    if <<key (left arrow v) pressed?> or <key (a v) pressed?>> then\n        stop [other scripts in sprite v]\n        broadcast (drop code v)\n        broadcast (animation code v)\n        change [x velocity v] by (-1)\n        switch costume to (birdman2 v)\n        set [direction v] to [l]\n    end\n    set [x velocity v] to ((x velocity) * (.9))\n    change x by (x velocity)\n    if <touching (level v)?> then\n        change y by (1)\n        if <touching (level v)?> then\n            change y by (1)\n            if <touching (level v)?> then\n                change y by (1)\n                if <touching (level v)?> then\n                    change y by (1)\n                    if <touching (level v)?> then\n                        change y by (1)\n                        if <touching (level v)?> then\n                            change x by ((x velocity) * (-1))\n                            change y by (-5)\n                            if <<key (up arrow v) pressed?> or <key (w v) pressed?>> then\n                                if <(x velocity) > [0]> then\n                                    set [x velocity v] to [-5]\n                                else\n                                    set [x velocity v] to [5]\n                                end\n                                set [y velocity v] to [10]\n                            else\n                                set [x velocity v] to [0]\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\n    change [y velocity v] by (-1)\n    change y by (y velocity)\n    if <touching (level v)?> then\n        change y by ((y velocity) * (-1))\n        set [y velocity v] to [0]\n    end\n    change y by (-1)\n    if <touching (level v)?> then\n        if <<key (up arrow v) pressed?> or <key (w v) pressed?>> then\n            change [y velocity v] by (15)\n        end\n    end\n    change y by (1)\n    if <(x position) > [230]> then\n        change [level v] by (1)\n        set [x velocity v] to [0]\n        set [y velocity v] to [0]\n        go to x: (-214) y: (-90)\n    end\nend\n\nwhen flag clicked\n\nwhen I receive [animation code v]\nforever\n    if <(direction) = [r]> then\n        switch costume to (right side - 1 v)\n        repeat (14)\n            wait (0.075) seconds\n            next costume\n        end\n    else\n        if <(direction) = [l]> then\n            switch costume to (left side - 1 v)\n            repeat (14)\n                wait (0.075) seconds\n                next costume\n            end\n        end\n    end\nend\n\nwhen I receive [animation start v]\ngo to x: (-151) y: (-136)\nswitch costume to (sleeping v)\nshow\nset size to (100) %\n\nwhen I receive [wake up! v]\nswitch costume to (sleeping v)\nwait (3) seconds\nswitch costume to (right side - 1 v)\nwait (0.5) seconds\nswitch costume to (sleeping v)\nwait (1) seconds\nswitch costume to (right side - 1 v)\nwait (0.5) seconds\nswitch costume to (sleeping v)\nwait (1) seconds\nswitch costume to (right side - 1 v)\nbroadcast (z's away v)\nwait (0.5) seconds\nset [words v] to [1]\n\nset [words v] to [0]\n\nwhen I receive [claw v]\nrepeat until <(animation) = [done]>\n    switch costume to (surprised 1 v)\n    wait (0.5) seconds\n    switch costume to (surprised 2 v)\n    wait (0.5) seconds\nend\nswitch costume to (right side - 1 v)\nset [words v] to [2]\n\nbroadcast (Claw v)\n\nwhen I receive [drop code v]\nforever\n    if <(y position) = [-249]> then\n        go to x: (-214) y: (-51)\n    end\nend\n\nwhen I receive [boing! v]\nrepeat (10)\n    change y by (50)\n    change [y velocity v] by (50)\nend\n\nwhen I receive [shut down v]\nstop [other scripts in sprite v]\n\nwhen I receive [end v]\nswitch costume to (happy v)\ngo to x: (-32) y: (-66)\ngo to [front v] layer\nset size to (150) %\nturn left (15) degrees\n\ngo to x: (-53) y: (-83)\npoint in direction (90)\nturn left (15) degrees\nset size to (250) %\n\n@level\n\nwhen flag clicked\nset [level v] to [1]\nswitch costume to (costume1 v)\nshow\ngo to x: (36) y: (28)\nforever\n    switch costume to (level)\nend\n\n@THEPARAKEET01 intro\n\nwhen flag clicked\npoint in direction (90)\nhide\ngo to [front v] layer\ngo to x: (-677) y: (-10)\nswitch costume to (costume1 v)\nbroadcast (THEPARAKEET01 v)\n\nwhen I receive [theparakeet01 v]\nset [ghost v] effect to (0)\nset size to (500) %\npoint in direction (90)\nswitch costume to (costume1 v)\nhide\nstart sound [stranger things  v]\nset volume to (150) %\nwait (1) seconds\ngo to x: (-677) y: (-10)\nshow\nrepeat (25)\n    move (10) steps\n    wait (0.1) seconds\nend\nrepeat (10)\n    change [ghost v] effect by (10)\n    wait (0.1) seconds\nend\nhide\nswitch costume to (costume2 v)\ngo to x: (7) y: (207)\nset [ghost v] effect to (0)\nwait (1) seconds\nshow\nrepeat (25)\n    change y by (-10)\n    wait (0.15) seconds\nend\nrepeat (10)\n    change [ghost v] effect by (10)\n    wait (0.1) seconds\nend\nhide\nswitch costume to (costume3 v)\ngo to x: (362) y: (295)\nset [ghost v] effect to (0)\nwait (1) seconds\nshow\npoint in direction (45)\nrepeat (25)\n    change x by (-10)\n    change y by (-10)\n    wait (0.15) seconds\nend\nrepeat (10)\n    change [ghost v] effect by (10)\n    wait (0.1) seconds\nend\nhide\npoint in direction (90)\nswitch costume to (costume1 v)\ngo to x: (0) y: (-12)\nset [ghost v] effect to (0)\nwait (1) seconds\nshow\nrepeat (60)\n    change [ghost v] effect by (1)\n    change size by (-1)\n    wait (0.09) seconds\nend\nhide\nrepeat (100)\n    change volume by (-1)\nend\nstop all sounds\nset volume to (100) %\nbroadcast (animation start v)\n\nset size to (150) %\n\nmove (10) steps\n\nwhen I receive [end intro v]\nstop [other scripts in sprite v]\nhide\nrepeat (100)\n    change volume by (-1)\nend\nstop all sounds\nset volume to (100) %\nbroadcast (animation start v)\n\n@black\n\nwhen flag clicked\nshow\nset [ghost v] effect to (0)\n\nwhen I receive [animation start v]\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nhide\n\n@Sprite19\n\nwhen flag clicked\ngo to [front v] layer\nshow\ngo to x: (-144) y: (-138)\nforever\n    if <touching (mouse-pointer v)?> then\n        switch costume to (costume2 v)\n    else\n        switch costume to (costume1 v)\n    end\nend\n\nwhen this sprite clicked\nbroadcast (end intro v)\nhide\n\nwhen I receive [animation start v]\nhide\n\n@Lava element crystal\n\nwhen flag clicked\nhide\nforever\n    switch costume to (costume1 v)\n    wait (1) seconds\n    repeat (14)\n        next costume\n        wait (0.05) seconds\n    end\nend\n\nwhen I receive [animation start v]\ngo to x: (-28) y: (-148)\nshow\n\nwhen I receive [wind and lava hide v]\nhide\n\n@Earth elemental crystal\n\nwhen flag clicked\npoint in direction (90)\nset size to (100) %\nhide\nforever\n    switch costume to (costume1 v)\n    wait (1) seconds\n    repeat (14)\n        next costume\n        wait (0.05) seconds\n    end\nend\n\nwhen I receive [animation start v]\nshow\n\nwhen I receive [animation start v]\ngo to x: (15) y: (-148)\nshow\n\nwhen I receive [earth and water hide v]\nhide\n\nwhen I receive [gamestart v]\nforever\n    if <(level) = [7]> then\n        go to [front v] layer\n        go to x: (28) y: (-35)\n        show\n        repeat until <touching (the elemental v)?>\n            repeat (5)\n                change y by (2)\n                wait (0.05) seconds\n            end\n            repeat (10)\n                change y by (-2)\n                wait (0.05) seconds\n            end\n            repeat (5)\n                change y by (2)\n                wait (0.05) seconds\n            end\n        end\n        broadcast (you win v)\n        set size to (100) %\n        broadcast (shut down v)\n        broadcast (fly v)\n        play sound [51 Bowser Defeated \(NSMBWii\) v] until done\n        broadcast (end v)\n    end\nend\n\nwhen I receive [end v]\nstop [other scripts in sprite v]\ngo to x: (74) y: (-71)\ngo to [front v] layer\nset size to (200) %\nforever\n    stop all sounds\nend\n\nwhen I receive [fly v]\nrepeat (10)\n    change y by (10)\n    wait (0.05) seconds\nend\n\npoint in direction (90)\ngo to x: (117) y: (-54)\nturn right (15) degrees\nset size to (250) %\n\n@Water elemental crystal\n\nwhen flag clicked\nhide\nforever\n    switch costume to (costume1 v)\n    wait (1) seconds\n    repeat (14)\n        next costume\n        wait (0.05) seconds\n    end\nend\n\nwhen I receive [animation start v]\nshow\n\nwhen I receive [animation start v]\ngo to x: (58) y: (-148)\nshow\n\nwhen I receive [earth and water hide v]\nhide\n\n@Wind elemental crystal\n\nwhen flag clicked\nhide\nforever\n    switch costume to (costume1 v)\n    wait (1) seconds\n    repeat (14)\n        next costume\n        wait (0.05) seconds\n    end\nend\n\nwhen I receive [animation start v]\nshow\n\nwhen I receive [animation start v]\ngo to x: (100) y: (-148)\nshow\n\nwhen I receive [wind and lava hide v]\nhide\n\n@dialouge\n\nwhen flag clicked\ngo to [back v] layer\nhide\ngo to x: (0) y: (103)\nforever\n    hide\n    go to [front v] layer\n    if <(words) = [1]> then\n        show\n        go to [front v] layer\n        repeat until <(words) = [0]>\n            switch costume to (costume1 v)\n            wait (0.5) seconds\n            switch costume to (costume2 v)\n            wait (0.5) seconds\n        end\n    end\n    if <(words) = [2]> then\n        show\n        go to [front v] layer\n        repeat until <(words) = [0]>\n            switch costume to (costume3 v)\n            wait (0.5) seconds\n            switch costume to (costume4 v)\n            wait (0.5) seconds\n        end\n    end\nend\n\nwhen this sprite clicked\nhide\nif <(words) = [1]> then\n    broadcast (Claw v)\n    set [words v] to [0]\n    hide\nend\nif <(words) = [2]> then\n    broadcast (gamestart v)\n    set [words v] to [0]\n    hide\nend\n\n@Zzz\n\nwhen I receive [animation start v]\nset size to (25) %\nforever\n    create clone of (_myself_ v)\n    wait (1) seconds\nend\n\nwhen flag clicked\nhide\ndelete this clone\n\nwhen I start as a clone\nset [ghost v] effect to (0)\nshow\nset size to (25) %\ngo to x: (-138) y: (-91)\nrepeat (20)\n    change x by (5)\n    change y by (5)\n    change [ghost v] effect by (5)\n    wait (0.05) seconds\nend\ndelete this clone\n\nwhen I receive [z's away v]\nforever\n    stop [other scripts in sprite v]\n    hide\n    delete this clone\nend\n\n@shadow\n\nwhen flag clicked\nset [animation v] to [0]\nhide\n\nwhen I receive [shadow v]\ngo to x: (700) y: (135)\nset [ghost v] effect to (50)\nshow\nrepeat until <touching (the elemental v)?>\n    go to [front v] layer\n    move (-1) steps\n    wait (0.05) seconds\nend\nbroadcast (WAKE UP! v)\nrepeat (999)\n    move (-1) steps\n    wait (0.05) seconds\nend\n\nwhen I receive [ship runs away v]\nstop [other scripts in sprite v]\nrepeat (80)\n    move (10) steps\n    wait (0.05) seconds\nend\nhide\nset [animation v] to [done]\n\n@The Claw\n\nwhen flag clicked\ngo to x: (36) y: (279)\nhide\n\nwhen I receive [claw v]\nswitch costume to (costume1 v)\ngo to x: (36) y: (279)\nshow\ngo to [front v] layer\nrepeat (27)\n    change y by (-10)\n    wait (0.05) seconds\nend\nrepeat (4)\n    next costume\n    wait (0.05) seconds\nend\nchange y by (-10)\nwait (0.05) seconds\nwait (0.5) seconds\nrepeat (2)\n    next costume\n    wait (0.05) seconds\nend\nbroadcast (wind and lava hide v)\nrepeat (2)\n    next costume\n    wait (0.05) seconds\nend\nbroadcast (earth and water hide v)\nrepeat (28)\n    change y by (10)\n    wait (0.05) seconds\nend\nhide\nbroadcast (ship runs away v)\n\n@Sprite1\n\nwhen flag clicked\nhide\nset size to (150) %\ngo to x: (7) y: (-121)\n\nwhen I receive [gamestart v]\nforever\n    switch costume to (costume1 v)\n    if <(level) = [6]> then\n        show\n        repeat until <(level) = [7]>\n            if <touching (the elemental v)?> then\n                if <touching color (#6f4e00)?> then\n                    broadcast (boing! v)\n                    repeat (3)\n                        next costume\n                        wait (0.05) seconds\n                    end\n                    switch costume to (costume1 v)\n                end\n            end\n        end\n    else\n        hide\n    end\nend\n\n@winner's circle\n\nwhen flag clicked\nhide\nset size to (100) %\n\nwhen I receive [end v]\nswitch costume to (costume1 v)\nshow\ngo to x: (3) y: (2)\n\n@Sprite2\n\nwhen flag clicked\ngo to x: (3) y: (-138)\nhide\n\n
Use arrow keys or Wasd to move\n\nThis is the first in a 5 part series, I hope you enjoy!\n\nLink to next part: https://scratch.mit.edu/projects/422954421/\nLink to part three: https://scratch.mit.edu/projects/431720849/\nLink to part four: https://scratch.mit.edu/projects/436354428\nLink to finale: https://scratch.mit.edu/projects/438117478\n\nWhen The Elemental (Who you play as) says something, click it to make it go away and continue the game.