Grow It! (A platformer) v1.0
@Stage\n\nwhen flag clicked\nset volume to (30) %\nforever\n    play sound [Pop Exctasy - Outside \(Instrumental Version\) my-free-mp3s v] until done\nend\n\n@Player\n\nwhen flag clicked\nset [game_level v] to [1]\nset [yv v] to [0]\ngo to x: (0) y: (0)\nhide\nbroadcast (levelStartSwitch v)\nshow\nset [character?? v] to [1]\nset [size? v] to [20]\nforever\n    set size to (Size?) %\n    set rotation style [don't rotate v]\n    switch costume to (hitbox v)\n    set [ghost v] effect to (0)\n    if <<(x position) > [230]> and <(SeedsCollected?) = (SeedsToCollect?)>> then\n        change [game_level v] by (1)\n        broadcast (levelStartSwitch v)\n        wait (0.3) seconds\n        broadcast (Render v)\n    end\n    if <<key (right arrow v) pressed?> or <key (d v) pressed?>> then\n        point in direction (90)\n        change [xv v] by (0.7)\n    end\n    if <<key (left arrow v) pressed?> or <key (a 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 (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 ((XV) * (-1))\n                            change y by (-5)\n                        end\n                    end\n                end\n            end\n        end\n    end\n    if <<touching (enemy v)?> or <touching (bad v)?>> then\n        broadcast (-1Life v)\n        broadcast (levelStartSwitch v)\n    end\n    if <not <touching (ladder v)?>> then\n        change [yv v] by (-1)\n    end\n    change y by (YV)\n    if <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 <<key (up arrow v) pressed?> or <key (w v) pressed?>> then\n        if <touching (level v)?> then\n            set [yv v] to [13]\n        end\n    end\n    switch costume to (Character??)\n    change y by (1)\n    set rotation style [left-right v]\n    if <(y position) < [-175]> then\n        broadcast (levelStartSwitch v)\n    end\nend\n\nwhen I receive [levelstartswitch v]\nset [yv v] to [0]\nset [xv v] to [0]\nif <(Game_Level) = [1]> then\n    go to x: (-165) y: (-113)\nend\nif <(Game_Level) = [2]> then\n    go to x: (-230) y: (-90)\nend\nif <(Game_Level) = [3]> then\n    go to x: (-230) y: (-90)\nend\nif <(Game_Level) = [4]> then\n    go to x: (-230) y: (-90)\nend\nif <(Game_Level) = [5]> then\n    go to x: (-230) y: (-23)\nend\nif <(Game_Level) = [6]> then\n    go to x: (-230) y: (-23)\nend\nif <(Game_Level) = [7]> then\n    go to x: (-230) y: (-161)\nend\nif <(Game_Level) = [8]> then\n    go to x: (-230) y: (54)\nend\nif <(Game_Level) = [9]> then\n    go to x: (-230) y: (54)\nend\nif <(Game_Level) = [10]> then\n    go to x: (0) y: (-163)\nend\n\nwhen flag clicked\nforever\n    if <<key (g v) pressed?> and <(Size?) < [40]>> then\n        change [size? v] by (2)\n    end\n    if <<key (h v) pressed?> and <(Size?) > [5]>> then\n        change [size? v] by (-2)\n    end\nend\n\nwhen [space v] key pressed\nchange [character?? v] by (1)\nif <(Character??) > [2]> then\n    set [character?? v] to [1]\nend\n\nwhen I receive [bounce!! v]\nset [yv v] to [22]\n\n@Enemy\n\nset [animationframe? v] to [0]\n\nwhen I start as a clone\nset [yv v] to [0]\nshow\nset [animationframe? v] to [1]\nforever\n    set [size? v] to [30]\n    set size to (Size?) %\n    set rotation style [don't rotate v]\n    set [ghost v] effect to (0)\n    set [xv v] to ((XV) * (0.9))\n    change x by (XV)\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 ((XV) * (-1))\n                            change y by (-5)\n                        end\n                    end\n                end\n            end\n        end\n    end\n    if <not <touching (ladder v)?>> then\n        change [yv v] by (-1)\n    end\n    change y by (YV)\n    if <touching (level v)?> then\n        change y by ((YV) * (-1))\n        set [yv v] to [0]\n    end\n    change y by (-1)\n    switch costume to (AnimationFrame?)\n    change y by (1)\n    set rotation style [left-right v]\nend\n\nwhen I start as a clone\nforever\n    set [animationframe? v] to [1]\n    wait (0.2) seconds\n    repeat (1)\n        change [animationframe? v] by (1)\n        wait (0.1) seconds\n    end\nend\n\nwhen I start as a clone\n\ndefine Enemy at X (x) Y (y) WalkngRng (#)\nset [enemy walking range v] to (#)\ngo to x: (x) y: (y)\ncreate clone of (_myself_ v)\nhide\n\nwhen I receive [levelstartswitch v]\nrepeat (1)\n    delete this clone\nend\nif <(Game_Level) = [8]> then\n    Enemy at X [-190] Y [-160] WalkngRng [230]\nend\n\nwhen I start as a clone\nforever\n    point in direction (90)\n    repeat (Enemy Walking Range)\n        set [xv v] to [2]\n    end\n    point in direction (-90)\n    repeat (Enemy Walking Range)\n        set [xv v] to [-2]\n    end\nend\n\nchange [xv v] by (1)\n\nchange [xv v] by (1)\n\n@Intro-thingy\n\nwhen flag clicked\n\nhide\nswitch costume to (1 v)\nrepeat (52)\n    next costume\nend\n\n@Level\n\nwhen I receive [levelstartswitch v]\nset size to (101) %\ngo to x: (0) y: (0)\nswitch costume to (Game_Level)\n\nwhen flag clicked\nwait until <(Game_Level) = [10]>\nbroadcast (end of game v)\n\nwhen I receive [end of game v]\nhide variable [seeds v]\n\n@Seed\n\nwhen I start as a clone\nshow\nforever\n    if <(Seed Type) = [1]> then\n        switch costume to (seed v)\n    end\n    if <(Seed Type) = [2]> then\n        switch costume to (special seed v)\n        point in direction ((([sin v] of ((bounce/rotate) + (-50)) ) * (5)) + (90))\n        set size to ((([sin v] of (bounce/rotate) ) * (-2)) + ((10) * (2))) %\n        change [bounce/rotate v] by (16)\n    end\n    if <(Special?) = [false]> then\n        point in direction ((([sin v] of ((bounce/rotate) + (-50)) ) * (5)) + (90))\n        set size to ((([sin v] of (bounce/rotate) ) * (-2)) + ((10) * (2))) %\n        change [bounce/rotate v] by (16)\n    end\n    if <(Special Type) = [1]> then\n        set size to (50) %\n        show\n        switch costume to (bounce v)\n        if <touching (player v)?> then\n            switch costume to (bounce2 v)\n            broadcast (BOUNCE!! v)\n            start sound [Low Squeak v]\n        end\n    end\nend\n\nswitch costume to (bounce v)\n\nplay sound [Low Squeak v] until done\n\ndefine Seed at X (x) Y (y)\nset [special? v] to [false]\nset [seed type v] to [1]\ngo to x: (x) y: (y)\ncreate clone of (_myself_ v)\nhide\n\nwhen I receive [levelstartswitch v]\nshow variable [seeds v]\nrepeat (1)\n    delete this clone\nend\nif <(Game_Level) = [1]> then\n    set [seedstocollect? v] to [1]\n    set [seedscollected? v] to [0]\n    Seed at X [0] Y [0]\nend\nif <(Game_Level) = [2]> then\n    set [seedstocollect? v] to [3]\n    set [seedscollected? v] to [0]\n    Seed at X [-71] Y [-40]\n    Seed at X [-150] Y [40]\n    Seed at X [132] Y [-5]\nend\nif <(Game_Level) = [3]> then\n    set [seedstocollect? v] to [1]\n    set [seedscollected? v] to [0]\n    Seed at X [85] Y [-110]\nend\nif <(Game_Level) = [4]> then\n    set [seedstocollect? v] to [8]\n    set [seedscollected? v] to [0]\n    Seed at X [0] Y [8]\n    Seed at X [20] Y [8]\n    Seed at X [-20] Y [8]\n    Seed at X [-40] Y [8]\n    Seed at X [-60] Y [8]\n    Seed at X [-80] Y [8]\n    Seed at X [-100] Y [8]\n    Seed at X [-120] Y [8]\nend\nif <(Game_Level) = [5]> then\n    set [seedstocollect? v] to [1]\n    set [seedscollected? v] to [0]\n    Seed at X [-65] Y [50]\nend\nif <(Game_Level) = [6]> then\n    set [seedstocollect? v] to [5]\n    set [seedscollected? v] to [0]\n    Seed at X [-150] Y [-160]\n    Seed at X [-150] Y [-140]\n    Seed at X [-150] Y [-120]\n    Seed at X [-150] Y [-100]\n    Seed at X [-150] Y [-80]\nend\nif <(Game_Level) = [7]> then\n    set [seedstocollect? v] to [1]\n    set [seedscollected? v] to [0]\n    Seed at X [100] Y [0]\n    Bounce Seed at X [100] Y [-150]\nend\nif <(Game_Level) = [8]> then\n    set [seedstocollect? v] to [2]\n    set [seedscollected? v] to [0]\n    Seed at X [140] Y [0]\n    Seed at X [-140] Y [0]\n    Bounce Seed at X [140] Y [-150]\n    Bounce Seed at X [-140] Y [-150]\nend\nif <(Game_Level) = [9]> then\n    set [seedstocollect? v] to [3]\n    set [seedscollected? v] to [0]\n    Seed at X [-140] Y [-90]\n    Seed at X [-180] Y [-140]\n    Seed at X [-200] Y [-140]\n    Bounce Seed at X [180] Y [-100]\nend\n\nwhen flag clicked\nforever\n    set [seeds v] to (join (SeedsCollected?) (join [ / ] (SeedsToCollect?)))\nend\n\nwhen I start as a clone\nclear graphic effects\nwait until <(distance to [player v]) < [20]>\nif <(Seed Type) = [1]> then\n    change [seedscollected? v] by (1)\n    glide (0.1) secs to x: (-200) y: (150)\n    clear sound effects\n    start sound [Coin v]\n    delete this clone\nend\nif <(Seed Type) = [2]> then\n    set [pitch v] effect to (100)\n    start sound [Coin v]\n    Bouncy Flower at X (x position) Y (y position)\n    delete this clone\nend\n\ndefine Bounce Seed at X (x) Y (y)\nset [special? v] to [true]\nset [seed type v] to [2]\ngo to x: (x) y: (y)\ncreate clone of (_myself_ v)\nhide\n\ndefine Bouncy Flower at X (x) Y (y)\nset [seed type v] to [0]\nset [special type v] to [1]\nset [special? v] to [true]\ngo to x: (x) y: (y)\ncreate clone of (_myself_ v)\nset [seed type v] to [2]\nhide\n\nBounce Seed at X [0] Y [-120]\n\n@Info\n\nwhen flag clicked\nforever\n    set [ghost v] effect to ((distance to [player v]) - (40))\n    switch costume to (Game_Level)\n    if <(Game_Level) = [1]> then\n        go to x: (-170) y: (-80)\n    end\n    if <(Game_Level) = [3]> then\n        go to x: (30) y: (-80)\n    end\n    if <(Game_Level) = [5]> then\n        go to x: (-170) y: (-5)\n    end\nend\n\n@Thumbnail\n\nwhen flag clicked\ngo to x: (0) y: (0)\nforever\n    set [ghost v] effect to (100)\n    go to [front v] layer\n    show\n    reset timer\nend\n\nwhen [timer v] > (0.2)\nhide variable [seeds v]\n\n