City 2 l A Platformer #All #Games #Trending  

Instructions: ✦✦ City 2 ll A Platformer✦✦ \nShoutout - @NovaSpecter    \nCheck these out-   \nhttps://scratch.mit.edu/projects/964498652/ [Underrated]\n+ https://scratch.mit.edu/projects/976006434/  \n————————————————————————\nHi! Welcome to my newest platformer! I spent a while on this, so I hope you enjoy! :D\nThis will probably be my last project for a few months ;)\nAs promised, here is part 2! :D\nA ❤ + ⭐ would be appreciated!\nCould we get this on trending? :DD\nEvery level is 100% possible :)\n——\n✦ Instructions:\n1. Arrow Keys + WASD [Mobile Friendly] \n2. Avoid Toxic Waste, Spikes, Stop Signs + Cones\n3. Press R to restart the level\n——\n✦ Tags: (Ignore)\n#games#all#trending#games#all#trending#games#all#trending#games#all#trending#games#all#trending#games#all#trending#games#all#trending#games#all#trending#games#all#trending#games#all#trending#games#all#trending#games#all#trending#games#all#trending#games#all#trending

@Stage\n\nwhen flag clicked\nforever\n    play sound [Unlimited v] until done\nend\n\n@Player\n\ndefine X velocity\nset rotation style [left-right v]\nif <<<key (right arrow v) pressed?> or <key (d v) pressed?>> or <<mouse down?> and <(mouse x) > (x position)>>> then\n    change [x velocity v] by (1)\n    point in direction (90)\nend\nif <<<key (left arrow v) pressed?> or <key (a v) pressed?>> or <<mouse down?> and <(x position) > (mouse x)>>> then\n    change [x velocity v] by (-1)\n    point in direction (-90)\nend\nset [x velocity v] to ((X velocity) * (.9))\nchange x by (X velocity)\n\ndefine Collision and Wall Jump\nif <touching (ground v)?> then\n    change y by (1)\n    if <touching (ground v)?> then\n        change y by (1)\n        if <touching (ground v)?> then\n            change y by (1)\n            if <touching (ground v)?> then\n                change y by (1)\n                if <touching (ground v)?> then\n                    change y by (1)\n                    if <touching (ground v)?> then\n                        change x by ((X velocity) * (-1))\n                        change y by (-5)\n                        Wall jump\n                    end\n                    change [x velocity v] by (1)\n                end\n            end\n        end\n    end\nend\nchange [y velocity v] by (-0.75)\nchange y by (Y velocity)\nif <touching (ground v)?> then\n    change y by ((Y velocity) * (-1))\n    set [y velocity v] to [0]\nend\nchange y by (-1)\n\ndefine Y velocity\nif <touching (ground v)?> then\n    if <<<key (space v) pressed?> or <<key (up arrow v) pressed?> or <key (w v) pressed?>>> or <<mouse down?> and <(mouse y) > (y position)>>> then\n        start sound [Low Whoosh v]\n        change [y velocity v] by (14)\n    end\nend\nchange y by (1)\n\ndefine Wall jump\nif <<<key (space v) pressed?> or <<key (up arrow v) pressed?> or <key (w v) pressed?>>> or <<mouse down?> and <(mouse y) > (y position)>>> then\n    if <(X velocity) > [0]> then\n        set [x velocity v] to [-10]\n    else\n        set [x velocity v] to [7]\n    end\n    set [y velocity v] to [10]\nelse\n    set [x velocity v] to [0]\nend\n\ndefine Death\nif <<touching (danger v)?> or <touching (toxic waste v)?>> then\n    start sound [Crunch v]\n    broadcast (dead v)\n    go to x: (-190) y: (55)\nend\n\ndefine Trampoline Jump\nif <touching (trampoline v)?> then\n    if <(Y velocity) < [0]> then\n        set [y velocity v] to [18]\n    end\nend\n\ndefine Level Change\nif <(x position) > [235]> then\n    if <(LEVEL) < [14]> then\n        go to x: (-190) y: (55)\n        switch backdrop to (yor mum v)\n        start sound [Connect v]\n        broadcast (message1 v)\n        change [level v] by (1)\n    end\nend\n\nset [flag v] to [0]\n\nwhen flag clicked\nswitch costume to (green v)\n\nwhen I receive [end intro v]\n\nwhen flag clicked\nhide\n\nwhen flag clicked\nbroadcast (Cloud - Setup v) and wait\nshow\ngo to x: (-190) y: (135)\nset [level v] to [1]\nset [x velocity v] to [0]\nset [y velocity v] to [0]\nforever\n    X velocity\n    Y velocity\n    add (x position) to [my values to send v]\n    add (y position) to [my values to send v]\n    add (LEVEL) to [my values to send v]\n    broadcast (Cloud - Tick v)\n    Collision and Wall Jump\n    Death\n    Trampoline Jump\n    Level Change\nend\n\nwhen [r v] key pressed\ngo to x: (-190) y: (135)\n\nwhen [right arrow v] key pressed\nswitch costume to (costume2 v)\n\nwhen [up arrow v] key pressed\nswitch costume to (costume3 v)\n\n@Ground\n\nwhen flag clicked\nforever\n    go to x: (0) y: (0)\n    switch costume to (LEVEL)\nend\n\n@Danger\n\nwhen flag clicked\nforever\n    switch costume to (LEVEL)\n    go to [back v] layer\nend\n\n@Text\n\nwhen flag clicked\nforever\n    switch costume to (LEVEL)\n    go to [front v] layer\nend\n\n@Toxic Waste\n\nwhen flag clicked\nforever\n    switch costume to (LEVEL)\n    go to [back v] layer\nend\n\nwhen flag clicked\nforever\n    glide (1) secs to x: (65) y: (75)\n    glide (1) secs to x: (65) y: (53)\nend\n\n@Assets\n\nwhen flag clicked\nforever\n    hide\nend\n\n@Tn\n\nwhen flag clicked\nforever\n    hide\nend\n\n