The Incredibles || A Platformer
@Stage\n\nwhen I receive [jungle v]\nswitch backdrop to (jungle v)\nrepeat (50)\n    change volume by (-2)\nend\nstop all sounds\nwait (0.5) seconds\nset volume to (100) %\nrepeat until <(backdrop [name v]) = [lava]>\n    play sound [Off to Work - 7.mp3 v] until done\nend\n\nwhen I receive [start v]\nswitch backdrop to (city v)\nset volume to (100) %\nrepeat until <(backdrop [name v]) = [jungle]>\n    play sound [The Incredibles - Theme Song \(Audio\).mp3 v] until done\nend\n\nwhen flag clicked\nset volume to (100) %\nswitch backdrop to (intro v)\n\nwhen I receive [lava v]\nswitch backdrop to (lava v)\nrepeat (50)\n    change volume by (-2)\nend\nstop all sounds\nwait (0.5) seconds\nset volume to (100) %\nrepeat until <(backdrop [name v]) = [water]>\n    play sound [Life's Incredible Again - 6.mp3 v] until done\nend\n\nwhen I receive [end v]\nswitch backdrop to (intro v)\n\n@Thumbnail\n\nwhen flag clicked\ngo to x: (0) y: (0)\nforever\n    show\n    set [ghost v] effect to (100)\n    go to [front v] layer\nend\n\n@portal\n\nwhen flag clicked\ngo to x: (190) y: (-120)\nhide\n\nwhen I receive [start v]\nshow\nforever\n    change y by ([sin v] of (Lift) )\n    change size by ([cos v] of (Lift) )\n    change [lift v] by (10)\nend\n\n@slide\n\nwhen I receive [logo end v]\nwait (1) seconds\ngo to [front v] layer\ngo to x: (0) y: (345)\nshow\nrepeat (50)\n    change y by (((-1) - (y position)) / (9))\nend\nwait (4) seconds\nbroadcast (start v)\nrepeat (10)\n    change y by (((500) - (y position)) / (9))\nend\nhide\n\nwhen flag clicked\nhide\n\nwhen I receive [next level v]\ngo to [front v] layer\ngo to x: (0) y: (345)\nshow\nrepeat (50)\n    change y by (((-1) - (y position)) / (9))\nend\nwait (1) seconds\nrepeat (10)\n    change y by (((500) - (y position)) / (9))\nend\nhide\n\n@Player\n\nwhen flag clicked\nhide\n\nwhen flag clicked\nswitch costume to (mr. incredible v)\nforever\n    if <key (1 v) pressed?> then\n        switch costume to (mr. incredible v)\n    end\n    if <key (2 v) pressed?> then\n        switch costume to (elastigirl v)\n    end\n    if <key (3 v) pressed?> then\n        switch costume to (dash v)\n    end\n    if <key (4 v) pressed?> then\n        switch costume to (violet v)\n    end\n    if <key (5 v) pressed?> then\n        switch costume to (jack-jack v)\n    end\nend\n\nwhen I receive [start v]\ngo to x: (-208) y: (100)\nshow\npoint in direction (90)\nset [yv v] to [0]\nset [xv v] to [0]\nforever\n    change [yv v] by (-0.5)\n    if <key (right arrow v) pressed?> then\n        point in direction (90)\n        change [xv v] by (0.7)\n    end\n    if <key (left arrow v) pressed?> then\n        point in direction (-90)\n        change [xv v] by (-0.7)\n    end\n    set [xv v] to ((Xv) * (0.9))\n    change x by (Xv)\n    if <touching color (#000000)?> then\n        change y by (1)\n        if <touching color (#000000)?> then\n            change y by (1)\n            if <touching color (#000000)?> then\n                change y by (1)\n                if <touching color (#000000)?> then\n                    change y by (1)\n                    if <touching color (#000000)?> then\n                        change y by (1)\n                        if <touching color (#000000)?> then\n                            change x by ((Xv) * (-1))\n                            change x by (-1)\n                            change y by (-5)\n                            if <touching (ground v)?> then\n                                change x by (Change)\n                            end\n                            change x by (1)\n                            if <key (up arrow v) pressed?> then\n                                if <(Xv) > [0]> then\n                                    set [xv v] to [-8]\n                                else\n                                    set [xv v] to [8]\n                                end\n                                set [yv v] to [10]\n                            else\n                                set [xv v] to [0]\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\n    change y by (Yv)\n    if <touching color (#000000)?> then\n        change y by ((Yv) * (-1))\n        set [yv v] to [0]\n    end\n    change y by (-1)\n    if <touching color (#000000)?> then\n        if <key (up arrow v) pressed?> then\n            set [yv v] to [10]\n        end\n    end\n    if <touching color (#ee263d)?> then\n        set [yv v] to [0]\n        set [xv v] to [0]\n        go to x: (-208) y: (200)\n        show\n    end\n    if <touching color (#000000)?> then\n        go to [front v] layer\n        if <key (up arrow v) pressed?> then\n            set [yv v] to [10]\n        else\n            set [yv v] to [-1]\n        end\n    end\n    if <touching (portal v)?> then\n        broadcast (next level v)\n        hide\n        wait (3) seconds\n        show\n        go to x: (-208) y: (200)\n    end\n    change y by (1)\nend\n\nwhen I receive [next level v]\n\n@ground\n\nwhen flag clicked\nswitch costume to (costume2 v)\ngo to x: (0) y: (0)\ngo to [front v] layer\nhide\n\nwhen I receive [start v]\nshow\n\nwhen I receive [next level v]\nwait (1) seconds\nnext costume\n\nwhen flag clicked\nforever\n    if <(costume [number v]) = [6]> then\n        broadcast (jungle v) and wait\n    end\nend\n\nwhen flag clicked\nforever\n    if <(costume [number v]) = [11]> then\n        broadcast (lava v) and wait\n    end\nend\n\nwhen flag clicked\nforever\n    if <(costume [number v]) = [16]> then\n        broadcast (end v) and wait\n    end\nend\n\n@Intro\n\nwhen I start as a clone\nset size to (100) %\nshow\nif <(costume [number v]) = [2]> then\n    go to x: (0) y: (500)\n    go to [front v] layer\n    repeat (50)\n        change y by (((-1) - (y position)) / (7))\n    end\n    go [backward v] (3) layers\n    hide\n    delete this clone\nend\nif <(costume [number v]) = [3]> then\n    wait (0.2) seconds\n    go to x: (0) y: (500)\n    go to [front v] layer\n    repeat (50)\n        change y by (((-1) - (y position)) / (7))\n    end\n    go [backward v] (2) layers\n    hide\n    delete this clone\nend\nif <(costume [number v]) = [4]> then\n    wait (0.4) seconds\n    go to x: (0) y: (500)\n    go to [front v] layer\n    repeat (50)\n        change y by (((-1) - (y position)) / (7))\n    end\n    go [backward v] (1) layers\n    hide\n    delete this clone\nend\nif <(costume [number v]) = [5]> then\n    wait (0.5) seconds\n    go to x: (0) y: (500)\n    go to [front v] layer\n    repeat (50)\n        change y by (((-1) - (y position)) / (7))\n    end\n    hide\n    delete this clone\nend\nif <(costume [number v]) = [6]> then\n    wait (0.6) seconds\n    go to x: (0) y: (500)\n    go to [front v] layer\n    repeat (50)\n        change y by (((-1) - (y position)) / (7))\n    end\n    broadcast (logo slide v)\n    wait (2) seconds\n    hide\n    delete this clone\nend\nif <(costume [number v]) = [7]> then\n    set [ghost v] effect to (0)\n    go to x: (500) y: (0)\n    go to [front v] layer\n    show\n    repeat (25)\n        change x by (((0) - (x position)) / (4))\n    end\n    repeat (10)\n        change [ghost v] effect by (10)\n    end\n    broadcast (logo show v)\n    hide\nend\n\nwhen flag clicked\nset size to (100) %\nswitch costume to (1 v)\ngo to [front v] layer\ngo to x: (0) y: (345)\nshow\nrepeat (50)\n    change y by (((-1) - (y position)) / (7))\nend\nrepeat (5)\n    next costume\n    create clone of (_myself_ v)\nend\nwait (1) seconds\nhide\n\nwhen I receive [logo slide v]\nhide\nswitch costume to (7 v)\ncreate clone of (_myself_ v)\n\nwhen I receive [logo end v]\nrepeat (50)\n    change volume by (-2)\nend\nwait (1) seconds\nstop all sounds\nwait (1) seconds\nset volume to (100) %\n\nwhen I receive [logo show v]\nset size to (100) %\ngo to x: (0) y: (0)\ngo to [front v] layer\nswitch costume to (logo v)\nshow\nwait (1) seconds\nrepeat (10)\n    change size by (-5)\nend\nrepeat (10)\n    change size by (5)\nend\nrepeat (5)\n    change size by (-1)\nend\nrepeat (5)\n    change size by (1)\nend\nbroadcast (confetti v)\nwait (5) seconds\nbroadcast (logo end v)\nrepeat (10)\n    turn right ((3.45) - ((direction) * (0.2))) degrees\n    change size by ((-2) - ((size) / (5)))\n    change [ghost v] effect by (10)\nend\nhide\npoint in direction (90)\n\nwhen flag clicked\nplay sound [The Incredits \(From the Incredibles\).mp3 v] until done\nset volume to (100) %\n\nwhen I receive [logo end v]\nrepeat (50)\n    change volume by (-2)\nend\nstop all sounds\n\n@Confetti\n\nwhen I start as a clone\nset [color v] to (pick random (0) to (4))\nforever\n    switch costume to ((1) + ((color) * (5)))\n    repeat (4)\n        next costume\n    end\n    repeat (4)\n        switch costume to ((costume [number v]) - (1))\n    end\nend\n\ndefine delete\ndelete this clone\n\nwhen I receive [confetti v]\nstop [other scripts in sprite v]\ndelete\nhide\nforever\n    repeat (30)\n        go to x: (pick random (-100) to (100)) y: (200)\n        create clone of (_myself_ v)\n    end\nend\n\nwhen I start as a clone\npoint in direction (pick random (0) to (360))\nset size to (50) %\ngo to [front v] layer\nshow\nset [particle y vel v] to [0]\nset [y speed v] to ((pick random (-6) to (-2)) / (10))\nrepeat (pick random (25) to (40))\n    change [particle y vel v] by (y speed)\n    change y by (particle y vel)\nend\ndelete this clone\n\nwhen flag clicked\nhide\n\nwhen I receive [logo end v]\nstop [other scripts in sprite v]\ndelete this clone\n\n