Forest A 2 Player Platformer                  #games #music #art #all

Instructions: = Welcome To My Newest Game =\n= FOREST, a platformer =\n=Only 10 levels (very short) =\n=Arrow keys for red=\n=W,A,S,D for blue=\n=Click player to be it using Mobile controls=\n=Step on tree stumps to disable saws and spikes=\n=Both Players Must Reach The Portal=\n=Love,Fave,Follow for Part 2=

@Stage\n\nwhen flag clicked\nforever\n    switch backdrop to (LEVEL)\nend\n\nwhen flag clicked\nforever\n    play sound [Hall of Fame amv v] until done\nend\n\n@Player\n\nwhen flag clicked\ngo to [back v] layer\nset [color v] effect to (0)\nswitch costume to (hello5 v)\nshow\ngo to x: (-216) y: (0)\nset [x v] to [0]\nset [y v] to [0]\nforever\n    set size to (100) %\n    change [y v] by (-0.5)\n    if <<key (right arrow v) pressed?> or <<<mouse down?> and <(mouse x) > (x position)>> and <(which player) = [0]>>> then\n        if <[4] < (costume [number v])> then\n            change [x v] by (0.8)\n        else\n            switch costume to (hello2 v)\n            change [x v] by (0.8)\n        end\n    end\n    if <<key (left arrow v) pressed?> or <<<mouse down?> and <(x position) > (mouse x)>> and <(which player) = [0]>>> then\n        if <[4] < (costume [number v])> then\n            change [x v] by (-0.9)\n        else\n            switch costume to (hello3 v)\n            change [x v] by (-0.9)\n        end\n    end\n    set [x v] to ((x) * (0.9))\n    change x by (x)\n    if <<touching (level v)?> or <touching (moving platform v)?>> then\n        change y by (1)\n        if <<touching (level v)?> or <touching (moving platform v)?>> then\n            change y by (1)\n            if <<touching (level v)?> or <touching (moving platform v)?>> then\n                change y by (1)\n                if <<touching (level v)?> or <touching (moving platform v)?>> then\n                    change y by (1)\n                    if <<touching (level v)?> or <touching (moving platform v)?>> then\n                        change y by (1)\n                        if <<touching (level v)?> or <touching (moving platform v)?>> then\n                            change y by (1)\n                            if <<touching (level v)?> or <touching (moving platform v)?>> then\n                                change y by (-6)\n                                if <<key (up arrow v) pressed?> or <<<mouse down?> and <(mouse y) > (y position)>> and <(which player) = [0]>>> then\n                                    set [y v] to [0]\n                                    if <(x) > [0]> then\n                                        set [x v] to [-10]\n                                    else\n                                        set [x v] to [10]\n                                    end\n                                else\n                                    change x by ((x) * (-1))\n                                    set [x v] to [0]\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\n    change y by (y)\n    if <<touching (level v)?> or <touching (moving platform v)?>> then\n        change y by ((y) * (-1))\n        set [y v] to [0]\n    end\n    change y by (-0.5)\n    if <<<touching (level v)?> or <touching (moving platform v)?>> and <<key (up arrow v) pressed?> or <<<mouse down?> and <(mouse y) > (y position)>> and <(which player) = [0]>>>> then\n        if <[4] < (costume [number v])> then\n            set [y v] to [12]\n        else\n            set [y v] to [9]\n        end\n    end\n    change y by (0.5)\n    if <<touching (spikes v)?> or <<touching (saw1 v)?> or <<[-175] > (y position)> or <<touching (moving spikes v)?> or >>>> then\n        broadcast (Restart v)\n        wait until <not <<touching (spikes v)?> or <<touching (saw1 v)?> or <<[-175] > (y position)> or <<touching (moving spikes v)?> or >>>>>\n    end\nend\n\nrepeat (10)\n    change [ghost v] effect by (10)\n    wait (0.01) seconds\nend\nrepeat (10)\n    set [ghost v] effect to (0)\nend\nshow\n\nwhen flag clicked\n\ndefine Reset\nset [x v] to [0]\nset [yv v] to [0]\nset [y v] to [0]\ngo to x: (-216) y: (-50)\nshow\n\nwhen I receive [restart v]\nReset\nchange [deaths v] by (1)\n\nwhen I receive [next level v]\nReset\n\nwhen flag clicked\nforever\n    go to [front v] layer\n    broadcast (Tick v)\n    if <<touching (trampoline v)?> or <<touching (trampoline v)?> or <<touching (trampoline3 v)?> or <touching (trampoline4 v)?>>>> then\n        set [y v] to [12]\n    end\n    if <touching (zoom v)?> then\n        change [x v] by (5)\n    end\n    if <<touching (buttons v)?> and <<key (up arrow v) pressed?> or >> then\n        set [y v] to [7]\n    end\n    if <<key (down arrow v) pressed?> or > then\n        switch costume to (player2 v)\n    else\n        switch costume to (player v)\n    end\nend\n\nwhen this sprite clicked\nset [which player v] to [0]\n\n@Level\n\nwhen flag clicked\nset [level v] to [1]\nswitch costume to (costume1 v)\nrepeat (10)\n    go to x: (0) y: (0)\n    set size to (90) %\n    go to [front v] layer\n    show\nend\nforever\n    switch costume to (LEVEL)\nend\n\nwhen I receive [next level v]\nchange [level v] by (1)\n\n@Player2\n\ndefine Reset\nset [x v] to [0]\nset [yv v] to [0]\nset [y v] to [0]\ngo to x: (-180) y: (-50)\nshow\n\nwhen I receive [restart v]\nReset\n\nwhen I receive [next level v]\nReset\n\nwhen flag clicked\ngo to [back v] layer\nset [color v] effect to (0)\nswitch costume to (hello5 v)\nshow\ngo to [front v] layer\ngo to x: (-180) y: (0)\nset [x v] to [0]\nset [y v] to [0]\n\nwhen I receive [tick v]\nif <<touching (trampoline v)?> or <<touching (trampoline v)?> or <<touching (trampoline3 v)?> or <touching (trampoline4 v)?>>>> then\n    set [y v] to [12]\nend\nif <touching (zoom v)?> then\n    change [x v] by (5)\nend\nif <<touching (buttons v)?> and > then\n    set [y v] to [7]\nend\nif  then\n    switch costume to (player2 v)\nelse\n    switch costume to (player v)\nend\n\nwhen I receive [tick v]\nforever\n    change [y v] by (-0.5)\n    if <<key (d v) pressed?> or <<<mouse down?> and <(mouse x) > (x position)>> and <(which player) = [1]>>> then\n        if <[4] < (costume [number v])> then\n            change [x v] by (0.8)\n        else\n            switch costume to (hello2 v)\n            change [x v] by (0.8)\n        end\n    end\n    if  then\n        if <[4] < (costume [number v])> then\n            change [x v] by (-0.9)\n        else\n            switch costume to (hello3 v)\n            change [x v] by (-0.9)\n        end\n    end\n    set [x v] to ((x) * (0.9))\n    change x by (x)\n    if <<touching (level v)?> or <touching (moving platform v)?>> then\n        change y by (1)\n        if <<touching (level v)?> or <touching (moving platform v)?>> then\n            change y by (1)\n            if <<touching (level v)?> or <touching (moving platform v)?>> then\n                change y by (1)\n                if <<touching (level v)?> or <touching (moving platform v)?>> then\n                    change y by (1)\n                    if <<touching (level v)?> or <touching (moving platform v)?>> then\n                        change y by (1)\n                        if <<touching (level v)?> or <touching (moving platform v)?>> then\n                            change y by (1)\n                            if <<touching (level v)?> or <touching (moving platform v)?>> then\n                                change y by (-6)\n                                if  then\n                                    set [y v] to [0]\n                                    if <(x) > [0]> then\n                                        set [x v] to [-10]\n                                    else\n                                        set [x v] to [10]\n                                    end\n                                else\n                                    change x by ((x) * (-1))\n                                    set [x v] to [0]\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\n    change y by (y)\n    if <<touching (level v)?> or <touching (moving platform v)?>> then\n        change y by ((y) * (-1))\n        set [y v] to [0]\n    end\n    change y by (-0.5)\n    if <<<touching (level v)?> or <touching (moving platform v)?>> and <<<<mouse down?> and <(mouse y) > (y position)>> and <(which player) = [1]>> or <key (w v) pressed?>>> then\n        if <[4] < (costume [number v])> then\n            set [y v] to [12]\n        else\n            set [y v] to [9]\n        end\n    end\n    change y by (0.5)\n    if <<touching (spikes v)?> or <<touching (saw1 v)?> or <<[-175] > (y position)> or <<touching (moving spikes v)?> or >>>> then\n        broadcast (Restart v)\n        wait until <not <<touching (spikes v)?> or <<touching (saw1 v)?> or <<[-175] > (y position)> or <<touching (moving spikes v)?> or >>>>>\n    end\nend\n\nrepeat (10)\n    change [ghost v] effect by (10)\n    wait (0.01) seconds\nend\n\nrepeat (10)\n    set [ghost v] effect to (0)\nend\n\nshow\n\nwhen this sprite clicked\nset [which player v] to [1]\n\n@portal\n\nwhen [timer v] > (0.1)\nhide\n\nwhen flag clicked\nswitch costume to (costume2 v)\ncreate clone of (_myself_ v)\nshow\nrepeat (10)\n    go to [front v] layer\nend\nforever\n    turn right (3) degrees\nend\n\nwhen flag clicked\nrepeat (10)\n    clear graphic effects\nend\nforever\n    show\n    if <(LEVEL) = [1]> then\n        go to x: (200) y: (-40)\n    end\n    if <(LEVEL) = [2]> then\n        go to x: (200) y: (-50)\n    end\n    if <(LEVEL) = [8]> then\n        go to x: (200) y: (100)\n    end\n    if <(LEVEL) = [9]> then\n        go to x: (200) y: (-50)\n    end\n    if <(LEVEL) = [10]> then\n        forever\n            hide\n        end\n    end\nend\n\nwhen I start as a clone\nswitch costume to (costume2 v)\nshow\nrepeat (10)\n    go to [front v] layer\nend\nforever\n    turn left (3) degrees\nend\n\nwhen I start as a clone\nrepeat (10)\n    clear graphic effects\nend\nforever\n    show\n    if <(LEVEL) = [1]> then\n        go to x: (200) y: (-40)\n    end\n    if <(LEVEL) = [2]> then\n        go to x: (200) y: (-50)\n    end\n    if <(LEVEL) = [8]> then\n        go to x: (200) y: (100)\n    end\n    if <(LEVEL) = [9]> then\n        go to x: (200) y: (-50)\n    end\n    if <(LEVEL) = [10]> then\n        forever\n            hide\n        end\n    end\nend\n\nwhen I receive [tick v]\nif <<touching (player2 v)?> and <touching (player v)?>> then\n    broadcast (Next Level v)\nend\n\n@Buttons\n\nwhen I receive [tick v]\nset [button? v] to [0]\ngo to x: (0) y: (0)\nswitch costume to (LEVEL)\nif <<touching (player2 v)?> or <touching (player v)?>> then\n    if <(Button?) = [0]> then\n        change y by (-5)\n        set [button? v] to [1]\n        wait until <not <<touching (player v)?> or <touching (player2 v)?>>>\n    else\n        change y by (5)\n        set [button? v] to [0]\n        wait until <not <<touching (player v)?> or <touching (player2 v)?>>>\n    end\nend\n\n@Sprite1\n\nwhen flag clicked\nforever\n    switch costume to (LEVEL)\nend\n\n@Saw1\n\nwhen flag clicked\nforever\n    turn right (6) degrees\nend\n\nwhen flag clicked\nshow\nforever\n    switch costume to (LEVEL)\nend\n\nwhen flag clicked\nforever\n    if <(LEVEL) = [1]> then\n        go to x: (20) y: (-70)\n    end\n    if <(Button?) = [1]> then\n        hide\n    else\n        show\n    end\nend\n\n@Spikes\n\nwhen flag clicked\nshow\nforever\n    switch costume to (LEVEL)\nend\n\nwhen flag clicked\nforever\n    if <(LEVEL) = [2]> then\n        go to x: (20) y: (-70)\n    end\n    if <(Button?) = [1]> then\n        hide\n    else\n        show\n    end\nend\n\n@Sprite2\n\nwhen flag clicked\nforever\n    set [ghost v] effect to (100)\n    show\n    go to [front v] layer\nend\n\n@Sprite3\n\nwhen flag clicked\nforever\n    set [ghost v] effect to (50)\n    if <(which player) = [1]> then\n        switch costume to (blue v)\n    else\n        switch costume to (red v)\n    end\nend\n\n