Blizzard | Scrolling Platformer
@Stage\n\nchange [brightness v] effect by (0.1)\n\nchange [color v] effect by (25)\n\nset [mosaic v] effect to (0)\n\nwhen I receive [start v]\nrepeat (10)\n    change volume by (-10)\nend\n\nwhen I receive [game v]\nswitch backdrop to (backdrop2 v)\nset volume to (100) %\nforever\n    play sound [Main Menu v] until done\nend\n\nwhen flag clicked\nswitch backdrop to (backdrop1 v)\n\n@player\n\nwhen flag clicked\nset [xv v] to [0]\nset [yv v] to [0]\nset [scroll x v] to [230]\nset [scroll y v] to [30]\nset size to (100) %\nshow\n\nwhen flag clicked\n\nwhen flag clicked\n\nwhen flag clicked\n\ngo to [front v] layer\n\nwhen flag clicked\n\nif <touching (spikes v)?> then\n\nbroadcast (dead v)\nset [x v] to [0]\nset [y v] to [0]\n\nif <touching color (#fffa00)?> then\n    set [yv v] to [19]\nend\n\nwhen flag clicked\n\nwhen I receive [next v]\n\nwhen flag clicked\n\nif <<key (up arrow v) pressed?> or <key (w v) pressed?>> then\n    set [yv v] to [10]\nend\n\nwhen flag clicked\n\nwhen flag clicked\n\nwhen I receive [start v]\nset [pixelate v] effect to (0)\nforever\n    switch costume to (pick random (1) to (5))\n    if <(glitch) = [1]> then\n        if <<key (left arrow v) pressed?> or <key (a v) pressed?>> then\n            change [xv v] by (-1)\n        end\n        if <<key (right arrow v) pressed?> or <key (d v) pressed?>> then\n            change [xv v] by (1)\n        end\n        set [xv v] to ((Xv) * (0.9))\n        change x by (Xv)\n        if  then\n            change y by (1)\n            if  then\n                change y by (1)\n                if  then\n                    change y by (1)\n                    if  then\n                        change y by (1)\n                    end\n                    if  then\n                        change y by (1)\n                        if  then\n                            change x by ((Xv) * (-1))\n                            change y by (-5)\n                            if <<key (up arrow v) pressed?> or <key (w v) pressed?>> then\n                                if <(Xv) > [0]> then\n                                    set [xv v] to [-5]\n                                else\n                                    set [xv v] to [5]\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        change [yv v] by (-1)\n        change y by (Yv)\n        if  then\n            change y by ((Yv) * (-1))\n            set [yv v] to [0]\n        end\n        change y by (-1)\n        if  then\n            if <<key (up arrow v) pressed?> or <key (w v) pressed?>> then\n                set [yv v] to [10]\n            end\n        end\n        change y by (1)\n        change [scroll x v] by ((x position) * (-1))\n        change [scroll y v] by ((y position) * (-1))\n        go to x: (0) y: (0)\n        if <touching (spikes v)?> then\n            broadcast (dead v)\n            repeat (20)\n                change [ghost v] effect by (5)\n            end\n            set [ghost v] effect to (0)\n            set [scroll x v] to [230]\n            set [scroll y v] to [30]\n            set [xv v] to [0]\n            set [yv v] to [0]\n        end\n    end\nend\n\nwhen I receive [start v]\nshow\nforever\n    switch costume to (pick random (1) to (5))\n    if <(glitch) = [0]> then\n        if <<key (left arrow v) pressed?> or <key (a v) pressed?>> then\n            change [xv v] by (-1)\n        end\n        if <<key (right arrow v) pressed?> or <key (d v) pressed?>> then\n            change [xv v] by (1)\n        end\n        set [xv v] to ((Xv) * (0.9))\n        change x by (Xv)\n        if <<touching (floor v)?> or <touching (level v)?>> then\n            change y by (1)\n            if <<touching (floor v)?> or <touching (level v)?>> then\n                change y by (1)\n                if <<touching (floor v)?> or <touching (level v)?>> then\n                    change y by (1)\n                    if <<touching (floor v)?> or <touching (level v)?>> then\n                        change y by (1)\n                    end\n                    if <<touching (floor v)?> or <touching (level v)?>> then\n                        change y by (1)\n                        if <<touching (floor v)?> or <touching (level v)?>> then\n                            change x by ((Xv) * (-1))\n                            change y by (-5)\n                            if <<key (up arrow v) pressed?> or <key (w v) pressed?>> then\n                                if <(Xv) > [0]> then\n                                    set [xv v] to [-5]\n                                else\n                                    set [xv v] to [5]\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        change [yv v] by (-1)\n        change y by (Yv)\n        if <<touching (floor v)?> or <touching (level v)?>> then\n            change y by ((Yv) * (-1))\n            set [yv v] to [0]\n        end\n        change y by (-1)\n        if <<touching (floor v)?> or <touching (level v)?>> then\n            if <<key (up arrow v) pressed?> or <key (w v) pressed?>> then\n                set [yv v] to [10]\n            end\n        end\n        change y by (1)\n        change [scroll x v] by ((x position) * (-1))\n        change [scroll y v] by ((y position) * (-1))\n        go to x: (0) y: (0)\n        if <touching (spikes v)?> then\n            broadcast (dead v)\n            repeat (20)\n                change [ghost v] effect by (5)\n            end\n            set [ghost v] effect to (0)\n            set [scroll x v] to [230]\n            set [scroll y v] to [30]\n            set [xv v] to [0]\n            set [yv v] to [0]\n        end\n    end\nend\n\nwhen I receive [start v]\nforever\n    if <touching (next v)?> then\n        wait () seconds\n        set size to (100) %\n        point in direction (90)\n        set [pixelate v] effect to (0)\n        set [scroll x v] to [230]\n        set [scroll y v] to [30]\n        set [xv v] to [0]\n        set [yv v] to [0]\n        broadcast (next v)\n        wait () seconds\n    end\nend\n\nwhen I receive [start v]\nforever\n    broadcast (tick v)\nend\n\nwhen I receive [start v]\nwait (1) seconds\nforever\n    play sound [Xenogenesis v] until done\nend\n\nwhen I receive [start v]\nwait (1) seconds\nforever\n    play sound [blizzard v] until done\nend\n\nwhen flag clicked\nhide\n\n@floor\n\nwhen flag clicked\nswitch costume to (1 v)\nforever\n    if <(Scroll X) > [275]> then\n        set [scroll x v] to [274]\n    end\n    if <(Scroll X) < [-373]> then\n        set [scroll x v] to [-374]\n    end\nend\n\ngo to x: (0) y: (Scroll Y)\n\nwhen I receive [next v]\nnext costume\nwait (0.1) seconds\n\nwhen I receive [tick v]\nshow\ngo to x: (Scroll X) y: (Scroll Y)\nif <(Scroll X) > [275]> then\n    set [scroll x v] to [274]\nend\nif <(Scroll X) < [-373]> then\n    set [scroll x v] to [-374]\nend\n\nwhen flag clicked\nforever\n    if <(costume [number v]) = [11]> then\n        broadcast (end v)\n    end\nend\n\nwhen flag clicked\nhide\n\n@next\n\nwhen flag clicked\nset [ghost v] effect to (0)\ngo to x: (240) y: (21)\nhide\n\nwhen I receive [tick v]\nshow\ngo to x: ((Scroll X) + (300)) y: ((Scroll Y) + (-50))\n\nwhen I receive [end v]\nhide\n\n@Sprite1\n\nwhen flag clicked\nhide\n\nwhen I receive [start v]\nshow\n\n@spikes\n\nwhen I receive [tick v]\nshow\ngo to x: (Scroll X) y: (Scroll Y)\n\nwhen I receive [next v]\nnext costume\nwait (0.01) seconds\n\nwhen flag clicked\nswitch costume to (1 v)\n\n@Sprite3\n\nwhen I receive [start v]\nrepeat (10)\n    change [ghost v] effect by (10)\nend\n\nwhen I receive [game v]\nshow\nset [ghost v] effect to (0)\nswitch costume to (costume1 v)\ngo to x: (0) y: (0)\nforever\n    set [my variable v] to [0]\n    set size to (105) %\n    forever\n        change [my variable v] by (4)\n        point in direction ((90) - ([cos v] of (my variable) ))\n    end\nend\n\nwhen flag clicked\nhide\n\n@Sprite4\n\nwhen I receive [game v]\nshow\nforever\n    if <touching (mouse-pointer v)?> then\n        set [brightness v] effect to (5)\n    else\n        set [brightness v] effect to (0)\n    end\nend\n\nwhen I receive [game v]\nforever\n    if <<mouse down?> and <touching (mouse-pointer v)?>> then\n        broadcast (start v)\n        repeat (10)\n            change [ghost v] effect by (10)\n        end\n    end\nend\n\nwhen I receive [game v]\nshow\nset [ghost v] effect to (60)\nforever\n    point in direction ((90) - ([cos v] of (my variable) ))\nend\n\nwhen flag clicked\nhide\n\n@Mist\n\nwhen flag clicked\nhide\n\nwhen I receive [game v]\nshow\nset size to (150) %\nforever\n    set [ghost v] effect to (20)\n    glide (.5) secs to x: (pick random (-100) to (100)) y: (pick random (-100) to (100))\nend\n\n@Thumbnail\n\nwhen flag clicked\nforever\n    set [ghost v] effect to (100)\n    go to [front v] layer\nend\n\n@IntroNew\n\nwhen flag clicked\nstart sound [OST-Xenogen v]\nwait (.5) seconds\nset [size v] to [1]\nset [spin v] to [1000]\nrepeat (100)\n    point in direction ((Spin) * (0.9))\n    set [spin v] to ((Spin) * (0.9))\nend\n\nwhen flag clicked\nset volume to (100) %\nwait (6) seconds\nrepeat (40)\n    change volume by (-2.5)\nend\nstop all sounds\n\nwhen flag clicked\nswitch backdrop to (backdrop1 v)\nhide\nwait (.5) seconds\nshow\nswitch costume to (costume1 v)\ncreate clone of (_myself_ v)\nset [ghost v] effect to (0)\nset [size v] to [1]\nset size to (15) %\nrepeat (20)\n    change size by ((Size) * (0.9))\n    set [size v] to ((Size) * (1.05))\nend\nrepeat (80)\n    change size by ((Size) * (0.9))\n    set [size v] to ((Size) * (0.95))\nend\nwait (3) seconds\nset [size v] to [-1]\nset [spin v] to [2]\nrepeat (20)\n    change [ghost v] effect by (5)\n    change size by ((Size) * (0.9))\n    set [size v] to ((Size) * (1.05))\n    set [spin v] to ((Spin) * (1.3))\nend\nhide\nwait (1) seconds\nbroadcast (Game v)\n\nwhen I start as a clone\nset size to (100) %\nset [loc v] to [200]\nswitch costume to (costume2 v)\nrepeat (100)\n    point in direction ((Spin) * (0.9))\n    set y to ((LOC) * (0.9))\n    set [loc v] to ((LOC) * (0.9))\nend\nwait (3) seconds\nrepeat (80)\n    change [ghost v] effect by (5)\n    change size by ((Size) * (0.9))\n    point in direction ((Spin) * (1.2))\nend\ndelete this clone\n\n