Homework vs. Video Games  - A Platformer #Games #Games #Games  #All #Games #Games #Games #Games 

Instructions: PART 2: https://scratch.mit.edu/projects/559803325/\n\nPART 3: https://scratch.mit.edu/projects/560771855/\n\nPART 4: https://scratch.mit.edu/projects/561037787/\nS or down arrow to crouch\n\n\nArrow keys or WASD \n\n\n\n\n\n\n

@Stage\n\n@Player\n\nwhen flag clicked\nshow\nset [level v] to [1]\nbroadcast (Next Level v)\nforever\n    if <<key (left arrow v) pressed?> or <key (a v) pressed?>> then\n        change [x velocity v] by (-1.5)\n    end\n    if <<key (right arrow v) pressed?> or <key (d v) pressed?>> then\n        change [x velocity v] by (1.5)\n    end\n    set [x velocity v] to ((X Velocity) * (0.85))\n    change x by (X Velocity)\n    if <touching (ground v)?> then\n        change y by (1)\n    end\n    if <touching (ground v)?> then\n        change y by (1)\n    end\n    if <touching (ground v)?> then\n        change y by (1)\n    end\n    if <touching (ground v)?> then\n        change y by (1)\n    end\n    if <touching (ground v)?> then\n        change y by (-4)\n        change x by ((X Velocity) * (-1))\n        if <<key (up arrow v) pressed?> or <key (w v) pressed?>> then\n            if <(X Velocity) > [0]> then\n                set [x velocity v] to [-10]\n            else\n                set [x velocity v] to [10]\n            end\n            set [y velocity v] to [15]\n        else\n            set [x velocity v] to [0]\n        end\n    end\n    change [y velocity v] by (-1)\n    change y by (Y Velocity)\n    if <touching (ground v)?> then\n        change y by ((Y Velocity) - ((Y Velocity) * (2)))\n        set [y velocity v] to [0]\n        if <<key (down arrow v) pressed?> or <key (s v) pressed?>> then\n            switch costume to (crouch v)\n        else\n            switch costume to (player v)\n        end\n    end\n    change y by (-1)\n    if <<touching (ground v)?> and <<key (up arrow v) pressed?> or <key (w v) pressed?>>> then\n        set [y velocity v] to [15]\n    end\n    change y by (1)\n    if <(x position) > [239]> then\n        broadcast (Next Level v) and wait\n        change [level v] by (1)\n    end\n    if <touching (homework v)?> then\n        broadcast (Reset v)\n        create clone of (_myself_ v)\n    else\n        if <<key (down arrow v) pressed?> or <key (s v) pressed?>> then\n            switch costume to (crouch v)\n        else\n            switch costume to (player v)\n        end\n    end\nend\n\nwhen I start as a clone\nclear graphic effects\nrepeat (10)\n    change [ghost v] effect by (10)\n    change y by (5)\n    turn right (5) degrees\nend\ndelete this clone\n\nwhen I receive [next level v]\nbroadcast (Reset v)\n\nwhen I receive [reset v]\nset [x velocity v] to [0]\nset [y velocity v] to [0]\ngo to x: (-216) y: (40)\n\nwhen flag clicked\nforever\n    play sound [bensound-perception v] until done\nend\n\n@Ground\n\nwhen I receive [next level v]\nnext costume\n\nwhen flag clicked\nswitch costume to (costume10 v)\n\n@Homework\n\nwhen flag clicked\nswitch costume to (costume10 v)\n\nwhen I receive [next level v]\nnext costume\n\nwhen flag clicked\nforever\n    if <(Level) > [9]> then\n        hide\n    else\n        show\n    end\nend\n\n@Text\n\nwhen flag clicked\nswitch costume to (costume3 v)\n\nwhen I receive [next level v]\nnext costume\n\nwhen flag clicked\nforever\n    if <(Level) > [3]> then\n        hide\n    else\n        show\n    end\nend\n\n@Sprite1\n\n@Sprite2\n\nwhen flag clicked\nforever\n    if <(Level) = [10]> then\n        show\n    else\n        hide\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Level) = [10]> then\n        say [Hello there young one] for (2) seconds\n        wait (1) seconds\n        say [so you want to know where to go huh?] for (2.5) seconds\n        wait (1) seconds\n        say [Ah so you're an adventurer, listen closely i would recommend sailing to the nearby island of lambore ] for (5) seconds\n        say [There is an island called paiana along the way. Whatever you do not stop there] for (4) seconds\n        broadcast (Animation v)\n        set [level v] to [11]\n    end\nend\n\nwait (1) seconds\n\n@Sprite3\n\nwhen I receive [animation v]\nswitch costume to (costume2 v)\nshow\nset [ghost v] effect to (99)\nrepeat (33)\n    change [ghost v] effect by (-3)\nend\nrepeat (18)\n    next costume\n    wait (.033) seconds\nend\nrepeat (99)\n    change [ghost v] effect by (1)\nend\n\nwhen flag clicked\nhide\n\n@Sprite4\n\nwhen flag clicked\nshow variable [level v]\nhide\n\nwhen I receive [animation v]\nhide variable [level v]\nwait (1.3) seconds\nshow\n\n@Sprite5\n\nwhen flag clicked\nhide\ngo to [back v] layer\n\nshow\ngo to [front v] layer\n\n