Rainy Night (Mobile Friendly) | Platformer | #Games
@Stage\n\nwhen flag clicked\nforever\n    play sound [Castle in the sky – Carrying you \(instrumental\) \(128 kbps\)-\[AudioTrimmer v] until done\nend\n\n@Background\n\nwhen flag clicked\nswitch costume to (mercury v)\nset x to (0)\nset y to (0)\nforever\n    if <<key (right arrow v) pressed?> or <key (d v) pressed?>> then\n        glide (0.2) secs to x: (2) y: (0)\n    else\n        if <<key (left arrow v) pressed?> or <key (a v) pressed?>> then\n            glide (0.2) secs to x: (-2) y: (0)\n        else\n            glide (0.1) secs to x: (0) y: (0)\n        end\n    end\n    go to [back v] layer\nend\n\nwhen I receive [next lvl v]\nnext costume\n\nwhen flag clicked\nforever\n    if <(level) = [5]> then\n        switch costume to (stars v)\n    end\nend\n\n@Platform\n\nwhen flag clicked\nswitch costume to (mercury v)\nset [level v] to [1]\nbroadcast (respawn v)\nforever\n    if <(level) = [1]> then\n        SET HACK SIZE TO [200]\n        change [y vel v] by (0.6)\n    end\n    if <(level) = [2]> then\n        SET HACK SIZE TO [250]\n        change [y vel v] by (0.9)\n    end\n    if <(level) = [3]> then\n        SET HACK SIZE TO [266]\n        change [y vel v] by (1)\n    end\n    if <(level) = [4]> then\n        SET HACK SIZE TO [210]\n        change [y vel v] by (0.6)\n    end\n    if <<key (right arrow v) pressed?> or <<key (d v) pressed?> or <<(mouse x) > [20]> and <mouse down?>>>> then\n        change [d vel v] by (-0.2)\n    end\n    if <<key (left arrow v) pressed?> or <<key (a v) pressed?> or <<[-20] > (mouse x)> and <mouse down?>>>> then\n        change [d vel v] by (0.2)\n    end\n    set [d vel v] to ((d vel) * (0.8))\n    turn right (d vel) degrees\n    if <touching (player v)?> then\n        change y by (-1)\n        if <touching (player v)?> then\n            change y by (-1)\n            if <touching (player v)?> then\n                change y by (-1)\n                if <touching (player v)?> then\n                    change y by (-1)\n                    if <touching (player v)?> then\n                        change y by (4)\n                        turn right ((d vel) * (-1)) degrees\n                        set [d vel v] to [0]\n                    end\n                end\n            end\n        end\n    end\n    change y by (y vel)\n    if <touching (player v)?> then\n        change y by ((y vel) * (-1))\n        set [y vel v] to [0]\n    end\n    change y by (1)\n    if <touching (player v)?> then\n        if <<key (up arrow v) pressed?> or <<key (w v) pressed?> or <<(mouse y) > [30]> and <mouse down?>>>> then\n            set [y vel v] to [-12]\n        end\n    end\n    change y by (-1)\nend\n\ndefine SET HACK SIZE TO (number or text)\nset [size hack platform v] to (costume [number v])\nswitch costume to (size hack v)\nset size to (number or text) %\nswitch costume to (size hack platform)\n\nwhen I receive [respawn v]\npoint in direction (90)\ngo to x: (-10) y: (-500)\nset [d vel v] to [0]\nset [y vel v] to [0]\n\nwhen I receive [next lvl v]\nnext costume\n\nwhen I receive [bounce v]\nset [y vel v] to [-20]\n\nwhen flag clicked\n\n@player\n\nwhen flag clicked\ngo to x: (0) y: (0)\n\nwhen I receive [respawn v]\n\nwhen flag clicked\nset [ghost v] effect to (100)\nswitch costume to (hitbox v)\nshow\nforever\n    change y by (-5)\n    if <touching (flag v)?> then\n        broadcast (next lvl v)\n        change [level v] by (1)\n        broadcast (respawn v)\n        wait (1) seconds\n    end\n    if <<(level) = [3]> and <touching color (#f7ef00)?>> then\n        broadcast (bounce v)\n    end\n    change y by (5)\nend\n\nif <touching color (#ff0000)?> then\n    broadcast (respawn v)\nend\n\nif <(level) = [5]> then\n    hide\nelse\n    show\nend\n\n@flag\n\nwhen flag clicked\nshow\npoint in direction (90)\ngo to x: (0) y: (0)\nforever\n    go to (platform v)\n    point in direction ([direction v] of [platform v])\n    if <touching (_edge_ v)?> then\n        hide\n    else\n        show\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [1]> then\n        set hack size [200]\n    end\n    if <(level) = [2]> then\n        set hack size [250]\n    end\n    if <(level) = [3]> then\n        set hack size [266]\n    end\n    if <(level) = [4]> then\n        set hack size [210]\n    end\nend\n\ndefine set hack size (size)\nset [size hack flag v] to (costume [number v])\nswitch costume to (size hack v)\nset size to (size) %\nswitch costume to (size hack flag)\n\n@text\n\nwhen flag clicked\nshow\nswitch costume to (mercury v)\npoint in direction (90)\ngo to x: (0) y: (0)\nforever\n    go to (platform v)\n    point in direction ([direction v] of [platform v])\nend\n\ngo to [front v] layer\n\ndefine set hack size (size)\nset [size hack flag v] to (costume [number v])\nswitch costume to (size hack v)\nset size to (size) %\nswitch costume to (size hack flag)\n\nwhen flag clicked\nforever\n    if <(level) = [1]> then\n        set hack size [200]\n    end\n    if <(level) = [2]> then\n        set hack size [250]\n    end\n    if <(level) = [3]> then\n        set hack size [266]\n    end\n    if <(level) = [4]> then\n        set hack size [210]\n    end\nend\n\nwhen I receive [next lvl v]\nnext costume\n\n@particles\n\nwhen I start as a clone\nset [ghost v] effect to (65)\ngo to [back v] layer\nshow\nif <(level) = [2]> then\n    if <(size) > [99]> then\n        glide (4) secs to x: (240) y: (y position)\n        delete this clone\n    end\n    if <(size) > [80]> then\n        glide (3) secs to x: (240) y: (y position)\n        delete this clone\n    end\n    if <(size) > [65]> then\n        glide (2) secs to x: (240) y: (y position)\n        delete this clone\n    end\n    if <(size) > [50]> then\n        glide (1.5) secs to x: (240) y: (y position)\n        delete this clone\n    end\n    if <(size) > [40]> then\n        glide (1) secs to x: (240) y: (y position)\n        delete this clone\n    end\nend\nif <(level) = [3]> then\n    if <(size) > [99]> then\n        glide (6) secs to x: (x position) y: (240)\n        delete this clone\n    end\n    if <(size) > [80]> then\n        glide (5) secs to x: (x position) y: (240)\n        delete this clone\n    end\n    if <(size) > [65]> then\n        glide (4) secs to x: (x position) y: (240)\n        delete this clone\n    end\n    if <(size) > [50]> then\n        glide (3) secs to x: (x position) y: (240)\n        delete this clone\n    end\n    if <(size) > [40]> then\n        glide (2.5) secs to x: (x position) y: (240)\n        delete this clone\n    end\nend\n\nwhen flag clicked\nhide\n\nwhen flag clicked\nforever\n    if <(level) = [2]> then\n        set [brightness v] effect to (pick random (-10) to (10))\n        set size to (pick random (41) to (90)) %\n        go to x: (-240) y: (pick random (-100) to (180))\n        create clone of (_myself_ v)\n        wait (pick random (0.2) to (0.6)) seconds\n    end\n    if <(level) = [3]> then\n        set [brightness v] effect to (pick random (-10) to (10))\n        set size to (pick random (41) to (90)) %\n        go to x: (pick random (-240) to (240)) y: (-180)\n        create clone of (_myself_ v)\n        wait (pick random (0.2) to (0.6)) seconds\n    end\nend\n\n@water\n\nwhen flag clicked\ngo to [back v] layer\nshow\nswitch costume to (mercury v)\npoint in direction (90)\ngo to x: (0) y: (0)\nforever\n    go to (platform v)\n    point in direction ([direction v] of [platform v])\nend\n\ndefine set hack size (size)\nset [size hack flag v] to (costume [number v])\nswitch costume to (size hack v)\nset size to (size) %\nswitch costume to (size hack flag)\n\nwhen flag clicked\nforever\n    if <(level) = [1]> then\n        set hack size [200]\n    end\n    if <(level) = [2]> then\n        set hack size [250]\n    end\n    if <(level) = [3]> then\n        set hack size [266]\n    end\n    if <(level) = [4]> then\n        set hack size [210]\n    end\nend\n\nwhen I receive [next lvl v]\nnext costume\n\n@Sprite1\n\nwhen flag clicked\nset x to (0)\nset y to (0)\nhide\nforever\n    if <(level) = [5]> then\n        show\n        go to [front v] layer\n    else\n        hide\n    end\nend\n\n@Sprite2\n\nwhen flag clicked\ngo to [front v] layer\nclear graphic effects\nset [ghost v] effect to (100)\nshow\nset x to (0)\nset y to (0)\n\n@Sprite3\n\nwhen flag clicked\nshow\nset size to (100) %\nset x to (180)\nset y to (-140)\nforever\n    if <touching (mouse-pointer v)?> then\n        set size to (120) %\n    else\n        set size to (100) %\n    end\n    if <(level) = [5]> then\n        hide\n    else\n        show\n    end\nend\n\nwhen this sprite clicked\nchange [level v] by (1)\nbroadcast (respawn v)\nbroadcast (next lvl v)\nforever\n    set [timer v] to [none]\nend\n\nwhen [r v] key pressed\nbroadcast (respawn v)\n\nwhen flag clicked\nset [timer v] to [0]\nforever\n    repeat until <(level) = [5]>\n        wait (0.05) seconds\n        change [timer v] by (1)\n    end\nend\n\n@player2\n\nwhen flag clicked\ngo to x: (0) y: (0)\n\nwhen I receive [respawn v]\nset [ghost v] effect to (100)\nrepeat (10)\n    change [ghost v] effect by (-10)\nend\n\nwhen flag clicked\nforever\n    switch costume to (costume1 v)\n    if <touching color (#ff0000)?> then\n        broadcast (respawn v)\n    end\n    if <(level) = [5]> then\n        hide\n    else\n        show\n    end\nend\n\n@highscore\n\nwhen flag clicked\nforever\n    if <<(level) = [5]> and <<not <(timer) = [none]>> and <not <(☁ High Score) = [0]>>>> then\n        if <(timer) < (☁ High Score)> then\n            set [☁ high score v] to (timer)\n        end\n    end\n    if <(☁ High Score) = [0]> then\n        set [☁ high score v] to [100000]\n    end\n    if <(level) = [5]> then\n        show variable [☁ high score v]\n    else\n        hide variable [☁ high score v]\n    end\nend\n\n
Arrow / WASD / Mobile to move.\nLove, Favorite, and maybe even Follow?? :D\nThis project has been in the making now for 3 months.\n\nReal Time I have spent: 23 Hours