[75K VIEWS] Sunset | Platformer


@Stage\n\n@Main CharacterSprite1\n\nwhen I receive [superdeeduperdeenextlvl v]\nif <(level) = [1]> then\n    set [start x v] to [-200]\n    set [start y v] to [0]\nend\nif <(level) = [2]> then\n    set [start x v] to [-200]\n    set [start y v] to [0]\nend\nif <(level) = [3]> then\n    set [start x v] to [-200]\n    set [start y v] to [0]\nend\nif <(level) = [4]> then\n    set [start x v] to [-200]\n    set [start y v] to [-25]\nend\nif <(level) = [5]> then\n    set [start x v] to [-200]\n    set [start y v] to [75]\nend\nif <(level) = [6]> then\n    set [start x v] to [-200]\n    set [start y v] to [-25]\nend\nif <(level) = [7]> then\nif <(level) = [8]> then\nif <(level) = [9]> then\n    set [start x v] to [-220]\n    set [start y v] to [0]\nend\nif <(level) = [10]> then\n    set [start x v] to [-200]\n    set [start y v] to [0]\nend\nif <(level) = [11]> then\n    set [start x v] to [200]\n    set [start y v] to [-70]\nend\nif <(level) = [12]> then\n    set [start x v] to [-230]\n    set [start y v] to [0]\nend\nif <(level) = [13]> then\n    set [start x v] to [-220]\n    set [start y v] to [120]\nend\nif <(level) = [14]> then\n    set [start x v] to [-250]\n    set [start y v] to [0]\nend\nif <(level) = [15]> then\n    set [start x v] to [-200]\n    set [start y v] to [-100]\nend\nif <(level) = [16]> then\n    set [start x v] to [-200]\n    set [start y v] to [-50]\nend\nstarting position\n\ndefine starting position\nstart sound [pop v]\nset [fallspeed v] to [0]\nset [runspeed v] to [0]\ngo to x: (start x) y: (start y)\n\nwhen I receive [play v]\nset [level v] to [1]\ngo to [front v] layer\ngo to x: (0) y: (0)\nhide\nset [ghost v] effect to (0)\nshow\nset [ghost v] effect to (0)\nset [runspeed v] to [0]\nset rotation style [left-right v]\nset [fallspeed v] to [0]\ngo to x: (-200) y: (0)\nforever\n    change [fallspeed v] by (-1)\n    set [runspeed v] to ((runspeed) * (0.9))\n    if <<key (a v) pressed?> or <key (left arrow v) pressed?>> then\n        point in direction (-90)\n        change [runspeed v] by (-1)\n    end\n    if <<key (d v) pressed?> or <key (right arrow v) pressed?>> then\n        point in direction (90)\n        change [runspeed v] by (1)\n    end\n    if <touching (ground 2 v)?> then\n        change x by ((runspeed) / (3))\n    else\n        change x by (runspeed)\n    end\n    if <touching (ground 2 v)?> then\n        change y by (1)\n    end\n    if <touching (ground 2 v)?> then\n        change y by (1)\n    end\n    if <touching (ground 2 v)?> then\n        change y by (1)\n    end\n    if <touching (ground 2 v)?> then\n        change y by (1)\n    end\n    if <touching (ground 2 v)?> then\n        change y by (-4)\n        change x by ((runspeed) * (-1))\n    end\n    if <touching (water v)?> then\n        change y by ((fallspeed) / (3))\n    else\n        change y by (fallspeed)\n    end\n    set [y v] to (y position)\n    if <touching (ground 2 v)?> then\n        change y by ((fallspeed) - ((fallspeed) * (2)))\n        set [fallspeed v] to [0]\n    end\n    change y by (-1)\n    if <<<key (up arrow v) pressed?> or <key (w v) pressed?>> and <touching (ground 2 v)?>> then\n        set [fallspeed v] to [12]\n    end\n    change y by (1)\n    if <<<key (up arrow v) pressed?> or <key (w v) pressed?>> and <touching (water v)?>> then\n        set [fallspeed v] to [5]\n    end\n    if <(y position) < [-173]> then\n        starting position\n    end\n    if <touching (flag v)?> then\n        broadcast (superdeeduperdeenextlvl v)\n        change [level v] by (1)\n    end\n    if <touching (trampoline v)?> then\n        broadcast (jump v)\n        set [fallspeed v] to [18]\n    end\n    if <touching (spikes v)?> then\n        starting position\n    end\n    if <touching (spike2 v)?> then\n        starting position\n    end\n    if <not <(level) = [17]>> then\n        if <key (n v) pressed?> then\n            broadcast (superdeeduperdeenextlvl v)\n            change [level v] by (1)\n            wait until <not <key (n v) pressed?>>\n        end\n    end\n    if <touching (enemie v)?> then\n        starting position\n    end\n    if <touching (smasher v)?> then\n        starting position\n    end\n    if <(level) = [16]> then\n        broadcast (end v)\n        hide\n        stop [this script v]\n    end\nend\n\nwhen flag clicked\nhide\n\n@Sprite2\n\nwhen flag clicked\nset [level v] to [1]\nforever\n    set size to (120) %\n    show\n    switch costume to (level)\nend\n\n@ground 2\n\nwhen flag clicked\nswitch costume to (costume17 v)\nset size to (120) %\nswitch costume to (costume1 v)\nset [ghost v] effect to (100)\ngo to x: (0) y: (0)\nshow\ngo to [back v] layer\nforever\n    switch costume to (level)\nend\n\n@Trampoline\n\nwhen I receive [jump v]\nstart sound [Jump v]\nset [jump movement v] to [-5]\nrepeat until <(jump movement) = [2]>\n    change y by (jump movement)\n    change [jump movement v] by (1)\nend\n\ngo to x: (79) y: (-42)\nshow\n\nhide\n\nhide\n\nwhen flag clicked\nset [level v] to [1]\nforever\n    if <(level) = [1]> then\n        hide\n    end\n    if <(level) = [2]> then\n        go to x: (-200) y: (-110)\n        show\n    end\n    if <(level) = [3]> then\n        hide\n    end\n    if <(level) = [4]> then\n        show\n        go to x: (-86) y: (-52)\n    end\n    if <(level) = [5]> then\n        go to x: (-34) y: (11)\n        show\n    end\n    if <(level) = [6]> then\n        hide\n    end\n    if <(level) = [7]> then\n        hide\n    end\n    if <(level) = [8]> then\n        show\n        go to x: (-101) y: (-61)\n    end\n    if <(level) = [9]> then\n        hide\n    end\n    if <(level) = [10]> then\n        hide\n    end\n    if <(level) = [11]> then\n        show\n        go to x: (182) y: (13)\n    end\n    if <(level) = [12]> then\n        show\n        go to x: (20) y: (-78)\n    end\n    if <(level) = [13]> then\n        hide\n    end\n    if <(level) = [14]> then\n        show\n        go to x: (0) y: (-83)\n    end\n    if <(level) = [15]> then\n        show\n        go to x: (198) y: (-90)\n    end\n    if <(level) = [16]> then\n        hide\n    end\nend\n\n@spike2\n\nhide\n\nwhen flag clicked\nforever\n    turn right (4) degrees\n    if <(level) = [1]> then\n        hide\n    end\n    if <(level) = [2]> then\n        hide\n    end\n    if <(level) = [3]> then\n        show\n        go to x: (-142) y: (-70)\n    end\n    if <(level) = [4]> then\n        show\n        go to x: (-191) y: (84)\n    end\n    if <(level) = [5]> then\n        show\n        go to x: (-84) y: (-161)\n    end\n    if <(level) = [6]> then\n        show\n        go to x: (0) y: (-70)\n    end\n    if <(level) = [7]> then\n        hide\n    end\n    if <(level) = [8]> then\n    if <(level) = [9]> then\n        show\n        go to x: (76) y: (-62)\n    end\n    if <(level) = [10]> then\n        hide\n    end\n    if <(level) = [11]> then\n        show\n        go to x: (54) y: (-146)\n    end\n    if <(level) = [12]> then\n        show\n        go to x: (49) y: (55)\n    end\n    if <(level) = [13]> then\n        show\n        go to x: (244) y: (14)\n    end\n    if <(level) = [14]> then\n        hide\n    end\n    if <(level) = [15]> then\n        show\n        go to x: (120) y: (-153)\n    end\n    if <(level) = [16]> then\n        hide\n    end\nend\n\ngo to [back v] layer\n\n@smasher\n\nwhen flag clicked\nset [level v] to [1]\nhide\n\nwhen flag clicked\nset [level v] to [1]\n\nwhen I receive [superdeeduperdeenextlvl v]\nstop [other scripts in sprite v]\nbroadcast (go v)\n\nwhen I receive [go v]\nshow\ngo to x: (0) y: (0)\nforever\n    switch costume to (level)\nend\n\nwhen I receive [go v]\nforever\n    set [stomper fall v] to [0]\n    repeat until <touching (ground 2 v)?>\n        change y by (stomper fall)\n        change [stomper fall v] by (-1)\n    end\n    set [stomper fall v] to [0]\n    repeat (60)\n        change y by (4)\n    end\nend\n\ngo to x: (0) y: (0)\n\n@spikes\n\nwhen flag clicked\nforever\n    switch costume to (level)\nend\n\n@flag\n\nwhen flag clicked\ngo to x: (0) y: (0)\ngo to [front v] layer\nforever\n    show\n    switch costume to (level)\nend\n\n@Thumbnail\n\n@water\n\nwhen flag clicked\nshow\ngo to [front v] layer\nforever\n    switch costume to (level)\n    set y to ((0) + ((10) * ([cos v] of (((timer) - (50)) * (300)) )))\nend\n\nchange y by (10)\n\n@Thumbnail2\n\nwhen flag clicked\nforever\n    go to [front v] layer\n    set [ghost v] effect to (100)\n    show\nend\n\n@enemie\n\ndefine up/down\nif <touching (ground v)?> then\n    repeat until <not <touching (ground v)?>>\n        change y by (1)\n    end\nend\n\ndefine patrol\nshow\nset rotation style [left-right v]\nrepeat until <not <(level) = (enemylvlselect)>>\n    set size to (65) %\n    point in direction (90)\n    repeat (30)\n        change x by (5)\n    end\n    wait (0.5) seconds\n    point in direction (-90)\n    repeat (30)\n        change x by (-5)\n    end\n    wait (0.5) seconds\nend\ndelete this clone\n\nwhen I receive [superdeeduperdeenextlvl v]\ndelete this clone\n\nwhen I start as a clone\nset [my lvl # v] to (clone level #)\nif <(level) = [1]> then\nif <(level) = [2]> then\nif <(level) = [3]> then\nif <(level) = [4]> then\nif <(level) = [5]> then\nif <(level) = [6]> then\n    if <(enemy number) = [1]> then\n        go to x: (-140) y: (-43)\n        up/down\n        patrol\n    end\n    if <(enemy number) = [2]> then\n        go to x: (140) y: (-43)\n        up/down\n        patrol\n    end\nend\nif <(level) = [7]> then\nif <(level) = [8]> then\nif <(level) = [9]> then\nif <(level) = [10]> then\nif <(level) = [11]> then\n    go to x: (0) y: (18)\n    up/down\n    patrol\nend\nif <(level) = [12]> then\n    go to x: (100) y: (-75)\n    up/down\n    patrol\nend\nif <(level) = [13]> then\n    if <(enemy number) = [1]> then\n        go to x: (0) y: (105)\n        up/down\n        patrol\n    end\n    if <(enemy number) = [2]> then\n        go to x: (0) y: (-30)\n        up/down\n        patrol\n    end\nend\nif <(level) = [14]> then\nend\nif <(level) = [15]> then\nif <(level) = [16]> then\n\nwhen flag clicked\nhide\nforever\n    if <(level) = [1]> then\n    if <(level) = [2]> then\n    if <(level) = [3]> then\n    if <(level) = [4]> then\n    if <(level) = [5]> then\n    if <(level) = [6]> then\n        set [enemy number v] to [1]\n        set [clone level # v] to [1]\n        create clone of (_myself_ v)\n        set [enemy number v] to [2]\n        create clone of (_myself_ v)\n        set [enemylvlselect v] to (level)\n        wait until <not <(enemylvlselect) = (level)>>\n    end\n    if <(level) = [7]> then\n    if <(level) = [8]> then\n    if <(level) = [9]> then\n    if <(level) = [10]> then\n    if <(level) = [11]> then\n        set [clone level # v] to [1]\n        create clone of (_myself_ v)\n        set [enemylvlselect v] to (level)\n        wait until <not <(enemylvlselect) = (level)>>\n    end\n    if <(level) = [12]> then\n        set [clone level # v] to [1]\n        create clone of (_myself_ v)\n        set [enemylvlselect v] to (level)\n        wait until <not <(enemylvlselect) = (level)>>\n    end\n    if <(level) = [13]> then\n        set [enemy number v] to [1]\n        set [clone level # v] to [1]\n        create clone of (_myself_ v)\n        set [enemy number v] to [2]\n        create clone of (_myself_ v)\n        set [enemylvlselect v] to (level)\n        wait until <not <(enemylvlselect) = (level)>>\n    end\n    if <(level) = [14]> then\n    end\n    if <(level) = [15]> then\n    if <(level) = [16]> then\nend\n\nwhen I start as a clone\nset [brightness v] effect to (25)\nforever\n    play sound [jaguarrors v] until done\nend\n\ncreate clone of (_myself_ v)\nset [enemylvlselect v] to (level)\nwait until <not <(enemylvlselect) = (level)>>\n\nset [clone level # v] to [1]\ncreate clone of (_myself_ v)\nset [enemylvlselect v] to (level)\nwait until <not <(enemylvlselect) = (level)>>\n\nset [clone level # v] to [1]\ncreate clone of (_myself_ v)\nset [enemylvlselect v] to (level)\nwait until <not <(enemylvlselect) = (level)>>\n\ngo to x: (0) y: (-10)\nup/down\npatrol\n\n@Sprite1\n\nwhen flag clicked\nhide\n\nwhen I receive [end v]\nshow\ngo to x: (0) y: (0)\n\n@Intro\n\nwhen flag clicked\nbroadcast (PLAY v)\nhide\n\nset [brightness v] effect to (-10)\nset [ghost v] effect to (0)\nshow\npoint in direction (90)\nswitch costume to (costume1 v)\nset [ghost v] effect to (0)\nset size to (175) %\nrepeat (146)\n    wait (0.01) seconds\n    go to [front v] layer\n    next costume\nend\nrepeat (100)\n    go to [front v] layer\n    change [ghost v] effect by (1)\nend\nrepeat (25)\n    change [ghost v] effect by (4)\nend\n\n@Music\n\nwhen flag clicked\nforever\n    play sound [sketch land  v] until done\nend\n\n