Bloom - A Platformer


@Stage\n\n@Thumbnail\n\nwhen flag clicked\nhide\ngo to x: (0) y: (0)\n\nwhen flag clicked\nforever\n    play sound [Tropics  v] until done\nend\n\n@Background for Start\n\nwhen flag clicked\nshow\ngo to [front v] layer\ngo [backward v] (1) layers\ngo to x: (0) y: (0)\nset [brightness v] effect to (100)\n\nwhen I receive [game start v]\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nhide\n\nwhen I receive [begin v]\nrepeat (10)\n    change [brightness v] effect by (-10)\nend\n\n@Title\n\nwhen flag clicked\ngo to x: (0) y: (0)\nset [ghost v] effect to (100)\nhide\n\nwhen I receive [game start v]\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nhide\n\nwhen I receive [begin v]\ngo to [front v] layer\nshow\nrepeat (10)\n    change [ghost v] effect by (-10)\nend\nforever\n    glide (1) secs to x: (0) y: (20)\n    glide (1) secs to x: (0) y: (0)\nend\n\n@Play Button\n\nwhen flag clicked\ngo to x: (0) y: (0)\nhide\nset [ghost v] effect to (100)\n\nwhen flag clicked\nforever\n    if <touching (mouse-pointer v)?> then\n        switch costume to (costume2 v)\n        set size to (110) %\n    end\n    if <not <touching (mouse-pointer v)?>> then\n        switch costume to (costume1 v)\n        set size to (100) %\n    end\nend\n\nwhen this sprite clicked\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nbroadcast (Game Start v)\nhide\n\nwhen I receive [begin v]\nrepeat (10)\n    change [ghost v] effect by (-10)\nend\nshow\ngo to [front v] layer\n\n@Player\n\nwhen I receive [game start v]\ngo to x: (-209) y: (-87)\nset [x-velocity v] to [0]\nset [y-velocity v] to [0]\nforever\n    change [y-velocity v] by (-0.7)\n    if <key (right arrow v) pressed?> then\n        change [x-velocity v] by (1)\n    end\n    if <key (left arrow v) pressed?> then\n        change [x-velocity v] by (-1)\n    end\n    set [x-velocity v] to ((X-Velocity) * (0.85))\n    change x by (X-Velocity)\n    if <touching color (#4b9c1c)?> then\n        change y by (1)\n        if <touching color (#4b9c1c)?> then\n            change y by (1)\n            if <touching color (#4b9c1c)?> then\n                change y by (1)\n                if <touching color (#4b9c1c)?> then\n                    change y by (1)\n                    if <touching color (#4b9c1c)?> then\n                        change y by (1)\n                        if <touching color (#4b9c1c)?> then\n                            change y by (1)\n                            if <touching color (#4b9c1c)?> then\n                                change y by (-6)\n                                if <key (up arrow v) pressed?> then\n                                    set [y-velocity v] to [10]\n                                    if <(X-Velocity) > [0]> then\n                                        set [x-velocity v] to [-10]\n                                    else\n                                        set [x-velocity v] to [10]\n                                    end\n                                else\n                                    change x by ((X-Velocity) * (-1))\n                                    set [x-velocity v] to [0]\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\n    change y by (Y-Velocity)\n    if <touching color (#4b9c1c)?> 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 color (#4b9c1c)?> and <key (up arrow v) pressed?>> then\n        set [y-velocity v] to [12]\n    end\n    change y by (1)\nend\n\nwhen I receive [game start v]\nforever\n    if <touching (thingy v)?> then\n        go to x: (-209) y: (-87)\n        broadcast (Next Level v)\n    end\nend\n\nwhen I receive [game start v]\nforever\n    if <<touching color (#ff2727)?> or <touching color (#3e8117)?>> then\n        go to x: (-209) y: (-87)\n    end\nend\n\nwhen I receive [game start v]\nforever\n    if <key (r v) pressed?> then\n        go to x: (-209) y: (-87)\n    end\n    if <[-183] = (y position)> then\n        go to x: (-209) y: (-87)\n    end\nend\n\nset [gravity v] to [-.3]\nset [velocity v] to [0]\nset [bounce count v] to [0]\nforever\n    if <touching color (#4b9c1c)?> then\n        if <(Bounce Count) < [0]> then\n            set [velocity v] to ((Velocity) * (-1))\n            set y to ((y position) + (Velocity))\n            set [velocity v] to ((Velocity) / (5))\n            change [bounce count v] by (0)\n        else\n            set [velocity v] to [0]\n        end\n    else\n        set [velocity v] to ((Velocity) + (Gravity))\n        set y to ((y position) + (Velocity))\n    end\n    if <key (right arrow v) pressed?> then\n        set [horzvelocity v] to [4]\n    end\n    if <key (left arrow v) pressed?> then\n        set [horzvelocity v] to [-4]\n    end\n    if <<not <key (right arrow v) pressed?>> and <not <key (left arrow v) pressed?>>> then\n        set [horzvelocity v] to ((HorzVelocity) * (0.7))\n    end\n    change x by (HorzVelocity)\n    if <touching color (#4b9c1c)?> then\n        set [bounce count v] to [0]\n        set [velocity v] to [7]\n        set y to ((y position) + (Velocity))\n    end\nend\n\n@Levels\n\nwhen flag clicked\nswitch costume to (level 1 v)\ngo to x: (0) y: (0)\n\nwhen I receive [next level v]\nnext costume\n\n@Thingy\n\n@Flowers\n\nwhen flag clicked\nforever\n    go to (player v)\nend\n\nwhen I start as a clone\nset size to (pick random (60) to (100)) %\nshow\nwait (0.1) seconds\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nhide\ndelete this clone\n\nwhen flag clicked\nforever\n    if <<key (left arrow v) pressed?> or <key (right arrow v) pressed?>> then\n        wait (0.2) seconds\n        create clone of (_myself_ v)\n    end\nend\n\n@Clouds\n\nwhen flag clicked\nhide\n\nwhen I receive [game start v]\nset [ghost v] effect to (50)\ngo to [back v] layer\nshow\ngo to x: (-66) y: (90)\nforever\n    glide (25) secs to x: (356) y: (90)\n    go to x: (-365) y: (90)\nend\n\n@Intro\n\nwhen flag clicked\nshow\ngo to [front v] layer\nswitch costume to (costume1 v)\ngo to x: (0) y: (295)\nglide (1) secs to x: (0) y: (5)\ncreate clone of (_myself_ v)\nswitch costume to (costume2 v)\ngo to x: (0) y: (-295)\nglide (1) secs to x: (0) y: (-50)\nset size to (110) %\nwait (0.2) seconds\nset size to (100) %\nwait (1) seconds\nglide (1) secs to x: (295) y: (-50)\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nhide\nbroadcast (Begin v)\n\nwhen I start as a clone\nwait (2.2) seconds\nglide (1) secs to x: (-295) y: (5)\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nhide\n\n