Sandstorm | Scrolling Platformer #Games #All
@Stage\n\nwhen I receive [win v]\nstop [other scripts in sprite v]\nstop all sounds\n\nwhen I receive [play game v]\nforever\n    play sound [Treenan v] until done\nend\n\n@g\n\nwhen I receive [green flag v]\nhide\ngo to [front v] layer\ngo [backward v] (1) layers\n\nwhen I receive [play game v]\nset [level v] to [1]\nforever\n    start game\n    broadcast (reset v) and wait\n    broadcast (setup v) and wait\n    repeat until <(EXIT) > []>\n        tick\n        broadcast (TICK v) and wait\n    end\n    Game-death\nend\n\ndefine start game\npoint in direction (90)\nset [sx v] to [0]\nset [x v] to (item (Czeckpoint) of [checkpoint x v])\nset [y v] to (item (Czeckpoint) of [checkpoint u v])\nset [sy v] to [0]\nset [scroll y v] to (item (Czeckpoint) of [checkpoint u v])\nset [in air v] to [0]\nset [exit v] to []\nset [scroll x v] to (item (Czeckpoint) of [checkpoint x v])\nset size to (90) %\nclear graphic effects\nshow\n\ndefine tick\nchange [sx v] by (-0.5)\nif <key (left arrow v) pressed?> then\n    change [sx v] by (-2)\nend\nif <key (right arrow v) pressed?> then\n    change [sx v] by (2)\nend\nset [sx v] to ((sx) * (0.8))\nif <([abs v] of (sx) ) > [0.9]> then\n    change player x by (round (sx))\nend\nif <key (up arrow v) pressed?> then\n    if <(in air) < [3]> then\n        change [sy v] by (9)\n    end\nend\nchange [sy v] by (-2)\nchange player y by (sy)\ntest-death?\nchange [scroll x v] by (round (((x) - (SCROLL X)) / (5)))\nif <(SCROLL X) < [0]> then\n    set [scroll x v] to [0]\nend\nif <[3750] < (SCROLL X)> then\n    set [scroll x v] to [3750]\nend\nchange [scroll y v] by ((round (((y) - (SCROLL Y)) / (5))) + (0))\nif <(SCROLL Y) < [0]> then\n    set [scroll y v] to [0]\nend\nposition\nif <(y) < [-180]> then\n    set [exit v] to [f]\n    play sound [Oops v] until done\nend\nif <touching (end v)?> then\n    broadcast (WIN v)\nend\nif <touching (fan v)?> then\n    change [sy v] by (7)\nend\nif <<(Stared?) = [1]> and <(Loved?) = [1]>> then\n    switch costume to (p2 v)\nelse\n    switch costume to (costume3 v)\nend\n\ndefine change player y by (sy)\nchange [y v] by (sy)\nchange [in air v] by (1)\nposition\nrepeat until <not <<touching (platform v)?> or <touching (lift v)?>>>\n    if <(sy) > [0]> then\n        change [y v] by (-1)\n    else\n        change [y v] by (1)\n        set [in air v] to [0]\n    end\n    position\n    set [sy v] to [0]\nend\n\ndefine position\ngo to x: ((x) - (SCROLL X)) y: ((y) - (SCROLL Y))\n\ndefine change player x by (sx)\nchange [x v] by (sx)\nposition\nif <<touching (platform v)?> or <touching (lift v)?>> then\n    repeat (12)\n        change [y v] by (1)\n        position\n        if <not <<touching (platform v)?> or <touching (lift v)?>>> then\n            stop [this script v]\n        end\n    end\n    change [y v] by (-12)\n    repeat until <not <<touching (platform v)?> or <touching (lift v)?>>>\n        if <(sx) > [0]> then\n            change [x v] by (-1)\n        else\n            change [x v] by (1)\n        end\n        position\n    end\nend\n\ndefine Game-death\nset [exit v] to []\nset [lift \(animation\) v] to [10]\nrepeat (20)\n    change y by (lift \(animation\))\n    turn right (18) degrees\n    change [lift \(animation\) v] by (-1)\n    change [ghost v] effect by (5)\nend\nwait (0.5) seconds\n\ndefine test-death?\nif <touching (danger v)?> then\n    set [exit v] to [ow]\n    start sound [ow v]\nend\n\nwhen I receive [win v]\nstop [other scripts in sprite v]\n\n\n\nwait (0.1) seconds\n\nwhen I receive [play game v]\nset [timer v] to [0]\nforever\n    change [timer v] by (0.1)\n    wait (0.1) seconds\nend\n\n@platform\n\nwhen I receive [green flag v]\nhide\n\nwhen I receive [tick v]\npostion ((x) - (SCROLL X)) ((y) - (SCROLL Y))\n\nwhen I receive [setup v]\nwait (0.1) seconds\nset [x v] to [0]\nset [y v] to [0]\nswitch costume to (level 1 1 v)\ncreate clone of (_myself_ v)\nswitch costume to (level 1 2 v)\nchange [x v] by (480)\ncreate clone of (_myself_ v)\nchange [x v] by (480)\nswitch costume to (level 1 3 v)\ncreate clone of (_myself_ v)\nswitch costume to (level 1 4 v)\ncreate clone of (_myself_ v)\nchange [x v] by (480)\nswitch costume to (level 1 5 v)\ncreate clone of (_myself_ v)\nchange [x v] by (480)\nswitch costume to (costume1 v)\ncreate clone of (_myself_ v)\nchange [x v] by (480)\nswitch costume to (costume3 v)\ncreate clone of (_myself_ v)\nswitch costume to (costume2 v)\ncreate clone of (_myself_ v)\nchange [x v] by (450)\nchange [y v] by (100)\nswitch costume to (costume4 v)\ncreate clone of (_myself_ v)\nchange [x v] by (450)\nswitch costume to (costume5 v)\ncreate clone of (_myself_ v)\nchange [x v] by (450)\nswitch costume to (costume6 v)\ncreate clone of (_myself_ v)\n\ndefine postion (x) (y)\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\nelse\n    hide\nend\n\nwhen I receive [reset v]\ndelete this clone\n\nwhen I receive [win v]\nstop [other scripts in sprite v]\n\n@deco\n\nwhen I receive [green flag v]\nhide\n\nwhen I receive [tick v]\npostion ((x) - (SCROLL X)) ((y) - (SCROLL Y))\n\ndefine postion (x) (y)\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\nelse\n    hide\nend\nif <(costume [number v]) = [3]> then\n    set [y v] to ((lift y) + (35))\nend\n\nwhen I receive [setup v]\npoint in direction (90)\nset [x v] to [-40]\nset [y v] to [30]\nswitch costume to (costume1 v)\ncreate clone of (_myself_ v)\nset [x v] to [830]\nset [y v] to [30]\nswitch costume to (costume2 v)\ncreate clone of (_myself_ v)\nset [x v] to [2430]\nset [y v] to [70]\nswitch costume to (costume3 v)\ncreate clone of (_myself_ v)\nset [x v] to [3030]\nset [y v] to [129]\nswitch costume to (costume4 v)\ncreate clone of (_myself_ v)\n\nwhen I receive [reset v]\ndelete this clone\n\nwhen I receive [win v]\nstop [other scripts in sprite v]\n\nchange [x v] by (800)\nchange [y v] by (-30)\nswitch costume to (costume3 v)\n\n@Sprite3\n\nwhen I receive [win v]\nstop [other scripts in sprite v]\n\nwhen flag clicked\ngo to [front v] layer\nset [ghost v] effect to (100)\n\nset [☁ wr v] to [99999]\n\n@danger\n\nwhen I receive [setup v]\nhide\nset [x v] to [90]\nset [y v] to [45]\nswitch costume to (1 v)\ncreate clone of (_myself_ v)\nset [x v] to [403]\nset [y v] to [27]\nswitch costume to (2 v)\ncreate clone of (_myself_ v)\nset [x v] to [895]\nset [y v] to [120]\nswitch costume to (3 v)\ncreate clone of (_myself_ v)\nset [x v] to [965]\nset [y v] to [46]\nswitch costume to (4 v)\ncreate clone of (_myself_ v)\nset [x v] to [1800]\nset [y v] to [46]\nswitch costume to (5 v)\ncreate clone of (_myself_ v)\nset [x v] to [3150]\nset [y v] to [127]\nswitch costume to (6 v)\ncreate clone of (_myself_ v)\nset [x v] to [3550]\nset [y v] to [145]\nswitch costume to (7 v)\ncreate clone of (_myself_ v)\nset [x v] to [9999]\n\nwhen I receive [tick v]\npostion ((x) - (SCROLL X)) ((y) - (SCROLL Y))\n\ndefine postion (x) (y)\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\nelse\n    hide\nend\n\nwhen I receive [green flag v]\n\nwhen I receive [reset v]\nhide\ndelete this clone\n\nwhen I receive [win v]\nstop [other scripts in sprite v]\n\nshow\n\n@W\n\nwhen flag clicked\nhide\n\nwhen I receive [win v]\nwait (0.3) seconds\nswitch costume to (costume1 v)\ngo to [front v] layer\nshow\nset [shake v] to (pick random (-50) to (50))\nset [shake y v] to (pick random (-50) to (50))\nstart sound [Win v]\nrepeat (20)\n    go to x: (shake) y: (shake y)\n    set [shake v] to ((shake) / (-1.2))\n    set [shake y v] to ((shake y) / (-1.2))\nend\n\nwhen I receive [wr v]\nswitch costume to (wr v)\n\nset [☁ wr v] to [9999]\n\n@End\n\nwhen I receive [setup v]\nset [x v] to [3900]\nset [y v] to [215]\nshow\n\nwhen I receive [tick v]\npostion ((x) - (SCROLL X)) ((y) - (SCROLL Y))\n\ndefine postion (x) (y)\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\nelse\n    hide\nend\n\nwhen I receive [green flag v]\nhide\n\nwhen I receive [reset v]\nhide\ndelete this clone\n\nwhen I receive [win v]\nstop [other scripts in sprite v]\n\n@intro\n\nwhen flag clicked\ngo to x: (0) y: (0)\nclear graphic effects\npoint in direction (90)\nhide\nset [id v] to [0]\ncreate clone of (_myself_ v)\nchange [id v] by (1)\ncreate clone of (_myself_ v)\nshow\nswitch costume to (costume1 v)\nbroadcast (Green Flag v) and wait\n\nwhen I start as a clone\nif <(id) = [0]> then\n    show\n    switch costume to (costume2 v)\n    go to [back v] layer\nelse\n    show\n    switch costume to (costume3 v)\n    set [ghost v] effect to (30)\n    go to [front v] layer\n    go to x: (-200) y: (0)\n    turn right (50) degrees\n    start sound [Low Whoosh v]\n    repeat (25)\n        change x by (20)\n    end\n    hide\n    broadcast (Play Game v) and wait\nend\n\nwhen I receive [play game v]\nrepeat (10)\n    change [ghost v] effect by (10)\nend\ndelete this clone\n\n@overlay\n\nwhen flag clicked\nswitch costume to (costume1 v)\nhide\ngo to [front v] layer\ngo to x: (0) y: (0)\nforever\n    reset timer\nend\n\nwhen I receive [play game v]\nshow\nswitch costume to (costume1 v)\nset [ghost v] effect to (30)\nset [ghost v] to [30]\nset [p v] to [1]\nforever\n    if <(p) = [1]> then\n        change [ghost v] by (pick random (3) to (-3))\n        set [ghost v] effect to (ghost)\n        go to [front v] layer\n        if <(ghost) < [10]> then\n            set [ghost v] to [10]\n        end\n        if <[50] < (ghost)> then\n            set [ghost v] to [50]\n        end\n        wait (0.1) seconds\n    else\n        set [ghost v] effect to (100)\n    end\nend\n\nwhen [timer v] > (0.1)\nshow\nset [ghost v] effect to (100)\nswitch costume to (costume2 v)\ngo to x: (0) y: (0)\nset [ghost v] effect to (100)\ngo to [front v] layer\nrepeat (10)\n    change [ghost v] effect by (-10)\nend\n\nwhen I receive [win v]\nstop [other scripts in sprite v]\nhide\nforever\n    reset timer\nend\n\n@Czechpoint\n\nwhen I receive [win v]\nstop [other scripts in sprite v]\n\nwhen I receive [green flag v]\nset [czeckpoint v] to [1]\nhide\n\nwhen I receive [play game v]\nset [czeckpoint v] to [1]\nshow\n\nwhen I receive [reset v]\nhide\ndelete this clone\n\ndefine postion (x) (y)\nif <<(id) = (Czeckpoint)> or <(Czeckpoint) > (id)>> then\n    switch costume to (y v)\nend\nif <touching (g v)?> then\n    if <(costume [number v]) = [1]> then\n        start sound [pixabay v]\n        switch costume to (y v)\n        change [czeckpoint v] by (1)\n    end\nend\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\nelse\n    hide\nend\n\nwhen I receive [tick v]\npostion ((x) - (SCROLL X)) ((y) - (SCROLL Y))\n\nwhen I receive [setup v]\nhide\nswitch costume to (n v)\nset [id v] to [2]\nset [x v] to [1180]\nset [y v] to [85]\ncreate clone of (_myself_ v)\nchange [id v] by (1)\nset [x v] to [2800]\nset [y v] to [185]\ncreate clone of (_myself_ v)\nset [x v] to [99999]\n\nshow\n\n@detector\n\nwhen flag clicked\nset [lock v] to [0]\nforever\n    if <not <<(Loved?) = [1]> and <(Stared?) = [1]>>> then\n        switch costume to (costume1 v)\n        hide\n        wait (15) seconds\n        start sound [Pop v]\n        hide\n        go to x: (150) y: (250)\n        show\n        repeat (10)\n            change y by (-3)\n        end\n        wait (5) seconds\n        repeat (10)\n            change y by (3)\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <<<(Loved?) = [1]> and <(Stared?) = [1]>> and <(lock) = [0]>> then\n        stop [other scripts in sprite v]\n        set [lock v] to [1]\n        switch costume to (costume2 v)\n        clear graphic effects\n        go to x: (150) y: (250)\n        show\n        repeat (10)\n            change y by (-3)\n        end\n        wait (5) seconds\n        repeat (10)\n            change y by (3)\n        end\n        hide\n        stop [this script v]\n    end\nend\n\nwait (1) seconds\nrepeat (10)\n    change [ghost v] effect by (10)\nend\n\n@Detector\n\nwhen flag clicked\nset [both??? v] to [0]\nset [star v] to [false]\nset [heart v] to [false]\nshow\nset [stared? v] to [0]\nset [loved? v] to [0]\n\nwhen flag clicked\n\nset [both??? v] to [0]\nset [stared? v] to [0]\nset [loved? v] to [0]\nforever\n    wait until <<(Stared?) = [1]> and <(Loved?) = [1]>>\n    wait (0.1) seconds\n    set [loved? v] to [0]\n    set [stared? v] to [0]\n    set [both??? v] to ((1) - (both???))\n    if <(both???) = [1]> then\n        change [coins v] by (10)\n        broadcast (alert v)\n        stop [this script v]\n    else\n    end\n    wait until <<(heart) = [false]> and <(star) = [false]>>\n    set [stared? v] to [0]\n    set [loved? v] to [0]\nend\n\nwhen flag clicked\nset [detector di v] to [1]\ncreate clone of (_myself_ v)\n\nwhen I start as a clone\nif <(detector DI) = [1]> then\n    switch costume to (fave v)\n    set [detector di v] to [2]\n    create clone of (_myself_ v)\n    go to x: (-15) y: (0)\n    forever\n        set [star v] to <touching (mouse-pointer v)?>\n        if <touching (mouse-pointer v)?> then\n            set [stared? v] to [1]\n        end\n    end\nelse\n    switch costume to (love v)\n    go to x: (-15) y: (0)\n    show\n    forever\n        set [heart v] to <touching (mouse-pointer v)?>\n        if <touching (mouse-pointer v)?> then\n            set [loved? v] to [1]\n        end\n    end\nend\n\n@text\n\ndefine coordination (#)\nrepeat (#)\n    create clone of (_myself_ v)\n    change [id v] by (1)\nend\n\nwhen I receive [win v]\nwait (0.3) seconds\ngo to x: (-115) y: (-150)\nhide\nset [id v] to [1]\nset [timer v] to ((round ((timer) * (100))) / (100))\nif <(☁ WR) > (timer)> then\n    set [☁ wr v] to (timer)\n    broadcast (wr v)\nend\ncoordination (length of (timer))\n\nwhen flag clicked\nhide\n\nwhen I start as a clone\nshow\ngo to [front v] layer\nchange x by ((id) * (25))\nswitch costume to (letter (id) of (timer))\n\nbroadcast (WIN v)\n\n
Sandstorm\n\n#93 on trending (games) can we go up?! (just kidding :) trending is frozen)\n#27 in tutorials\n➤ heart + fave for a skin!\n\n➤ there is an overlay to represent the sand pushing you backwards\n\n➤ five comments to find!\n\n➤ difficulty scale 8/10\n\n➤ community cloud speedrun record (currently held by @startingcoder with a score of 26.2) Mine is 19.5 :P\n\n\n don't scroll down\n\n\n\n\n\n\n\ncomment: "I read the description"