Generic -A Platformer-  #all #games
@Stage\n\nwhen flag clicked\nswitch backdrop to (backdrop1 v)\n\nwhen I receive [next level v]\nnext backdrop\n\n@Player\n\nwhen flag clicked\ngo to x: (-201) y: (-90)\nset [x velocity v] to [0]\nset [y velocity v] to [0]\nset [x v] to [1]\nforever\n    Platform Gravity: [-1] Jump Height: [12.5] Movement Speed: [1.8] Friction: [.8] 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 (danger v)?> then\n        go to x: (-201) y: (-90)\n    end\nend\n\nwhen flag clicked\nforever\n    if <<<touching (wall jump left v)?> and <<key (w v) pressed?> and <key (d v) pressed?>>> or <<touching (wall jump left v)?> and <<key (up arrow v) pressed?> and <key (right arrow v) pressed?>>>> then\n        set [x velocity v] to [-20]\n        set [y velocity v] to [13.5]\n    end\nend\n\nwhen flag clicked\nforever\n    if <<<touching (wall jump right v)?> and <<key (w v) pressed?> and <key (a v) pressed?>>> or <<touching (wall jump right v)?> and <<key (up arrow v) pressed?> and <key (left arrow v) pressed?>>>> then\n        set [x velocity v] to [20]\n        set [y velocity v] to [13.5]\n    end\nend\n\nwhen flag clicked\nforever\n    if <touching (next level v)?> then\n        broadcast (Next Level v)\n    end\nend\n\nwhen I receive [next level v]\ngo to x: (-201) y: (-90)\n\nwhen flag clicked\nforever\n    if <touching (bounce pad v)?> then\n        set [y velocity v] to [18]\n    end\nend\n\n@Level\n\nwhen flag clicked\nswitch costume to (costume1 v)\n\nwhen I receive [next level v]\nnext costume\n\n@Danger\n\nwhen flag clicked\nswitch costume to (costume1 v)\n\nwhen I receive [next level v]\nnext costume\n\n@Wall Jump Left\n\nwhen flag clicked\nswitch costume to (costume1 v)\n\nwhen I receive [next level v]\nnext costume\n\n@Wall Jump Right\n\nwhen flag clicked\nswitch costume to (costume1 v)\n\nwhen I receive [next level v]\nnext costume\n\n@Bounce Pad\n\nwhen flag clicked\nswitch costume to (costume1 v)\n\nwhen I receive [next level v]\nnext costume\n\n@Next Level\n\n@Sound\n\nwhen flag clicked\nforever\n    play sound [Awesome Song1 v] until done\nend\n\nwhen this sprite clicked\nnext costume\nif <(costume [number v]) = [2]> then\n    set volume to (0) %\nelse\n    set volume to (100) %\nend\n\nwhen flag clicked\nset volume to (150) %\ngo to x: (192) y: (152)\nset drag mode [not draggable v]\nswitch costume to (costume1 v)\nset [brightness v] effect to (0)\n\nwhen I receive [music v]\nplay sound [Awesome Song1 v] until done\n\n@Thumbnail\n\nwhen flag clicked\nset [ghost v] effect to (0)\nwait (0) 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
<RESHARED> fixed bugs due to this\n\nControls:\nWASD and Arrow Keys to move.\n\nObjective:\nWelcome to Generic A Platformer! Wall jump to get around obstacles \nand Avoid all Red! Yellow is a Bounce pad, use it as a advantage!\nMake your way through and get to the right side of our screen!\n\nInspired by: \nNeon