Cooperation 2 | A Platformer  #All #Games

Instructions: Cooperation 2 | A Platformer\n⚑ ˡᵒᵃᵈⁱⁿᵍ.. ⌛\n\nWelcome To My Cooperation Platformer! This can be a one or two player game. The Player is controlled by the arrow keys, and the moving platform is controlled by the mouse pointer and the key (a,d) to change direction.\nAlso, Press R to reset if you're stuck\n\nPART 1:\nhttps://scratch.mit.edu/projects/542395797/\n\nLeave a ♥︎, ★, and a Follow for Part 3!!\n\nI don't know what motiavted me to make the second part after months, but here it is anyways! I think I did a bad job on the thumbnail..\n\n #All #Games #All #Games #All #Games #All #Games #All #Games #All #Games #All #Games #All #Games #All #Games #All #Games #All #Games #All #Games #All #Games #All #Games #All #Games #All #Games #All #Games #All #Games #All #Games #All #Games #All #Games #All #Games #All #Games #All #Games #All #Games #All #Games #All #Games #All #Games #All #Games #All #Games #All #Games #All #Games #All #Games #All #Games #All #Games #All #Games #All #Games #All #Games #All #Games #All #Games #All #Games #All #Games #All #Games #All #Games #All #Games #All #Games #All #Games #All #Games #All #Games #All #Games #All #Games #All #Games #All #Games #All #Games #All #Games #All #Games #All #Games #All #Games #All #Games #All #Games #All #Games #All #Games #All #Games #All #Games

