Deadlocked (Platformer)
@Stage\n\nwhen flag clicked\nswitch backdrop to (lev1 v)\n\nwhen flag clicked\nforever\n    play sound [Deadlocked v] until done\nend\n\nwhen flag clicked\nif  then\nend\n\nif  then\nend\n\nwhen flag clicked\n\nwhen I receive [starting v]\nforever\n    stop all sounds\n    go to [front v] layer\n    set [ghost v] effect to (100)\n    show\n    repeat (20)\n        change [ghost v] effect by (-5)\n    end\n    stop [all v]\nend\n\n@Sprite1\n\nwhen flag clicked\nset size to (100) %\nforever\n    if <touching color (#000000)?> then\n        set [y-velocity v] to [1]\n    else\n        change [y-velocity v] by (-0.4)\n    end\n    if <key (right arrow v) pressed?> then\n        point in direction (90)\n        change x by (4)\n    end\n    if <key (left arrow v) pressed?> then\n        point in direction (90)\n        change x by (-4)\n    end\nend\n\nwhen flag clicked\nforever\n    if <<touching color (#000000)?> and <key (up arrow v) pressed?>> then\n        set [y-velocity v] to [6.2]\n    end\n    change y by (Y-Velocity)\nend\n\ndefine touchGround <up?>\nchange [falling v] by (1)\nrepeat until <not <touching color (#6a6a6a)?>>\n    if <up?> then\n        change y by (-1)\n    else\n        change y by (1)\n        set [falling v] to [0]\n    end\n    set [yspeed v] to [0]\nend\n\nwhen flag clicked\n\nif <key (r v) pressed?> then\n    go to x: (-200) y: (50)\nend\n\nwhen flag clicked\nswitch backdrop to (lev1 v)\n\nwhen flag clicked\ngo to x: (-232) y: (-152)\n\nif <touching color (#ff9400)?> then\n    go to x: (120) y: (-20)\nend\nif <touching color (#ff9400)?> then\n    go to x: (120) y: (-20)\nend\nif <touching color (#ff9400)?> then\n    go to x: (120) y: (-20)\nend\n\nwhen flag clicked\nforever\n    if <touching color (#ff00bf)?> then\n        set [y-velocity v] to [12]\n    end\n    if <touching color (#00ff55)?> then\n        set [y-velocity v] to [3.9]\n        set size to (75) %\n    end\n    change y by (0.5)\nend\n\nwhen I receive [lev6 v]\n\nwhen [s v] key pressed\nwait (1) seconds\nbroadcast (lev6 v)\n\nwhen flag clicked\nforever\n    if <touching color (#cccccc)?> then\n        wait (0) seconds\n        show\n        next backdrop\n        go to x: (-232) y: (-152)\n    end\nend\n\nwhen I receive [stage v]\nswitch backdrop to (lev1 v)\n\nwhen [r v] key pressed\ngo to x: (-226) y: (-127)\n\nif <not <touching color (#00ff55)?>> then\n    set [y-velocity v] to [6.3]\n    set size to (100) %\nend\n\nif <<touching color (#ff0000)?> or <touching color (#666666)?>> then\n    set volume to (50) %\n    start sound [Megaman x 1 death sound effect.mp3 v]\n    set volume to (100) %\n    repeat (10)\n        change [ghost v] effect by (10)\n    end\n    set [y vel v] to [0]\n    set x to (0)\n    go to x: (-232) y: (-152)\nend\n\nwhen flag clicked\nforever\n    if <touching color (#666666)?> then\n        go to x: (-232) y: (-152)\n    end\nend\n\nwhen flag clicked\nforever\n    if <touching color (#ff0000)?> then\n        go to x: (-232) y: (-152)\n    end\nend\n\n@Sprite2\n\nwhen flag clicked\nhide\nwait (1.7) seconds\nshow\ngo to x: (0) y: (0)\n\nwhen [space v] key pressed\nhide\n\n@Sprite3\n\nwhen flag clicked\ngo to x: (0) y: (0)\ngo to [front v] layer\nshow\nset [ghost v] effect to (100)\nrepeat (5)\n    change [ghost v] effect by (-20)\nend\nstart sound [Deadlocked v]\nwait (1) seconds\nrepeat (5)\n    change [ghost v] effect by (20)\nend\nhide\nbroadcast (Stage v)\nbroadcast (Main Character v)\n\nwhen I receive [end v]\ngo to [front v] layer\nset [ghost v] effect to (100)\nshow\nrepeat (20)\n    change [ghost v] effect by (-5)\nend\nstop [all v]\n\n@Sprite4\n\nwhen I receive [end v]\ngo to [front v] layer\nset [ghost v] effect to (100)\nshow\nrepeat (20)\n    change [ghost v] effect by (-5)\nend\nstop [all v]\n\n@Sprite5\n\nwhen I receive [starting v]\nshow\ngo to [front v] layer\nset size to (100) %\ngo to x: (0) y: (0)\nhide\n\nwhen flag clicked\nshow\ngo to [front v] layer\nset size to (100) %\ngo to x: (0) y: (0)\nhide\n\n
In the game\nHave fun