Four Worlds - A Platformer #games #music #adventure

Instructions: Play my new, less generic platformer:\n\nhttps://scratch.mit.edu/projects/672294883/\n\n\n                       [Four Worlds - A Platformer]\n\nYou are a cube and you're on an adventure, exploring through forest, winter, cave and desert. Can you get to the end? (this is possible - I've completed it myself)\n\nPress s to skip through levels (thanks to @Lazia33 for suggesting this feature).\n\nThanks to @-Zid- for the epic intro!\n\nI worked on this for over a week, so I would really appreciate some support!\n\nThanks for (was) 2nd page on trending!

@Stage\n\nwhen flag clicked\nforever\n    switch backdrop to (((Level) / (5)) + (0.3))\nend\n\nwhen I receive [start project v]\nwait (0.5) seconds\nforever\n    if <not <(Level) = [21]>> then\n        play sound [Tobu - Candyland v] until done\n    end\nend\n\nwhen flag clicked\nwait until <(Level) = [21]>\nwait (2) seconds\nstop all sounds\nstart sound [success v]\n\n@Player\n\nwhen flag clicked\nforever\n    if <key (right arrow v) pressed?> then\n        change [xv v] by (1)\n        point in direction (90)\n    end\n    if <key (left arrow v) pressed?> then\n        change [xv v] by (-1)\n        point in direction (-90)\n    end\n    set [xv v] to ((Xv) * (0.9))\n    change x by (Xv)\nend\n\nwhen flag clicked\nforever\n    if <<touching (ground v)?> or <<touching (moving platform v)?> or <<touching (sprite5 v)?> and <(Platform Placed) = [1]>>>> then\n        change y by (1.5)\n        if <<touching (ground v)?> or <<touching (moving platform v)?> or <<touching (sprite5 v)?> and <(Platform Placed) = [1]>>>> then\n            change y by (1.5)\n            if <<touching (ground v)?> or <<touching (moving platform v)?> or <<touching (sprite5 v)?> and <(Platform Placed) = [1]>>>> then\n                change y by (1.5)\n                if <<touching (ground v)?> or <<touching (moving platform v)?> or <<touching (sprite5 v)?> and <(Platform Placed) = [1]>>>> then\n                    change y by (1.5)\n                    if <<touching (ground v)?> or <<touching (moving platform v)?> or <<touching (sprite5 v)?> and <(Platform Placed) = [1]>>>> then\n                        change y by (1.5)\n                        if <<touching (ground v)?> or <<touching (moving platform v)?> or <<touching (sprite5 v)?> and <(Platform Placed) = [1]>>>> then\n                            change x by ((Xv) * (-1))\n                            change y by (-5)\n                            if <key (up arrow v) pressed?> then\n                                if <(Xv) > [0]> then\n                                    set [xv v] to [-6]\n                                else\n                                    set [xv v] to [6]\n                                end\n                                change x by (Xv)\n                                set [yv v] to [12]\n                            else\n                                set [xv v] to [0]\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Fail) = [1]> then\n        set [clone type v] to [2]\n    else\n        set [clone type v] to [1]\n    end\n    create clone of (_myself_ v)\nend\n\nwhen I start as a clone\nif <(Clone Type) = [1]> then\n    repeat (10)\n        change [ghost v] effect by (10)\n        change size by (-8)\n    end\n    delete this clone\nelse\n    set rotation style [all around v]\n    repeat (20)\n        turn right (15) degrees\n        change y by (10)\n        change [ghost v] effect by (5)\n        change size by (-2)\n    end\n    delete this clone\nend\n\nwhen flag clicked\nset [level v] to [1]\nforever\n    wait until <(x position) > [240]>\n    broadcast (Level Up v)\n    wait until <([y position v] of [sprite3 v]) < [1]>\n    hide\n    wait until <not <touching (sprite3 v)?>>\n    set [xv v] to [0]\n    go to x: (-180) y: (0)\n    show\nend\n\nwhen flag clicked\nforever\n    switch costume to (((Level) / (5)) + (0.3))\nend\n\nwhen flag clicked\nforever\n    if <<touching (sprite2 v)?> and <<(Level) = [9]> or <(Level) = [14]>>> then\n        set [yv v] to [16]\n    end\nend\n\nwhen I receive [intro end v]\nswitch costume to (costume1 v)\nset rotation style [left-right v]\npoint in direction (90)\nset y to (0)\nset x to (-180)\nset [yv v] to [0]\nset [clone type v] to [1]\nforever\n    change [yv v] by (-1)\n    change y by (Yv)\n    if <<touching (enemy v)?> or <touching (sprite4 v)?>> then\n        wait (0) seconds\n        set [fail v] to [1]\n        wait (0) seconds\n        set y to (0)\n        set x to (-180)\n        set [fail v] to [0]\n    end\n    if <<touching (ground v)?> or <<touching (moving platform v)?> or <<touching (sprite5 v)?> and <(Platform Placed) = [1]>>>> then\n        change y by ((Yv) * (-1))\n        set [yv v] to [0]\n    end\n    change y by (-1)\n    if <<touching (ground v)?> or <<touching (moving platform v)?> or <<touching (sprite5 v)?> and <(Platform Placed) = [1]>>>> then\n        change y by ((Yv) * (-1))\n        set [yv v] to [0]\n        change y by ((Yv) * (-1))\n        set [yv v] to [0]\n        set [player touching ground v] to [1]\n        if <key (up arrow v) pressed?> then\n            set [yv v] to [16]\n        end\n    else\n        set [player touching ground v] to [0]\n    end\n    change y by (1)\nend\n\nwhen flag clicked\nforever\n    if <<touching color (#ff0000)?> or <touching color (#e90000)?>> then\n        set [fail v] to [1]\n        set [yv v] to [0]\n        wait (0) seconds\n        set y to (0)\n        set x to (-180)\n        set [fail v] to [0]\n    end\nend\n\nwhen flag clicked\nwait (7) seconds\nforever\n    if <(Level) < [21]> then\n        wait until <key (s v) pressed?>\n        broadcast (Level Up v)\n        wait until <not <key (s v) pressed?>>\n        wait (2.5) seconds\n    end\nend\n\nwhen I receive [reset v]\nset [yv v] to [0]\nwait (0) seconds\nset y to (0)\nset x to (-180)\nset [fail v] to [0]\n\n@Ground\n\nwhen flag clicked\nforever\n    switch costume to (Level)\nend\n\n@Other art\n\nwhen flag clicked\nforever\n    switch costume to (((Level) / (5)) + (0.3))\nend\n\n@Text\n\nwhen flag clicked\nforever\n    switch costume to (Level)\nend\n\n@Moving Platform\n\nwhen flag clicked\nrepeat (2)\n    hide\nend\nwait until <(Level) = [4]>\nshow\ngo to x: (-50) y: (0)\nrepeat until <(Level) > [4]>\n    repeat until <(x position) > [100]>\n        change x by (5)\n        if <(Level) > [4]> then\n            hide\n        end\n    end\n    repeat until <(x position) < [-50]>\n        change x by (-5)\n        if <(Level) > [4]> then\n            hide\n        end\n    end\nend\n\n@Enemy\n\nwhen flag clicked\nrepeat (2)\n    hide\nend\nwait until <(Level) = [5]>\nshow\ngo to x: (150) y: (-82)\nset rotation style [left-right v]\nset [enemy yv v] to [0]\nrepeat until <(Level) = [6]>\n    if <((x position) - ([x position v] of [player v])) < [-3]> then\n        change x by (3)\n        point in direction (90)\n        if <touching (ground v)?> then\n            change x by (-3)\n        end\n    else\n        if <((x position) - ([x position v] of [player v])) > [3]> then\n            change x by (-3)\n            point in direction (-90)\n            if <touching (ground v)?> then\n                change x by (3)\n            end\n        end\n    end\n    change [enemy yv v] by (-1)\n    change y by (Enemy Yv)\n    if <touching (ground v)?> then\n        if <(Enemy Yv) < [0]> then\n            change y by ((Enemy Yv) * (-1))\n            set [enemy yv v] to [0]\n        else\n            change y by ((Enemy Yv) * (-1))\n            set [enemy yv v] to [-1]\n        end\n    end\n    if <key (up arrow v) pressed?> then\n        if <(Enemy Yv) = [0]> then\n            set [enemy yv v] to [17.1]\n        end\n    end\nend\nhide\n\nwhen flag clicked\nforever\n    wait until <touching (player v)?>\n    go to x: (150) y: (-83)\nend\n\n@Thumbnail\n\nwhen flag clicked\ngo to [front v] layer\nset [ghost v] effect to (100)\n\n@Sprite1\n\nwhen flag clicked\ngo to [back v] layer\nforever\n    create clone of (_myself_ v)\n    repeat (pick random (0) to (pick random (1) to (2)))\n        wait (0) seconds\n    end\nend\n\nwhen I start as a clone\nshow\ngo to x: (300) y: (pick random (-140) to (20))\npoint in direction (pick random (-90) to (-75))\nset [ghost v] effect to (pick random (50) to (70))\nset size to (pick random (25) to (50)) %\nrepeat until <(x position) < [-239]>\n    move (5) steps\n    turn right (pick random (-0.2) to (0.2)) degrees\n    change [ghost v] effect by (0.2)\nend\ndelete this clone\n\n@Sprite2\n\nwhen flag clicked\nforever\n    if <<(Level) = [9]> or <(Level) = [14]>> then\n        show\n        if <(Level) = [9]> then\n            set x to (0)\n        else\n            set x to (40)\n        end\n    else\n        hide\n    end\nend\n\nwhen flag clicked\nswitch costume to (costume1 v)\nforever\n    wait until <touching (player v)?>\n    switch costume to (costume2 v)\n    wait (0.2) seconds\n    switch costume to (costume1 v)\nend\n\n@Sprite3\n\nwhen I receive [level up v]\nshow\nstart sound [A Guitar v]\ngo to x: (0) y: (349)\nrepeat until <(y position) < [1]>\n    change y by ((y position) / (-6))\n    create clone of (_myself_ v)\nend\nchange [level v] by (1)\nrepeat until <(y position) > [348]>\n    change y by ((y position) / (6))\n    create clone of (_myself_ v)\nend\nbroadcast (Reset v)\nhide\n\nwhen flag clicked\nhide\n\nwhen I start as a clone\nrepeat (5)\n    change [ghost v] effect by (20)\nend\ndelete this clone\n\n@Sprite4\n\nwhen flag clicked\nforever\n    wait (0.4) seconds\n    if <(Level) = [10]> then\n        create clone of (_myself_ v)\n    end\nend\n\nwhen I start as a clone\nshow\ngo to x: (pick random (-100) to (100)) y: (183)\npoint in direction ((pick random (135) to (225)) + ((x position) / (10)))\nrepeat until <touching (ground v)?>\n    move (8) steps\n    turn right (pick random (-0.2) to (0.2)) degrees\n    if <(Level) = [11]> then\n        delete this clone\n    end\nend\ndelete this clone\n\n@Sprite5\n\nwhen flag clicked\nhide\nset [platform placed v] to [0]\nwait (0) seconds\nwait until <(Level) = [15]>\nlevel [15]\nwait until <(Level) = [17]>\nlevel [17]\nlevel [18]\n\ndefine level (level)\nshow\nif <(level) = [15]> then\n    switch costume to (costume1 v)\nelse\n    switch costume to (costume2 v)\nend\nrepeat until <(Level) = ((level) + (1))>\n    set [platform placed v] to [0]\n    set [ghost v] effect to (50)\n    repeat until <<mouse down?> and <not <<touching (ground v)?> or <<touching color (#e90000)?> or <touching color (#ff0000)?>>>>>\n        go to (mouse-pointer v)\n    end\n    set [platform placed v] to [1]\n    set [ghost v] effect to (0)\n    start sound [Crunch v]\n    repeat until <(Fail) = [1]>\n        if <(Level) = ((level) + (1))> then\n            hide\n            set [platform placed v] to [0]\n            stop [this script v]\n        end\n    end\nend\n\nrepeat until <<mouse down?> and <not <touching (ground v)?>>>\n    go to (mouse-pointer v)\nend\nstart sound [Crunch v]\nset [ghost v] effect to (0)\n\n@Intro2\n\nwhen flag clicked\nset volume to (100) %\nstart sound [Valence - Infinite \[NCS Release\] v]\nclear graphic effects\nhide\n\nwhen I receive [cover v]\nshow\ngo to [front v] layer\ngo to x: (0) y: (400)\nrepeat until <(round (y position)) = [0]>\n    change y by (((0) - (y position)) / (6))\nend\nbroadcast (Intro End v)\nrepeat (25)\n    change [ghost v] effect by (4)\n    change volume by (-4)\nend\nhide\nbroadcast (Start Project v)\n\n@Intro1\n\ndefine Change Size (change) (speed)\nset [sizegoal v] to ((size) + (change))\nrepeat until <([abs v] of ((SizeGoal) - (size)) ) < [0.1]>\n    change size by (((SizeGoal) - (size)) * ((speed) / (5)))\nend\n\nwhen flag clicked\ngo to [front v] layer\nhide\nreset timer\npoint in direction (90)\nset [i v] to [0]\nset [tan v] to [0]\nrepeat (4)\n    change [i v] by (1)\n    create clone of (_myself_ v)\n    wait (.5) seconds\nend\n\nwhen I start as a clone\nshow\nswitch costume to ((I) + (1))\nset [ghost v] effect to (100)\nset size to (0) %\nif <<(costume [number v]) = [2]> or <(costume [number v]) = [4]>> then\n    go to x: (-400) y: (0)\nelse\n    if <<(costume [number v]) = [3]> or <(costume [number v]) = [5]>> then\n        go to x: (400) y: (0)\n    end\nend\nrepeat until <(timer) > [3]>\n    if <<(costume [number v]) = [2]> or <(costume [number v]) = [4]>> then\n        change size by (((100) - (size)) / (6))\n        change [ghost v] effect by (-10)\n        change x by (((0) - (x position)) / (6))\n    end\n    if <<(costume [number v]) = [3]> or <(costume [number v]) = [5]>> then\n        change size by (((100) - (size)) / (6))\n        change [ghost v] effect by (-10)\n        change x by (((0) - (x position)) / (6))\n    end\nend\nbroadcast (Logo v)\ndelete this clone\n\nwhen I receive [logo v]\nshow\ngo to x: (0) y: (0)\nclear graphic effects\nswitch costume to (logo v)\nset size to (100) %\nChange Size (30) (1)\nswitch costume to (name v)\nset size to (150) %\nChange Size (-30) (1)\nrepeat (36)\n    set x to (([tan v] of (tan) ) * (13))\n    change [tan v] by (5)\nend\nbroadcast (Cover v)\nwait (.5) seconds\nhide\n\n@Sprite6\n\n@Sprite7\n\nwhen flag clicked\nshow\ngo to [front v] layer\ngo [backward v] (3) layers\n\nwhen I receive [start project v]\nhide\n\nwhen I receive [intro end v]\nhide\n\n@Spikes\n\nwhen flag clicked\nforever\n    switch costume to (Level)\nend\n\n