@Stage\n\nwhen flag clicked\nset volume to (20) %\nforever\n    play sound [Itro & Tobu - Cloud 9 \[NCS Release\] v] until done\nend\n\n@Main Character\n\ndefine physics <touch>\nset [x v] to (x position)\nset [y v] to (y position)\ngo to [front v] layer\nclear graphic effects\nchange [yv v] by (-1)\nif <touching (trampoline v)?> then\n    start sound [Boing sound effect v]\n    change [yv v] by (25)\nend\nif <key (r v) pressed?> then\n    broadcast (Reset v)\n    repeat (10)\n        change [ghost v] effect by (10)\n    end\n    go to x: (-200) y: (-45)\n    repeat (10)\n        change [ghost v] effect by (-10)\n    end\nend\nif <<key (right arrow v) pressed?> or <<mouse down?> and <(mouse x) > (x position)>>> then\n    point in direction (90)\n    change [xv v] by (0.9)\nend\nif <<key (left arrow v) pressed?> or <<mouse down?> and <(mouse x) < (x position)>>> then\n    point in direction (-90)\n    change [xv v] by (-0.9)\nend\nset [xv v] to ((Xv) * (0.9))\nchange x by (Xv)\nif <<touching (platforms v)?> or <<<touching (moving platform v)?> or <<touching (on v)?> and <(ON/OFF STATUS) = [on]>>> or <<touching (off v)?> and <(ON/OFF STATUS) = [off]>>>> then\n    change y by (1)\nend\nif <<touching (platforms v)?> or <<<touching (moving platform v)?> or <<touching (on v)?> and <(ON/OFF STATUS) = [on]>>> or <<touching (off v)?> and <(ON/OFF STATUS) = [off]>>>> then\n    change y by (1)\nend\nif <<touching (platforms v)?> or <<<touching (moving platform v)?> or <<touching (on v)?> and <(ON/OFF STATUS) = [on]>>> or <<touching (off v)?> and <(ON/OFF STATUS) = [off]>>>> then\n    change y by (1)\nend\nif <<touching (platforms v)?> or <<<touching (moving platform v)?> or <<touching (on v)?> and <(ON/OFF STATUS) = [on]>>> or <<touching (off v)?> and <(ON/OFF STATUS) = [off]>>>> then\n    change y by (1)\nend\nif <<touching (platforms v)?> or <<<touching (moving platform v)?> or <<touching (on v)?> and <(ON/OFF STATUS) = [on]>>> or <<touching (off v)?> and <(ON/OFF STATUS) = [off]>>>> then\n    change y by (-4)\n    change x by ((Xv) * (-1))\n    if <<key (up arrow v) pressed?> or <mouse down?>> then\n        set [yv v] to [14]\n        if <(Xv) > [0]> then\n            set [xv v] to [-10]\n        else\n            set [xv v] to [10]\n        end\n    end\nend\nchange y by (Yv)\nif <<touching (platforms v)?> or <<<touching (moving platform v)?> or <<touching (on v)?> and <(ON/OFF STATUS) = [on]>>> or <<touching (off v)?> and <(ON/OFF STATUS) = [off]>>>> then\n    change y by ((Yv) * (-1))\n    set [yv v] to [0]\nend\nchange y by (-1)\nif <<<touching (platforms v)?> or <<<touching (moving platform v)?> or <<touching (on v)?> and <(ON/OFF STATUS) = [on]>>> or <<touching (off v)?> and <(ON/OFF STATUS) = [off]>>>> and <key (up arrow v) pressed?>> then\n    if <touching (trampoline v)?> then\n        change [yv v] by (20)\n    else\n        change [yv v] by (14)\n    end\nend\nchange y by (1)\nif <(x position) > [235]> then\n    change [level v] by (1)\n    repeat (10)\n        change [ghost v] effect by (10)\n    end\n    reset\n    go to x: (-200) y: (-45)\n    repeat (10)\n        change [ghost v] effect by (-10)\n    end\nend\nif <<<touching (boss 1 v)?> or <<touching (spikes v)?> or <touching (enemies v)?>>> or <(y position) < [-175]>> then\n    start sound [Crunch v]\n    repeat (10)\n        change [ghost v] effect by (10)\n    end\n    reset\n    go to x: (-200) y: (-45)\n    repeat (10)\n        change [ghost v] effect by (-10)\n    end\nend\n\nif <[-145] > (y position)> then\n    repeat (10)\n        change [ghost v] effect by (10)\n    end\n    go to x: (-200) y: (-45)\n    repeat (10)\n        change [ghost v] effect by (-10)\n    end\nend\n\nwhen flag clicked\nshow\ngo to x: (-215) y: (61)\nswitch costume to (costume1 v)\nforever\n    physics <>\nend\n\ndefine reset\nset [xv v] to [0]\nset [yv v] to [0]\n\nwhen I receive [light v]\ncreate clone of (_myself_ v)\n\nwhen I start as a clone\nswitch costume to (costume2 v)\nforever\n    go to x: (x) y: (y)\n    go to [front v] layer\n    go [backward v] (1) layers\nend\n\n@moving platform\n\ndefine Smooth Glide x: (x) y: (y) size: (size) dir: (dir) speed: (speed)\nrepeat until <<(round (x position)) = (x)> and <<(round (y position)) = (y)> and <<(round (size)) = (size)> and <(round (direction)) = (dir)>>>>\n    change x by (((x) - (x position)) / (speed))\n    change y by (((y) - (y position)) / (speed))\n    turn right (((dir) - (direction)) / (speed)) degrees\n    change size by (((size) - (size)) / (speed))\nend\n\nwhen flag clicked\nstart\npoint in direction (90)\nforever\n    go to [front v] layer\n    go to (mouse-pointer v)\n    if  then\n        turn right (-5) degrees\n    end\n    if  then\n        turn right (5) degrees\n    end\nend\n\nwhen I receive [reset v]\npoint in direction (90)\n\ndefine start\ngo to x: (-3) y: (24)\nset [ghost v] effect to (100)\nset [pixelate v] effect to (100)\nrepeat (10)\n    change [ghost v] effect by (-10)\n    change [pixelate v] effect by (-10)\nend\nclear graphic effects\n\nwhen flag clicked\nwait until <(Level) = [13]>\nstop [other scripts in sprite v]\nSmooth Glide x: [0] y: [-58] size: [100] dir: [90] speed: [3]\nwait until <<[-65] < <(round ([x position v] of [main character v])) < [-70]>> and <(round ([y position v] of [main character v])) = [103]>>\n\nwhen flag clicked\n\nwhen I receive [detect_22 v]\nwait until <(Level) = [15]>\nstop [other scripts in sprite v]\nSmooth Glide x: [9] y: [94] size: [100] dir: [90] speed: [3]\nwait until <<[-65] < <(round ([x position v] of [main character v])) < [-70]>> and <(round ([y position v] of [main character v])) = [103]>>\nstart sound [recording1 v]\nSmooth Glide x: (mouse x) y: (mouse y) size: [100] dir: [90] speed: [3]\nbroadcast (detect_33 v)\nforever\n    point in direction (90)\n    forever\n        go to [front v] layer\n        go to (mouse-pointer v)\n        if  then\n            turn right (-5) degrees\n        end\n        if  then\n            turn right (5) degrees\n        end\n    end\nend\n\nwhen I receive [detect_33 v]\nwait until <(Level) = [16]>\nstop [other scripts in sprite v]\nSmooth Glide x: [-8] y: [-25] size: [100] dir: [90] speed: [3]\n\n@Platforms\n\nwhen flag clicked\nset [level v] to [1]\ngo to x: (0) y: (0)\nforever\n    switch costume to (Level)\nend\n\n@Text\n\nwhen flag clicked\nset [level v] to [1]\ngo to x: (0) y: (0)\nforever\n    switch costume to (Level)\nend\n\n@spikes\n\nwhen flag clicked\nset [level v] to [1]\ngo to x: (0) y: (0)\nforever\n    switch costume to (Level)\nend\n\n@trampoline\n\nwhen flag clicked\nset [level v] to [1]\ngo to x: (0) y: (0)\nforever\n    switch costume to (Level)\nend\n\n@thumbnail\n\nwhen flag clicked\nforever\n    go to [front v] layer\n    set [ghost v] effect to (100)\nend\n\n@Switch\n\nwhen flag clicked\nhide\nCreate on-off Element: At x, y: [-129] [149] Size: [100] Level: [11] Dir: [90] Auto: [n]\n\ndefine Create on-off Element: At x, y: (x) (y) Size: (sz) Level: (lvl) Dir: (dir) Auto: (auto)\nset [_auto? v] to (auto)\npoint in direction (dir)\nset [_t7 v] to (lvl)\ngo to x: (x) y: (y)\nset size to (sz) %\ncreate clone of (_myself_ v)\n\nwhen I start as a clone\nwait until <(_t7) = (Level)>\nshow\nif <(ON/OFF STATUS) = [on]> then\n    switch costume to (on v)\nelse\n    switch costume to (off v)\nend\nforever\n    if <(ON/OFF STATUS) = [on]> then\n        switch costume to (off v)\n    else\n        switch costume to (on v)\n    end\n    go to [front v] layer\n    go [backward v] (2) layers\n    if <touching (main character v)?> then\n        say [Press Space To Activate]\n        if <key (space v) pressed?> then\n            wait until <not <key (space v) pressed?>>\n            if <(ON/OFF STATUS) = [on]> then\n                set [on/off status v] to [off]\n                switch costume to (off v)\n                start sound [smb_bump v]\n            else\n                set [on/off status v] to [on]\n                switch costume to (on v)\n                start sound [smb_bump v]\n            end\n        end\n    else\n        say []\n    end\n    if <not <(_t7) = (Level)>> then\n        delete this clone\n    end\n    if <(_auto?) = [y]> then\n        if <(timer) > [1]> then\n            reset timer\n            if <(ON/OFF STATUS) = [on]> then\n                set [on/off status v] to [off]\n                switch costume to (off v)\n                start sound [smb_bump v]\n            else\n                set [on/off status v] to [on]\n                start sound [smb_bump v]\n                switch costume to (on v)\n            end\n        end\n    end\nend\n\nCreate on-off Element: At x, y: [-163] [133] Size: [100] Level: [3] Dir: [90] Auto: [n]\n\n@Off\n\ndefine Create on-off Element: [ON/OFF/SWITCH] (element) At x, y: (x) (y) Size: (sz) Level: (lvl)\nset [_t5 v] to (lvl)\nif <(element) = [ON]> then\n    if <(ON/OFF STATUS) = [on]> then\n        switch costume to (on -y v)\n    else\n        switch costume to (on -n v)\n    end\nelse\n    if <(element) = [OFF]> then\n        if <(ON/OFF STATUS) = [on]> then\n            switch costume to (off -n v)\n        else\n            switch costume to (off -y v)\n        end\n    else\n        if <(ON/OFF STATUS) = [on]> then\n            switch costume to (on v)\n        else\n            switch costume to (off v)\n        end\n    end\nend\ngo to x: (x) y: (y)\nset size to (sz) %\ncreate clone of (_myself_ v)\n\nwhen flag clicked\nhide\nset [on/off status v] to [on]\n\nCreate on-off Element: [ON/OFF/SWITCH] [OFF] At x, y: [-43] [-115] Size: [100] Level: [8]\nCreate on-off Element: [ON/OFF/SWITCH] [OFF] At x, y: [-11] [-115] Size: [100] Level: [8]\nCreate on-off Element: [ON/OFF/SWITCH] [OFF] At x, y: [114] [34] Size: [100] Level: [8]\nCreate on-off Element: [ON/OFF/SWITCH] [OFF] At x, y: [147] [34] Size: [100] Level: [8]\n\nwhen I start as a clone\nwait until <(_t5) = (Level)>\nshow\nforever\n    go to [front v] layer\n    go [backward v] (2) layers\n    if <(ON/OFF STATUS) = [on]> then\n        switch costume to (off -n v)\n    else\n        switch costume to (off -y v)\n    end\n    if <not <(_t5) = (Level)>> then\n        delete this clone\n    end\nend\n\n@On\n\ndefine Create on-off Element: [ON/OFF/SWITCH] (element) At x, y: (x) (y) Size: (sz) Level: (lvl)\nset [_t6 v] to (lvl)\nif <(element) = [ON]> then\n    if <(ON/OFF STATUS) = [on]> then\n        switch costume to (on -y v)\n    else\n        switch costume to (on -n v)\n    end\nelse\n    if <(element) = [OFF]> then\n        if <(ON/OFF STATUS) = [on]> then\n            switch costume to (off -n v)\n        else\n            switch costume to (off -y v)\n        end\n    else\n        if <(ON/OFF STATUS) = [on]> then\n            switch costume to (on v)\n        else\n            switch costume to (off v)\n        end\n    end\nend\ngo to x: (x) y: (y)\nset size to (sz) %\ncreate clone of (_myself_ v)\n\nwhen flag clicked\nset [on/off status v] to [on]\nhide\nCreate on-off Element: [ON/OFF/SWITCH] [ON] At x, y: [-138] [-20] Size: [100] Level: [11]\nCreate on-off Element: [ON/OFF/SWITCH] [ON] At x, y: [-43] [-33] Size: [100] Level: [11]\nCreate on-off Element: [ON/OFF/SWITCH] [ON] At x, y: [-43] [-66] Size: [100] Level: [11]\nCreate on-off Element: [ON/OFF/SWITCH] [ON] At x, y: [-43] [-99] Size: [100] Level: [11]\n\nwhen I start as a clone\nwait until <(_t6) = (Level)>\nshow\nforever\n    go to [front v] layer\n    go [backward v] (2) layers\n    if <(ON/OFF STATUS) = [on]> then\n        switch costume to (on -y v)\n    else\n        switch costume to (on -n v)\n    end\n    if <not <(_t6) = (Level)>> then\n        delete this clone\n    end\nend\n\n@Clickables\n\nwhen flag clicked\ngo to [back v] layer\nhide\nwait (.1) seconds\nswitch costume to (follow v)\nrepeat (3)\n    next costume\n    create clone of (_myself_ v)\nend\n\nwhen I start as a clone\nhide\nif <(costume [number v]) = [1]> then\n    go to x: (-78) y: (0)\n    wait until <(Level) = [13]>\n    show\n    broadcast (Music change!! v)\n    forever\n        tk\n    end\nelse\n    if <(costume [number v]) = [2]> then\n        go to x: (-9) y: (0)\n        wait until <(Level) = [13]>\n        show\n        forever\n            tk\n        end\n    else\n        go to x: (86) y: (0)\n        wait until <(Level) = [13]>\n        show\n        forever\n            tk\n        end\n    end\nend\n\ndefine tk\nif <touching (main character v)?> then\n    if <[15] = (_Gh EFFECT)> then\n        repeat (5)\n            change [brightness v] effect by (1)\n        end\n        wait (.1) seconds\n        repeat (5)\n            change [brightness v] effect by (-1)\n        end\n    else\n        change [_gh effect v] by (((15) - (_Gh EFFECT)) / (3))\n        set [brightness v] effect to (_Gh EFFECT)\n    end\nelse\n    change [_gh effect v] by (((0) - (_Gh EFFECT)) / (3))\n    set [brightness v] effect to (_Gh EFFECT)\nend\n\nwhen flag clicked\nerase all\n\n@Follow, Heart, StarSprite2\n\ndefine Smooth Glide x: (x) y: (y) speed: (i)\nrepeat until <<(round (x position)) = (round (x))> and <(round (y position)) = (round (y))>>\n    change x by (((round (x)) - (round (x position))) / (i))\n    change y by (((round (y)) - (round (y position))) / (i))\nend\ngo to x: (x) y: (y)\n\nwhen flag clicked\ngo to x: (-121) y: (-177)\nhide\nbroadcast (Start v)\n\nwhen I receive [start v]\nforever\n    hide\n    clear graphic effects\n    go to x: (-18) y: (50)\n    wait (pick random (1) to (30)) seconds\n    show\n    glide in\n    wait (pick random (5) to (15)) seconds\n    glide out\nend\n\ndefine glide in\nSmooth Glide x: (-18) y: (-4) speed: (3)\n\nglide (0.5) secs to x: (-121) y: (-177)\nwait (pick random (1) to (20)) seconds\nglide (0.5) secs to x: (-121) y: (-200)\nhide\n\ndefine glide out\nbroadcast (gh v)\nSmooth Glide x: (-18) y: (30) speed: (3)\n\nwhen I receive [gh v]\nrepeat (10)\n    change [ghost v] effect by (10)\nend\n\nwhen I receive [start v]\nforever\n    go to [front v] layer\nend\n\n