NeoCity -A Platformer-  #all #games

Instructions: NeoCity!\n\nControls:\nWASD|Arrow Keys\nW= Jump  A= Left  D= Right\nUp Arrow= Jump  Left Arrow= left  Right Arrow= right\n\nObjective:\nescape the deadly spikes and get to your house! can you make it there?

@Stage\n\nwhen flag clicked\nforever\n    play sound [yt1s v] until done\n    wait (0.5) seconds\nend\n\n@Player\n\nwhen flag clicked\ngo to x: (-201) y: (-100)\nset [x velocity v] to [0]\nset [y velocity v] to [0]\nset [x v] to [1]\nforever\n    Platform Gravity: [-1] Jump Height: [14] Movement Speed: [3] Friction: [.7] Slopes: [8]\nend\n\ndefine Platform Gravity: (gravity) Jump Height: (jump height) Movement Speed: (side movement speed) Friction: (friction) Slopes: (slope)\nchange [y velocity v] by (gravity)\nchange y by (Y Velocity)\nif <touching (level v)?> then\n    repeat until <not <touching (level v)?>>\n        change y by ((([abs v] of (Y Velocity) ) / (Y Velocity)) * (-1))\n    end\n    set [y velocity v] to (<<<key (w v) pressed?> or <key (up arrow v) pressed?>> and <(([abs v] of (Y Velocity) ) / (Y Velocity)) = [-1]>> * (jump height))\nend\nset [x velocity v] to (((X Velocity) + ((<<key (a v) pressed?> or <key (left arrow v) pressed?>> * ((side movement speed) * (-1))) + (<<key (d v) pressed?> or <key (right arrow v) pressed?>> * (side movement speed)))) * (friction))\nchange x by (X Velocity)\nset [slope v] to [0]\nrepeat until <<(Slope) = ((slope) * (-1))> or <not <touching (level v)?>>>\n    change y by (1)\n    change [slope v] by (-1)\nend\nif <touching (level v)?> then\n    change y by (Slope)\n    repeat until <not <touching (level v)?>>\n        change x by ((([abs v] of (X Velocity) ) / (X Velocity)) * (-1))\n    end\nend\n\nwhen flag clicked\nforever\n    if <touching (spikes v)?> then\n        go to x: (-201) y: (-100)\n    end\nend\n\nwhen I receive [next level v]\nwait (0.5) seconds\ngo to x: (-201) y: (-100)\n\nwhen flag clicked\nforever\n    if <touching (next level v)?> then\n        broadcast (Next Level v)\n    end\nend\n\nwhen flag clicked\nforever\n    if <touching (bounce pad v)?> then\n        set [y velocity v] to [17]\n    end\nend\n\nwhen flag clicked\nforever\n    if <touching (speed pad v)?> then\n        set [x velocity v] to [30]\n    end\nend\n\n@Pop\n\nwhen flag clicked\nshow\nforever\n    go to (player v)\nend\n\n@Level\n\nwhen flag clicked\nswitch costume to (costume1 v)\n\nwhen I receive [next level v]\nwait (0.5) seconds\nnext costume\n\n@Spikes\n\nwhen flag clicked\nswitch costume to (costume1 v)\n\nwhen I receive [next level v]\nwait (0.5) seconds\nnext costume\n\n@Bounce Pad\n\nwhen flag clicked\nswitch costume to (costume1 v)\n\nwhen I receive [next level v]\nwait (0.5) seconds\nnext costume\n\n@Speed Pad\n\nwhen flag clicked\nswitch costume to (costume1 v)\n\nwhen I receive [next level v]\nwait (0.5) seconds\nnext costume\n\n@Glow\n\nwhen flag clicked\nswitch costume to (costume1 v)\n\nwhen I receive [next level v]\nwait (0.5) seconds\nnext costume\n\n@Background\n\nwhen flag clicked\nswitch costume to (city v)\nset size to (100) %\ngo to [back v] layer\nforever\n    set y to (([y position v] of [player v]) * (-0.07))\n    set x to (([x position v] of [player v]) * (-0.07))\nend\n\nwhen flag clicked\nforever\n    wait (0.46) seconds\n    next costume\nend\n\n@Radial\n\nwhen flag clicked\nforever\n    turn right (2) degrees\nend\n\nwhen flag clicked\ngo to [back v] layer\n\n@Radial2\n\nwhen flag clicked\ngo to x: (-190) y: (-40)\nforever\n    turn left (2) degrees\nend\n\nwhen flag clicked\ngo to [back v] layer\n\n@Radial3\n\nwhen flag clicked\ngo to x: (210) y: (-25)\nforever\n    turn left (2) degrees\nend\n\nwhen flag clicked\ngo to [back v] layer\n\n@Next Level\n\nwhen I receive [next level v]\nhide\nwait (0.5) seconds\nshow\n\n@Transition\n\nwhen flag clicked\nhide\n\nwhen I receive [transition v]\nset [color v] effect to ((1) / (0))\ngo to x: (0) y: (0)\nset size to (0) %\nshow\nset [size v] to [100]\nrepeat until <(size) > [4090]>\n    thing\nend\nset size to (10) %\nset [size v] to [10]\nrepeat until <(size) > [400]>\n    other thing\nend\nhide\n\ndefine thing\nswitch costume to (hax v)\nset size to (size) %\nchange size by (((4100) - (size)) / (5))\nset [size v] to (size)\nswitch costume to (thing v)\n\ndefine other thing\nswitch costume to (hax v)\nset size to (size) %\nchange size by (((403) - (size)) / (6))\nset [size v] to (size)\nswitch costume to (weird thing v)\n\nwhen I receive [next level v]\nbroadcast (transition v)\n\nwhen flag clicked\nbroadcast (transition v)\n\n@Thumbnail\n\nwhen flag clicked\nset [ghost v] effect to (0)\nwait (0.5) seconds\nrepeat (10)\n    change [ghost v] effect by (10)\n    broadcast (Green Flag clicked v)\nend\nforever\n    show\n    go to [front v] layer\n    set [ghost v] effect to (100)\nend\n\n