Gun Wars! ll Two Player Platformer
@Stage\n\n@mini\n\nwhen flag clicked\nbroadcast (green flag v)\n\nwhen I receive [green flag v]\npoint in direction (90)\nforever\n    go to (mini hitbox v)\n    if <key (a v) pressed?> then\n        point in direction (-90)\n    end\n    if <key (d v) pressed?> then\n        point in direction (90)\n    end\n    if <touching (lava v)?> then\n        wait until <not <touching (lava v)?>>\n        broadcast (lose health- mini v)\n    end\n    if <key (1 v) pressed?> then\n        change [health - mini v] by (10)\n        wait (1) seconds\n    end\n    if <(health - mini) > [90]> then\n        set [health - mini v] to [100]\n    end\nend\n\nwhen I receive [lose health- mini v]\nset [brightness v] effect to (0)\nrepeat (10)\n    change [brightness v] effect by (10)\nend\nrepeat (10)\n    change [brightness v] effect by (-10)\nend\n\n@mini hitbox\n\ndefine move in (steps)\nset [in air v] to [0]\nrepeat (steps)\n    set [last value v] to (x position)\n    change x by ((xvel) / (steps))\n    if <<touching (level v)?> or <touching (normal hitbox v)?>> then\n        set x to (last value)\n        set [xvel v] to [0]\n    end\n    set [last value v] to (y position)\n    change y by ((yvel) / (steps))\n    if <<touching (level v)?> or <touching (normal hitbox v)?>> then\n        set y to (last value)\n        change [in air v] by (1)\n        set [yvel v] to [0]\n    end\nend\n\nwhen I receive [green flag v]\nset rotation style [left-right v]\nset [gravity v] to [-1]\nset [yvel v] to [0]\ngo to x: (-204) y: (106)\nforever\n    set [ghost v] effect to (100)\n    if <key (w v) pressed?> then\n        if <(in air) = [1]> then\n            set [yvel v] to [15]\n        end\n    end\n    if <key (a v) pressed?> then\n        point in direction (90)\n        change [xvel v] by (-1)\n    end\n    if <key (d v) pressed?> then\n        point in direction (90)\n        change [xvel v] by (1)\n    end\n    change [yvel v] by (GRAVITY)\n    set [xvel v] to ((xvel) * (0.9))\n    move in (([abs v] of (yvel) ) + ([abs v] of (xvel) ))\nend\n\n@normal\n\nwhen I receive [green flag v]\npoint in direction (90)\nforever\n    go to (normal hitbox v)\n    if <key (left arrow v) pressed?> then\n        point in direction (90)\n    end\n    if <key (right arrow v) pressed?> then\n        point in direction (-90)\n    end\n    if <touching (lava v)?> then\n        wait until <not <touching (lava v)?>>\n        broadcast (lose health -normal v)\n    end\n    if <key (9 v) pressed?> then\n        change [health - normal v] by (10)\n        wait (1) seconds\n    end\n    if <(health - normal) > [90]> then\n        set [health - normal v] to [100]\n    end\nend\n\nwhen I receive [lose health -normal v]\nset [brightness v] effect to (0)\nrepeat (10)\n    change [brightness v] effect by (10)\nend\nrepeat (10)\n    change [brightness v] effect by (-10)\nend\n\n@normal hitbox\n\ndefine move in (steps)\nset [in air v] to [0]\nrepeat (steps)\n    set [last value v] to (x position)\n    change x by ((xvel) / (steps))\n    if <<touching (level v)?> or <touching (mini hitbox v)?>> then\n        set x to (last value)\n        set [xvel v] to [0]\n    end\n    set [last value v] to (y position)\n    change y by ((yvel) / (steps))\n    if <<touching (level v)?> or <touching (mini hitbox v)?>> then\n        set y to (last value)\n        change [in air v] by (1)\n        set [yvel v] to [0]\n    end\nend\n\nwhen I receive [green flag v]\nset [gravity v] to [-1]\nset [yvel v] to [0]\ngo to x: (204) y: (106)\nforever\n    set [ghost v] effect to (100)\n    if <key (up arrow v) pressed?> then\n        if <(in air) = [1]> then\n            set [yvel v] to [15]\n        end\n    end\n    if <key (left arrow v) pressed?> then\n        change [xvel v] by (-1)\n    end\n    if <key (right arrow v) pressed?> then\n        change [xvel v] by (1)\n    end\n    change [yvel v] by (GRAVITY)\n    set [xvel v] to ((xvel) * (0.9))\n    move in (([abs v] of (yvel) ) + ([abs v] of (xvel) ))\nend\n\n@level\n\nwhen I receive [green flag v]\ngo to x: (0) y: (0)\n\n@gun normal\n\nwhen I receive [green flag v]\nset [health - normal v] to [100]\npoint in direction (-90)\ngo to x: (204) y: (106)\nforever\n    if <(health - normal) = [0]> then\n        broadcast (mini wins v)\n        stop [all v]\n    end\n    if <touching (normal v)?> then\n        set rotation style [left-right v]\n        go to (normal v)\n    end\n    if <<key (down arrow v) pressed?> and <touching (normal v)?>> then\n        wait until <not <key (down arrow v) pressed?>>\n        start sound [Pew v]\n        switch costume to (costume2 v)\n    else\n        switch costume to (costume1 v)\n    end\n    if <<(costume [number v]) = [2]> and <touching (mini v)?>> then\n        broadcast (lose health- mini v)\n    end\n    if <key (left arrow v) pressed?> then\n        point in direction (-90)\n    end\n    if <key (right arrow v) pressed?> then\n        point in direction (90)\n    end\n    if <not <touching (normal v)?>> then\n        change [speed y v] by (-1)\n        change y by (speed y)\n    end\n    if <<touching (level v)?> and <not <touching (normal v)?>>> then\n        set rotation style [don't rotate v]\n        fix overlap\n    end\nend\n\ndefine fix overlap\nrepeat until <not <touching (level v)?>>\n    change y by (1)\n    set [speed y v] to [0]\nend\n\nwhen I receive [lose health -normal v]\nchange [health - normal v] by (-10)\nset [brightness v] effect to (0)\nif <touching (normal v)?> then\n    repeat (10)\n        change [brightness v] effect by (10)\n    end\n    repeat (10)\n        change [brightness v] effect by (-10)\n    end\nend\n\n@gun mini\n\ndefine fix overlap\nrepeat until <not <touching (level v)?>>\n    change y by (1)\n    set [speed y v] to [0]\nend\n\nwhen I receive [lose health- mini v]\nset [brightness v] effect to (0)\nchange [health - mini v] by (-10)\nif <touching (mini v)?> then\n    repeat (10)\n        change [brightness v] effect by (10)\n    end\n    repeat (10)\n        change [brightness v] effect by (-10)\n    end\nend\n\nwhen I receive [green flag v]\nset [health - mini v] to [100]\ngo to x: (-204) y: (106)\npoint in direction (90)\nforever\n    if <(health - mini) = [0]> then\n        broadcast (normal wins v)\n        stop [all v]\n    end\n    if <touching (mini v)?> then\n        set rotation style [left-right v]\n        go to (mini v)\n    end\n    if <key (s v) pressed?> then\n        wait until <not <key (s v) pressed?>>\n        start sound [Pew v]\n        switch costume to (costume2 v)\n    else\n        switch costume to (costume1 v)\n    end\n    if <<(costume [number v]) = [2]> and <touching (normal v)?>> then\n        broadcast (lose health -normal v)\n    end\n    if <key (a v) pressed?> then\n        point in direction (-90)\n    end\n    if <key (d v) pressed?> then\n        point in direction (90)\n    end\n    if <not <touching (mini v)?>> then\n        change [speed y v] by (-1)\n        change y by (speed y)\n    end\n    if <<touching (level v)?> and <not <touching (mini v)?>>> then\n        set rotation style [don't rotate v]\n        fix overlap\n    end\nend\n\n@mini name\n\nwhen I receive [green flag v]\nforever\n    go to [back v] layer\n    go to x: ([x position v] of [mini v]) y: (([y position v] of [mini v]) + (100))\nend\n\n@normal name\n\nwhen flag clicked\n\nwhen I receive [green flag v]\nforever\n    go to [back v] layer\n    go to x: ([x position v] of [normal v]) y: (([y position v] of [normal v]) + (105))\nend\n\n@lava\n\nwhen flag clicked\nbroadcast (green flag v)\n\nwhen I receive [green flag v]\ngo to x: (0) y: (0)\nshow\nask [lava or no lava \(Y/N\)] and wait\nset x to (4)\nforever\n    if <(answer) = [y]> then\n        show\n        go to [back v] layer\n        set y to ((107) * ([sin v] of ((timer) * (110)) ))\n    end\n    if <(answer) = [n]> then\n        go to x: (0) y: (0)\n        hide\n    end\nend\n\n@thumb\n\nwhen I receive [mini wins v]\nhide\n\nwhen I receive [normal wins v]\nhide\n\nwhen I receive [green flag v]\ngo to x: (0) y: (0)\nset [ghost v] effect to (100)\nshow variable [health - normal v]\nshow variable [health - mini v]\nshow\ngo to [front v] layer\nset size to (100) %\n\n@win\n\nwhen I receive [mini wins v]\nswitch costume to (3 v)\nplay sound [Tada v] until done\n\nwhen I receive [normal wins v]\nswitch costume to (2 v)\nplay sound [Tada v] until done\n\nwhen I receive [green flag v]\ngo to x: (0) y: (28)\nswitch costume to (1 v)\n\n
                MUST PLAY IN FULL SCREEN \nlet me introduce you to p̶o̶s̶s̶i̶b̶l̶y̶ ̶m̶y̶ ̶b̶e̶s̶t̶ ̶g̶a̶m̶e̶ ̶y̶e̶t̶!̶\nNOPE! check out the full version!\n(made in two days) GUN WARS! play as mini me \n(WASD to move) or normal me (arrow keys to move) this \nis the upgrade version of my second shared project- toilet \nroll v.s poopie.\nthings i have added:\n1.collision detection (@griffpatch)\n2.better way of attack- instead of touching, i used guns hence the name GUN wars\n3.lava also by @griffpatch\n\n\n               HOW TO LET GO OF YOUR GUN\nhold s/down arrow and walk away from your gun. let go of down/s to let the gun fall to the ground.go to the gun to collect it again. click s/down to shoot\n\nthis is only a demo.