Baguette (A Mobile Friendly Platformer)|| #games #all

Instructions: In Game. Arrow keys or w, a, d, to move the baguette who's trying to escape the kitchen.\nSince this is a new platformer, there will be some bugs and glitches. At the beginning when it asks for Mobile or computer, the controls are the same for both, but if you choose mobile it's just EASIER.\nmobile - easy\ncomputer - hard

@Stage\n\n@Baguette\n\nwhen flag clicked\nswitch costume to (costume1 v)\ngo to x: (-136) y: (-101)\nset [y velocity v] to [0]\nset [x velocity v] to [0]\nforever\n    Platform Gravity: [-1] Jump Height: [15] Side Speed: [3.4] Friction: [.7] Slope: [8]\nend\n\ndefine Platform Gravity: (gravity) Jump Height: (jump height) Side Speed: (side speed) Friction: (friction) Slope: (slope)\nchange [y velocity v] by (gravity)\nchange y by (Y Velocity)\nif <touching (levels v)?> then\n    repeat until <not <touching (levels v)?>>\n        change y by (([abs v] of (Y Velocity) ) / ((Y Velocity) * (-1)))\n    end\n    set [y velocity v] to (<<<<key (up arrow v) pressed?> or <key (w v) pressed?>> or <<(mouse y) > ((y position) + (40))> and <mouse down?>>> and <(([abs v] of (Y Velocity) ) / (Y Velocity)) = [-1]>> * (jump height))\nend\nset [x velocity v] to (((X Velocity) + ((<<<key (left arrow v) pressed?> or <key (a v) pressed?>> or <<(mouse x) < (x position)> and <mouse down?>>> * ((side speed) * (-1))) + (<<<key (right arrow v) pressed?> or <key (d v) pressed?>> or <<(mouse x) > ((x position) - (10))> and <mouse down?>>> * (side speed)))) * (friction))\nchange x by (X Velocity)\nset [slope v] to [0]\nrepeat until <<(Slope) = ((slope) * (-1))> or <not <touching (levels v)?>>>\n    change y by (1)\n    change [slope v] by (-1)\nend\nif <touching (levels v)?> then\n    change y by (Slope)\n    repeat until <not <touching (levels v)?>>\n        change x by (([abs v] of (X Velocity) ) / ((X Velocity) * (-1)))\n    end\nend\n\ngo to x: (-136) y: (-101)\n\nwhen flag clicked\nforever\n    if <<<key (right arrow v) pressed?> or <key (d v) pressed?>> or <<(mouse x) > (x position)> and <mouse down?>>> then\n        point in direction (90)\n        switch costume to (costume2 v)\n        wait (.1) seconds\n        switch costume to (costume1 v)\n        wait (.1) seconds\n    else\n        switch costume to (costume1 v)\n    end\n    if <<<key (left arrow v) pressed?> or <key (a v) pressed?>> or <<(mouse x) < (x position)> and <mouse down?>>> then\n        switch costume to (costume2 v)\n        wait (.1) seconds\n        switch costume to (costume1 v)\n        wait (.1) seconds\n    else\n        switch costume to (costume1 v)\n    end\nend\n\nwhen I receive [next level v]\nswitch costume to (costume1 v)\ngo to x: (-136) y: (-101)\n\nwhen flag clicked\nforever\n    if <touching (danger v)?> then\n        broadcast (death v)\n    end\nend\n\nswitch costume to (costume1 v)\n\nwhen flag clicked\nforever\n    play sound [Vexento - Masked Heroes v] until done\nend\n\nwhen I receive [death v]\ngo to x: (-136) y: (-101)\nplay sound [Glass Breaking v] until done\nswitch costume to (costume3 v)\nwait (.4) seconds\n\nwhen I receive [set start v]\ngo to x: (-136) y: (-101)\n\nwhen I receive [computer v]\nforever\n    if <(x position) > [290]> then\n        broadcast (Next Level v)\n    end\nend\n\nwhen I receive [mobile v]\nforever\n    if <(x position) > [240]> then\n        broadcast (Next Level v)\n    end\nend\n\nbroadcast (edit v)\n\nbroadcast (edit done v)\n\n@Levels\n\nwhen flag clicked\nswitch costume to (costume1 v)\n\nwhen I receive [next level v]\nnext costume\n\nbroadcast (edit v)\n\nbroadcast (edit done v)\n\n@Danger\n\nwhen flag clicked\nswitch costume to (costume1 v)\n\nwhen I receive [next level v]\nnext costume\n\nbroadcast (edit v)\n\nbroadcast (edit done v)\n\n@Words\n\nwhen flag clicked\nswitch costume to (costume1 v)\n\nwhen I receive [next level v]\nnext costume\n\nbroadcast (edit v)\n\nbroadcast (edit done v)\n\n@RESET\n\nwhen flag clicked\nshow\nforever\n    if <touching (mouse-pointer v)?> then\n        set size to (80) %\n    else\n        set size to (60) %\n    end\nend\n\nwhen this sprite clicked\nbroadcast (set start v)\n\n@Thumbnail\n\nwhen flag clicked\nclear graphic effects\ngo to [front v] layer\nshow\nrepeat (50)\n    change [pixelate v] effect by (1.9)\n    change [ghost v] effect by (1.5)\n    change [brightness v] effect by (1)\n    change [fisheye v] effect by (1)\n    wait (.02) seconds\nend\nhide\n\nhide\n\ngo to [front v] layer\nclear graphic effects\n\nwhen I receive [edit v]\nhide\n\nwhen I receive [edit done v]\nshow\n\n@Menu\n\nwhen flag clicked\nshow\n\nwhen I receive [computer v]\nhide\n\nwhen I receive [mobile v]\nhide\n\nwhen I receive [edit v]\nhide\n\nwhen I receive [edit done v]\nshow\n\n@Mobile\n\ngo to [front v] layer\n\nwhen this sprite clicked\nbroadcast (Mobile v)\n\nwhen I receive [computer v]\nhide\n\nwhen I receive [mobile v]\nhide\n\nwhen flag clicked\nshow\nset size to (100) %\nclear graphic effects\nforever\n    if <touching (mouse-pointer v)?> then\n        change [color v] effect by (15)\n        set size to (120) %\n    else\n        set size to (100) %\n        clear graphic effects\n    end\nend\n\nwhen I receive [edit v]\nhide\n\nwhen I receive [edit done v]\nshow\n\n@Computer\n\ngo to [front v] layer\n\nwhen this sprite clicked\nbroadcast (Computer v)\n\nwhen I receive [mobile v]\nhide\n\nwhen I receive [computer v]\nhide\n\nwhen flag clicked\nshow\nclear graphic effects\nset size to (100) %\nforever\n    if <touching (mouse-pointer v)?> then\n        change [color v] effect by (15)\n        set size to (120) %\n    else\n        set size to (100) %\n        clear graphic effects\n    end\nend\n\nwhen I receive [edit v]\nhide\n\nwhen I receive [edit done v]\nshow\n\n