Mirrored | a platformer

Instructions: Control both characters with arrows or wasd\nGet one of them to the other side to get to the next level \nenjoy!\n\n\n\n\n\n#games

@Stage\n\nwhen flag clicked\nforever\n    switch costume to (Level)\nend\n\nwhen flag clicked\nset [ghost v] effect to (100)\n\nwhen I receive [start v]\nset [ghost v] effect to (0)\nswitch backdrop to (backdrop1 v)\nforever\n    play sound [Into The Night prt1_2 v] until done\nend\n\nwhen flag clicked\nbroadcast (Start v)\n\n@spikes\n\nwhen flag clicked\nhide\nswitch costume to (costume1 v)\nforever\n    switch costume to (Level)\nend\n\nwhen I receive [start v]\nshow\nshow\nset [brightness v] effect to (0)\n\nwait (2) seconds\nforever\n    go to [back v] layer\n    repeat (10)\n        change [brightness v] effect by (-10)\n    end\n    wait (5) seconds\n    repeat (10)\n        change [brightness v] effect by (10)\n    end\n    set [brightness v] effect to (0)\n    wait (1) seconds\nend\n\nwhen flag clicked\n\nchange [level v] by (1)\n\n@level\n\nwhen flag clicked\nhide\nswitch costume to (costume1 v)\ngo to [front v] layer\nforever\n    switch costume to (Level)\nend\n\nwhen I receive [start v]\nshow\nshow\nset [brightness v] effect to (0)\nforever\n    if <(costume [number v]) > [17]> then\n        switch costume to (costume11 v)\n    end\nend\n\nset [dark v] to [0]\nwait (2) seconds\nforever\n    show\n    go to [front v] layer\n    repeat (10)\n        set [dark v] to [1]\n        change [brightness v] effect by (-10)\n    end\n    wait (5) seconds\n    repeat (10)\n        change [brightness v] effect by (10)\n    end\n    set [brightness v] effect to (0)\n    wait (1) seconds\n    set [dark v] to [0]\nend\n\nwhen flag clicked\n\n@Player\n\ndefine Platform Physics (speed) (friction) (jump height)\nset rotation style [left-right v]\nchange [y vel v] by (-1)\nif <<<key (right arrow v) pressed?> or <key (d v) pressed?>> or <<mouse down?> and <(mouse x) > (x position)>>> then\n    change [x vel v] by (speed)\nend\nif <<<key (left arrow v) pressed?> or <key (a v) pressed?>> or <<mouse down?> and <(mouse x) < (x position)>>> then\n    change [x vel v] by ((speed) * (-1))\nend\nset [x vel v] to ((X Vel) * (friction))\nchange x by (X Vel)\nset [slpoe v] to [0]\nif <<<touching (level v)?> or <touching (sprite4 v)?>> or <touching (tb v)?>> then\n    repeat until <<not <<<touching (level v)?> or <touching (sprite4 v)?>> or <touching (tb v)?>>> or <(Slpoe) = [-8]>>\n        change [slpoe v] by (-1)\n        change y by (1)\n    end\nend\nif <<<touching (level v)?> or <touching (sprite4 v)?>> or <touching (tb v)?>> then\n    change y by (Slpoe)\n    repeat until <not <<<touching (level v)?> or <touching (sprite4 v)?>> or <touching (tb v)?>>>\n        change x by ((([abs v] of (X Vel) ) / (X Vel)) * (-1))\n    end\n    if <<<key (up arrow v) pressed?> or <key (w v) pressed?>> or <<mouse down?> and <(mouse y) > (y position)>>> then\n        set [y vel v] to [11.5]\n        if <(X Vel) > [0]> then\n            set [x vel v] to [-6]\n        else\n            set [x vel v] to [6]\n        end\n    else\n        set [x vel v] to [0]\n    end\nend\nchange y by (Y Vel)\nif <<<touching (level v)?> or <touching (sprite4 v)?>> or <touching (tb v)?>> then\n    repeat until <not <<touching (level v)?> or <touching (tb v)?>>>\n        change y by ((([abs v] of (Y Vel) ) / (Y Vel)) * (-1))\n    end\n    set [y vel v] to [0]\nend\nchange y by (-1)\nif <<<<key (up arrow v) pressed?> or <key (w v) pressed?>> or <<mouse down?> and <(mouse y) > (y position)>>> and <<touching (level v)?> or <touching (tb v)?>>> then\n    set [y vel v] to [13]\nend\nchange y by (1)\n\nwhen I receive [start v]\nshow\nset [level v] to [1]\npoint in direction (90)\nswitch costume to (player v)\nset [x vel v] to [0]\nset [y vel v] to [0]\ngo to x: (-215) y: (-30)\nrepeat until <(costume [number v]) = [2]>\n    Platform Physics [1] [0.9] [11]\nend\nforever\n    Platform Physics [2] [0.9] [22]\nend\n\nwhen I receive [start v]\nforever\n    if <(x position) > [210]> then\n        go to x: (-215) y: (-30)\n        change [level v] by (1)\n        broadcast (Next v)\n    end\nend\n\nif <(Level) = [11]> then\n    hide\nend\n\nwhen I receive [start v]\nforever\n    if <<key (r v) pressed?> or <<touching (spikes v)?> or <touching (lava v)?>>> then\n        set [x vel v] to [0]\n        set [y vel v] to [0]\n        go to x: (-215) y: (-30)\n        if <(Level) = [17]> then\n            go to x: (-215) y: (-120)\n        end\n    end\n    if <[-179] > (y position)> then\n        go to x: (-215) y: (-30)\n        if <(Level) = [17]> then\n            go to x: (-215) y: (-120)\n        end\n    end\n    if <touching (level v)?> then\n        set [x vel v] to [0]\n        set [y vel v] to [0]\n        go to x: (-215) y: (-30)\n        if <(Level) = [17]> then\n            go to x: (-215) y: (-120)\n        end\n    end\nend\n\nwhen flag clicked\nhide\n\nif <(Level) = <<touching (level v)?> or <touching (sprite4 v)?>>> then\n    hide\nend\n\nwhen I receive [start v]\nforever\n    if <<touching (mouse-pointer v)?> and <<(Level) = [3]> or <(Level) = [13]>>> then\n        change x by ((([x position v] of [sprite4 v]) - (x position)) / (4))\n    end\nend\n\nwhen flag clicked\n\nwhen I receive [next v]\ngo to x: (-215) y: (-30)\n\n@Player2\n\ndefine Platform Physics (speed) (friction) (jump height)\nset rotation style [left-right v]\nchange [y vel v] by (-1)\nif <<<key (right arrow v) pressed?> or <key (d v) pressed?>> or <<mouse down?> and <(mouse x) > (x position)>>> then\n    change [x vel v] by ((speed) * (-1))\nend\nif <<<key (left arrow v) pressed?> or <key (a v) pressed?>> or <<mouse down?> and <(mouse x) < (x position)>>> then\n    change [x vel v] by (speed)\nend\nset [x vel v] to ((X Vel) * (friction))\nchange x by (X Vel)\nset [slpoe v] to [0]\nif <<<touching (level v)?> or <touching (sprite4 v)?>> or <touching (tb v)?>> then\n    repeat until <<not <<<touching (level v)?> or <touching (sprite4 v)?>> or <touching (tb v)?>>> or <(Slpoe) = [-8]>>\n        change [slpoe v] by (-1)\n        change y by (1)\n    end\nend\nif <<<touching (level v)?> or <touching (sprite4 v)?>> or <touching (tb v)?>> then\n    change y by (Slpoe)\n    repeat until <not <<<touching (level v)?> or <touching (sprite4 v)?>> or <touching (tb v)?>>>\n        change x by ((([abs v] of (X Vel) ) / (X Vel)) * (-1))\n    end\n    if <<<key (up arrow v) pressed?> or <key (w v) pressed?>> or <<mouse down?> and <(mouse y) > (y position)>>> then\n        set [y vel v] to [11.5]\n        if <(X Vel) > [0]> then\n            set [x vel v] to [-6]\n        else\n            set [x vel v] to [6]\n        end\n    else\n        set [x vel v] to [0]\n    end\nend\nchange y by (Y Vel)\nif <<<touching (level v)?> or <touching (sprite4 v)?>> or <touching (tb v)?>> then\n    repeat until <not <<touching (level v)?> or <touching (tb v)?>>>\n        change y by ((([abs v] of (Y Vel) ) / (Y Vel)) * (-1))\n    end\n    set [y vel v] to [0]\nend\nchange y by (-1)\nif <<<<key (up arrow v) pressed?> or <key (w v) pressed?>> or <<mouse down?> and <(mouse y) > (y position)>>> and <<touching (level v)?> or <touching (tb v)?>>> then\n    set [y vel v] to [13]\nend\nchange y by (1)\n\nwhen I receive [start v]\nshow\nset [level v] to [1]\npoint in direction (90)\nswitch costume to (player v)\nset [x vel v] to [0]\nset [y vel v] to [0]\ngo to x: (-215) y: (-30)\nrepeat until <(costume [number v]) = [2]>\n    Platform Physics [1] [0.9] [11]\nend\nforever\n    Platform Physics [2] [0.9] [22]\nend\n\nwhen I receive [start v]\nforever\n    if <(x position) < [-210]> then\n        go to x: (210) y: (-30)\n        change [level v] by (1)\n        broadcast (Next v)\n    end\nend\n\nif <(Level) = [11]> then\n    hide\nend\n\nwhen I receive [start v]\nforever\n    if <<key (r v) pressed?> or <<touching (spikes v)?> or <touching (lava v)?>>> then\n        set [x vel v] to [0]\n        set [y vel v] to [0]\n        go to x: (210) y: (-30)\n        if <(Level) = [17]> then\n            go to x: (210) y: (-120)\n        end\n    end\n    if <[-179] > (y position)> then\n        go to x: (210) y: (-30)\n        if <(Level) = [17]> then\n            go to x: (210) y: (-120)\n        end\n    end\n    if <touching (level v)?> then\n        set [x vel v] to [0]\n        set [y vel v] to [0]\n        go to x: (-215) y: (-30)\n        if <(Level) = [17]> then\n            go to x: (210) y: (-120)\n        end\n    end\nend\n\nwhen flag clicked\nhide\n\nif <(Level) = <<touching (level v)?> or <touching (sprite4 v)?>>> then\n    hide\nend\n\nwhen I receive [start v]\nforever\n    if <<touching (mouse-pointer v)?> and <<(Level) = [3]> or <(Level) = [13]>>> then\n        change x by ((([x position v] of [sprite4 v]) - (x position)) / (4))\n    end\nend\n\nwhen flag clicked\n\nwhen I receive [next v]\ngo to x: (210) y: (-30)\n\n@TB\n\nwhen flag clicked\nhide\n\n