Chase - a platformer, i guess #all #games
@Stage\n\nwhen I receive [play v]\nswitch backdrop to (backdrop1 v)\nforever\n    play sound [Vector OST - Nocopyright sound 2020 - Downtown Theme Extended v] until done\nend\n\nwhen I receive [play v]\nset volume to (0) %\nrepeat (50)\n    change volume by (1)\nend\n\n@blank\n\n@player\n\ndefine platform (gravity) (speed) (friction) (jump) (slope)\nswitch costume to (hitbox v)\nchange [yv v] by (gravity)\nchange y by (yv)\nif <touching (ground collide v)?> then\n    repeat until <not <touching (ground collide v)?>>\n        change y by ((([abs v] of (yv) ) / (yv)) * (-1))\n    end\n    set [yv v] to (<<<<<key (any v) pressed?> or <mouse down?>> and <not <key ((join [] [enter]) v) pressed?>>> and <not <(x) > [7500]>>> and <(([abs v] of (yv) ) / (yv)) = [-1]>> * (jump))\nend\nset [xv v] to (((xv) + (speed)) * (friction))\nif <(username) = [surlo_gamez]> then\n    if <key ((join [] [enter]) v) pressed?> then\n        set [xv v] to [0]\n    end\nend\nif <(x) > [7700]> then\n    set [xv v] to [0]\n    broadcast (end v)\n    stop [this script v]\nend\nchange x by (xv)\ncheck\nset [slope v] to [0]\nrepeat until <<(slope) = ((slope) * (-1))> or <not <touching (ground collide v)?>>>\n    change [slope v] by (-1)\n    change y by [1]\nend\nif <touching (ground collide v)?> then\n    change y by (slope)\n    broadcast (ded v)\n    stop [this script v]\nend\nif <touching (obstacles v)?> then\n    broadcast (ded v)\n    stop [this script v]\nend\nif <(y) < [-310]> then\n    broadcast (ded v)\n    stop [this script v]\nend\nchange cam\nswitch costume to (hitbox2 v)\nif <touching (ground collide v)?> then\n    switch costume to (cos#)\nelse\n    switch costume to (costume5 v)\nend\n\ndefine change x by (#)\nchange [x v] by (#)\nposition\n\ndefine change y by (#)\nchange [y v] by (#)\nposition\n\ndefine position\ngo to x: (((x) - (scroll x)) - (70)) y: (((y) - (35)) - (scroll y))\nbroadcast (position v)\n\ndefine check\nif <not <(checkpoint #) > ((length of [checkpoint x v]) - (1))>> then\n    if <(x) > (item ((checkpoint #) + (1)) of [checkpoint x v])> then\n        change [checkpoint # v] by (1)\n    end\nend\nif <(scroll y) < [-120]> then\n    set [scroll y v] to [-120]\nend\n\nwhen I receive [resume v]\nset [cos# v] to [3]\nforever\n    if <([floor v] of ([abs v] of (xv) ) ) > [1]> then\n        wait (0.05) seconds\n        change [cos# v] by (1)\n        if <(cos#) = [9]> then\n            set [cos# v] to [4]\n        end\n    else\n        set [cos# v] to [3]\n    end\nend\n\nwhen I receive [resume v]\ngo to [front v] layer\nclear graphic effects\nshow\nset rotation style [left-right v]\nset [brightness v] effect to (-100)\nset [ghost v] effect to (0)\nset size to (90) %\npoint in direction (90)\nset [xv v] to [0]\nset [yv v] to [0]\nset [x v] to (item (checkpoint #) of [checkpoint x v])\nset [y v] to ((item (checkpoint #) of [checkpoint y v]) + (10))\nforever\n    platform [-0.8] [0.9] [0.845] [9] [7]\n    position\nend\n\nwhen I receive [ded v]\nstop [other scripts in sprite v]\nswitch costume to (cos#)\nrepeat (10)\n    change size by (10)\n    change [ghost v] effect by (10)\nend\nbroadcast (death effect v)\nwait (1) seconds\nset [scroll x v] to (item (checkpoint #) of [checkpoint x v])\nset [scroll y v] to (item (checkpoint #) of [checkpoint y v])\nbroadcast (resume v)\n\nwhen I receive [play v]\nhide\nset [checkpoint # v] to [1]\nset [change cam v] to [y]\nset [scroll x v] to (item (checkpoint #) of [checkpoint x v])\nset [scroll y v] to (item (checkpoint #) of [checkpoint y v])\nif <(checkpoint #) = [1]> then\n    set [change cam v] to [n]\n    set [scroll x v] to [20]\n    set [scroll y v] to [10]\nend\nset [x v] to [0]\nset [y v] to [0]\nwait (0) seconds\nposition\nwait (1) seconds\nbroadcast (resume v)\nif <(checkpoint #) = [1]> then\n    wait (1.5) seconds\n    set [change cam v] to [y]\nend\n\nwhen flag clicked\nhide\ndelete all of [checkpoint x v]\ndelete all of [checkpoint y v]\nadd checkpoint [-70] [200]\nadd checkpoint [119] [-64]\nadd checkpoint [780] [-92]\nadd checkpoint [1370] [-92]\nadd checkpoint [1900] [-92]\nadd checkpoint [2900] [-63]\nadd checkpoint [3707] [-63]\nadd checkpoint [5304] [-133]\nadd checkpoint [6150] [-85]\nbroadcast (animation v) and wait\n\ndefine add checkpoint (x) (y)\nadd (x) to [checkpoint x v]\nadd (y) to [checkpoint y v]\n\ndefine change cam\nif <(change cam) = [y]> then\n    change [scroll x v] by (round ((((x) - (scroll x)) + (70)) / (10)))\n    change [scroll y v] by (round ((((y) + (35)) - (scroll y)) / (10)))\nend\n\nwhen I receive [end v]\nstop [other scripts in sprite v]\nswitch costume to (costume1 v)\nwait (1) seconds\nswitch costume to (costume7 v)\nrepeat (3)\n    wait (0.1) seconds\n    next costume\nend\nwait (2) seconds\nbroadcast (finally... v)\nhide\n\nbroadcast (play v)\n\n@ground collide\n\nwhen I receive [position v]\nset size to (200) %\ngo to x: ((tile x) - (scroll x)) y: ((tile y) - (scroll y))\nset size to (100) %\n\nwhen I start as a clone\nset [brightness v] effect to (0)\nshow\nforever\n    check if on edge\nend\n\ndefine switch to (right cos)\nswitch costume to (right cos)\nif <not <(costume [name v]) = (right cos)>> then\n    switch costume to (blank v)\nend\n\nwhen I receive [play v]\nhide\nset [tile x v] to [480]\nset [tile y v] to [0]\ncreate clone of (_myself_ v)\nset [tile x v] to [480]\nset [tile y v] to [360]\ncreate clone of (_myself_ v)\nset [tile x v] to [0]\nset [tile y v] to [360]\ncreate clone of (_myself_ v)\nset [tile x v] to [0]\nset [tile y v] to [0]\ncreate clone of (_myself_ v)\n\ndefine check if on edge\nif <((tile x) - (scroll x)) > [480]> then\n    change [tile x v] by (-960)\nend\nif <[-480] > ((tile x) - (scroll x))> then\n    change [tile x v] by (960)\nend\nif <[-360] > ((tile y) - (scroll y))> then\n    change [tile y v] by (720)\nend\nif <((tile y) - (scroll y)) > [360]> then\n    change [tile y v] by (-720)\nend\nswitch to (join (join ((tile x) / (480)) [-]) ((tile y) / (360)))\n\n@ground render\n\nwhen I receive [position v]\nset size to (200) %\ngo to x: ((tile x) - (scroll x)) y: ((tile y) - (scroll y))\nset size to (100) %\n\nwhen I start as a clone\ngo [backward v] (5) layers\nset [brightness v] effect to (0)\nshow\nforever\n    check if on edge\nend\n\ndefine switch to (right cos)\nswitch costume to (right cos)\nif <not <(costume [name v]) = (right cos)>> then\n    switch costume to (blank v)\nend\n\nwhen I receive [play v]\nhide\nset [tile x v] to [480]\nset [tile y v] to [0]\ncreate clone of (_myself_ v)\nset [tile x v] to [480]\nset [tile y v] to [360]\ncreate clone of (_myself_ v)\nset [tile x v] to [0]\nset [tile y v] to [360]\ncreate clone of (_myself_ v)\nset [tile x v] to [0]\nset [tile y v] to [0]\ncreate clone of (_myself_ v)\n\ndefine check if on edge\nif <((tile x) - (scroll x)) > [480]> then\n    change [tile x v] by (-960)\nend\nif <[-480] > ((tile x) - (scroll x))> then\n    change [tile x v] by (960)\nend\nif <[-360] > ((tile y) - (scroll y))> then\n    change [tile y v] by (720)\nend\nif <((tile y) - (scroll y)) > [360]> then\n    change [tile y v] by (-720)\nend\nswitch to (join (join ((tile x) / (480)) [-]) ((tile y) / (360)))\n\n@obstacles\n\nwhen I receive [position v]\nset size to (200) %\ngo to x: ((tile x) - (scroll x)) y: ((tile y) - (scroll y))\nset size to (100) %\n\nwhen I start as a clone\ngo [forward v] (5) layers\nset [brightness v] effect to (0)\nshow\nforever\n    if <((tile x) - (scroll x)) > [480]> then\n        change [tile x v] by (-960)\n    end\n    if <[-480] > ((tile x) - (scroll x))> then\n        change [tile x v] by (960)\n    end\n    if <[-360] > ((tile y) - (scroll y))> then\n        change [tile y v] by (720)\n    end\n    if <((tile y) - (scroll y)) > [360]> then\n        change [tile y v] by (-720)\n    end\n    switch to (join (join ((tile x) / (480)) [-]) ((tile y) / (360)))\nend\n\ndefine switch to (right cos)\nswitch costume to (right cos)\nif <not <(costume [name v]) = (right cos)>> then\n    switch costume to (blank v)\nend\n\nwhen I receive [play v]\nhide\nset [tile x v] to [480]\nset [tile y v] to [0]\ncreate clone of (_myself_ v)\nset [tile x v] to [480]\nset [tile y v] to [360]\ncreate clone of (_myself_ v)\nset [tile x v] to [0]\nset [tile y v] to [360]\ncreate clone of (_myself_ v)\nset [tile x v] to [0]\nset [tile y v] to [0]\ncreate clone of (_myself_ v)\n\n@back ground\n\nwhen I receive [position v]\nset size to (200) %\ngo to x: ((tile x) - ((scroll x) * (0.7))) y: (((tile y) - ((scroll y) * (0.7))) + (90))\nset size to (100) %\n\nwhen I start as a clone\nset [pixelate v] effect to (10)\nset [color v] effect to (-10)\nset [brightness v] effect to (28)\ngo to [back v] layer\nshow\nforever\n    if <((tile x) - ((scroll x) * (0.7))) > [480]> then\n        change [tile x v] by (-960)\n    end\n    if <[-480] > ((tile x) - ((scroll x) * (0.7)))> then\n        change [tile x v] by (960)\n    end\n    if <[-360] > (((tile y) - ((scroll y) * (0.7))) + (90))> then\n        change [tile y v] by (720)\n    end\n    if <(((tile y) - ((scroll y) * (0.7))) + (90)) > [360]> then\n        change [tile y v] by (-720)\n    end\n    switch to (join (join ((tile x) / (480)) [-]) ((tile y) / (360)))\nend\n\ndefine switch to (right cos)\nswitch costume to (right cos)\nif <not <(costume [name v]) = (right cos)>> then\n    switch costume to (blank v)\nend\n\nwhen I receive [play v]\nhide\nset [tile x v] to [480]\nset [tile y v] to [0]\ncreate clone of (_myself_ v)\nset [tile x v] to [480]\nset [tile y v] to [360]\ncreate clone of (_myself_ v)\nset [tile x v] to [0]\nset [tile y v] to [360]\ncreate clone of (_myself_ v)\nset [tile x v] to [0]\nset [tile y v] to [0]\ncreate clone of (_myself_ v)\n\n@back ground2\n\nwhen I receive [position v]\nset size to (200) %\ngo to x: ((tile x) - ((scroll x) * (0.5))) y: (((tile y) - ((scroll y) * (0.5))) + (120))\nset size to (100) %\n\nwhen I start as a clone\nset [pixelate v] effect to (10)\nset [color v] effect to (-10)\nset [brightness v] effect to (35)\ngo to [back v] layer\nshow\nforever\n    if <((tile x) - ((scroll x) * (0.5))) > [480]> then\n        change [tile x v] by (-960)\n    end\n    if <[-480] > ((tile x) - ((scroll x) * (0.5)))> then\n        change [tile x v] by (960)\n    end\n    if <[-360] > (((tile y) - ((scroll y) * (0.5))) + (120))> then\n        change [tile y v] by (720)\n    end\n    if <(((tile y) - ((scroll y) * (0.5))) + (120)) > [360]> then\n        change [tile y v] by (-720)\n    end\n    switch to (join (join ((tile x) / (480)) [-]) ((tile y) / (360)))\nend\n\ndefine switch to (right cos)\nswitch costume to (right cos)\nif <not <(costume [name v]) = (right cos)>> then\n    switch costume to (blank v)\nend\n\nwhen I receive [play v]\nhide\nset [tile x v] to [480]\nset [tile y v] to [0]\ncreate clone of (_myself_ v)\nset [tile x v] to [480]\nset [tile y v] to [360]\ncreate clone of (_myself_ v)\nset [tile x v] to [0]\nset [tile y v] to [360]\ncreate clone of (_myself_ v)\nset [tile x v] to [0]\nset [tile y v] to [0]\ncreate clone of (_myself_ v)\n\n@dark\n\nwhen I receive [play v]\ngo to x: (0) y: (0)\nhide\n\nwhen flag clicked\ngo to x: (0) y: (0)\nhide\n\nwhen I receive [death effect v]\ngo to x: (0) y: (0)\nshow\nset [ghost v] effect to (100)\nrepeat (10)\n    change [ghost v] effect by (-10)\nend\nwait (0.75) seconds\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nhide\n\n@animation\n\nwhen flag clicked\ngo to x: (0) y: (0)\nhide\n\nwhen I receive [animation v]\nstart sound [Mike Noise   Low Earth Orbit v]\nset size to (100) %\nshow\nscene 1\ngo to x: (0) y: (0)\nswitch costume to (scene 1 v)\nwait (5) seconds\nbroadcast (delete v)\nwait (0) seconds\nscene 2\ngo to x: (0) y: (0)\nswitch costume to (scene 2 v)\nscanner\ngo to x: (0) y: (0)\nswitch costume to (scene 2 v)\nwait (8) seconds\nbroadcast (delete v)\nscene 3\ngo to x: (0) y: (0)\nswitch costume to (scene 3 v)\nwait (7) seconds\nbroadcast (delete v)\nscene 4\ngo to x: (0) y: (0)\nswitch costume to (scene 4 v)\n\nwhen I start as a clone\nset volume to (110) %\ngo to [front v] layer\nshow\nif <(costume [name v]) = [close]> then\n    forever\n        repeat (15)\n            change x by (1.5)\n            change y by (0.5)\n        end\n        repeat (15)\n            change x by (1.5)\n            change y by (-0.5)\n        end\n    end\nend\nif <(costume [name v]) = [far]> then\n    forever\n        repeat (15)\n            change x by (1)\n            change y by (0.3)\n        end\n        repeat (15)\n            change x by (1)\n            change y by (-0.3)\n        end\n    end\nend\nif <(costume [name v]) = [yellow galsses]> then\n    forever\n        repeat (16)\n            change y by (0.4)\n        end\n        repeat (16)\n            change y by (-0.4)\n        end\n    end\nend\nif <(costume [name v]) = [scanner]> then\n    forever\n        change x by (-2)\n        if <(round (x position)) = [-71]> then\n            broadcast (scan v)\n        end\n        if <[-240] > (x position)> then\n            delete this clone\n        end\n    end\nend\nif <(costume [name v]) = [player cos1]> then\n    wait (2) seconds\n    repeat (2)\n        next costume\n        wait (0) seconds\n    end\n    repeat (8)\n        switch costume to (player cos4 v)\n        wait (0.1) seconds\n        switch costume to (player cos3 v)\n        wait (0.1) seconds\n    end\n    wait (0.2) seconds\n    switch costume to (player cos4 v)\n    repeat (7)\n        wait (0.05) seconds\n        next costume\n    end\n    repeat (11)\n        wait (0.1) seconds\n        next costume\n    end\nend\nif <(costume [name v]) = [player cos23]> then\n    switch costume to (player cos23 v)\n    repeat (13)\n        wait (0.1) seconds\n        next costume\n    end\n    wait (1) seconds\n    broadcast (play v)\nend\n\nwhen I receive [delete v]\ndelete this clone\n\ndefine scene 1\nswitch costume to (far v)\ngo to x: (-240) y: ((-100) + (pick random (-7) to (7)))\nrepeat (3)\n    create clone of (_myself_ v)\n    change x by (110)\nend\nswitch costume to (close v)\ngo to x: (-240) y: ((-120) + (pick random (-7) to (7)))\nrepeat (3)\n    create clone of (_myself_ v)\n    change x by (110)\nend\n\ndefine scene 2\ngo to x: (-70) y: (-120)\nswitch costume to (yellow galsses v)\ncreate clone of (_myself_ v)\n\ndefine scanner\ngo to x: (260) y: (0)\nswitch costume to (scanner v)\ncreate clone of (_myself_ v)\n\nwhen I receive [scan v]\nwait (0) seconds\nstart sound [scan v]\nif <(costume [name v]) = [yellow galsses]> then\n    switch costume to (close v)\nend\n\ndefine scene 3\ngo to x: (0) y: (0)\nswitch costume to (player cos1 v)\ncreate clone of (_myself_ v)\n\ndefine scene 4\ngo to x: (0) y: (0)\nswitch costume to (player cos23 v)\ncreate clone of (_myself_ v)\n\nstart sound [i can t take this anymore v]\n\nstart sound (pick random (1) to (3))\n\nwhen I receive [play v]\nhide\nstop all sounds\nstop [other scripts in sprite v]\ndelete this clone\n\nwhen I receive [finally... v]\nswitch costume to (end v)\nshow\n\n@thumbnail\n\nwhen flag clicked\nhide\ngo to x: (0) y: (0)\nforever\n    reset timer\nend\n\nwhen [timer v] > (0.01)\nshow\n\n
tap or any key to jump\n\ni know this looks like its made by 2 different people.\none made the animation, and one made the game.\ni actually made both the animation and the game myself. im just really really bad at animating. im really sry for the bad animation