☆Minecraft Platformer☆part5　マインクラフトプラットフォーマー
@Stage\n\nwhen I receive [ask v]\nask [Level] and wait\nif <[code outcomes v] contains (answer)?> then\n    set [code v] to (answer)\n    ask [Costume] and wait\n    if <[costume outcomes v] contains (answer)?> then\n        broadcast (Code correct v)\n        set [costume v] to (answer)\n    else\n        broadcast (Invalid savecode v)\n    end\nelse\n    broadcast (Invalid savecode v)\nend\n\n@Blank\n\n@Level\n\nwhen flag clicked\nset [menu open? v] to [1]\ngo to [back v] layer\nswitch costume to (1 v)\nforever\n    set [level v] to (costume [number v])\nend\n\nwhen I receive [next level v]\nnext costume\n\nwhen I receive [code correct v]\nswitch costume to (Code)\nset [menu open? v] to [0]\n\nwhen I receive [start game v]\nset [menu open? v] to [0]\nswitch costume to (1 v)\n\nwhen flag clicked\nforever\n    if <(Menu Open?) = [0]> then\n        play sound [Alan Walker - Force v] until done\n    end\nend\n\n@Player\n\nwhen I receive [code correct v]\nswitch costume to (letter (3) of (Code))\nshow\n\nwhen flag clicked\nswitch costume to (1 v)\nhide\nset [gravity v] to [-1]\nset [speed y v] to [0]\nforever\n    point in direction (90)\n    set [costume v] to (costume [number v])\n    if <<<<key (up arrow v) pressed?> or <key (w v) pressed?>> or <key (space v) pressed?>> or <<[0] < (mouse y)> and <mouse down?>>> then\n        if <(fall) < [3]> then\n            set [speed y v] to [12]\n        end\n    end\n    if <<<key (left arrow v) pressed?> or <key (a v) pressed?>> or <<(mouse x) < [0]> and <mouse down?>>> then\n        change [speed x v] by (-1.5)\n    end\n    if <<<key (right arrow v) pressed?> or <key (d v) pressed?>> or <<[0] < (mouse x)> and <mouse down?>>> then\n        change [speed x v] by (1.5)\n    end\n    set [speed x v] to ((Speed X) * (0.8))\n    change [speed y v] by (Gravity)\n    Move - in steps (([abs v] of (Speed X) ) + ([abs v] of (Speed y) ))\n    if <<touching (_edge_ v)?> and <[163] < (x position)>> then\n        broadcast (Next Level v)\n        go to x: (-200) y: (5)\n    end\n    if <<touching (_edge_ v)?> and <(x position) < [163]>> then\n        if on edge, bounce\n    end\n    if <<<touching (obstacles v)?> or <touching (saw v)?>> or <touching (lava v)?>> then\n        repeat (10)\n            change [ghost v] effect by (10)\n        end\n        go to x: (-200) y: (5)\n        repeat (10)\n            change [ghost v] effect by (-10)\n        end\n    end\nend\n\ndefine Move - in steps (steps)\nchange [fall v] by (1)\nrepeat (steps)\n    set [last value v] to (x position)\n    change x by ((Speed X) / (steps))\n    if <touching (level v)?> then\n        set x to (last value)\n        set [speed x v] to [0]\n    end\n    set [last value v] to (y position)\n    change y by ((Speed y) / (steps))\n    if <touching (level v)?> then\n        set y to (last value)\n        if <(Speed y) < [0]> then\n            set [fall v] to [0]\n        end\n        set [speed y v] to [0]\n    end\nend\n\nwhen flag clicked\nforever\n    if <<(Level) = [9]> or <(Level) = [10]>> then\n        point in direction (75)\n    else\n        if <<(Level) = [15]> or <(Level) = [19]>> then\n            point in direction (105)\n        else\n            point in direction (90)\n        end\n    end\nend\n\nwhen I receive [start game v]\nshow\ngo to x: (-200) y: (5)\n\nbroadcast (Start Game v)\n\nwhen I receive [code correct v]\ngo to x: (-200) y: (5)\nswitch costume to (Costume)\n\nwhen this sprite clicked\nnext costume\n\nwhen flag clicked\nforever\n    switch costume to (Costume)\nend\n\n@Obstacles\n\nwhen I receive [code correct v]\nswitch costume to (Code)\n\nwhen I receive [next level v]\nnext costume\n\nwhen I receive [start game v]\nswitch costume to (01 v)\n\nwhen flag clicked\ngo to [back v] layer\n\n@Snowflakes\n\nwhen flag clicked\nset [ghost v] effect to (10)\ngo to [back v] layer\nhide\nforever\n    if <(Clones Off?) = [0]> then\n        if <[show snoflakes v] contains (Level)?> then\n            repeat until <not <[show snoflakes v] contains (Level)?>>\n                show\n                create clone of (_myself_ v)\n                go to x: (pick random (200) to (-200)) y: (180)\n                wait (0.1) seconds\n            end\n        else\n            hide\n        end\n    else\n        hide\n    end\nend\n\nwhen I start as a clone\nrepeat until <<touching (_edge_ v)?> and <(y position) < [-158]>>\n    change y by (-5)\nend\nrepeat (5)\n    change [ghost v] effect by (20)\nend\ndelete this clone\n\n@Saw\n\nwhen flag clicked\nhide\ngo to [back v] layer\nforever\n    turn right (3) degrees\n    if <[show saw v] contains (Level)?> then\n        show\n        if <<(Level) = [20]> or <(Level) = [16]>> then\n            go to x: (45) y: (-99)\n        end\n        if <(Level) = [21]> then\n            go to x: (-70) y: (-99)\n        end\n    else\n        hide\n    end\nend\n\n@Clouds\n\nwhen flag clicked\nhide\nforever\n    if <(Clones Off?) = [0]> then\n        go to [back v] layer\n        wait (3) seconds\n        create clone of (_myself_ v)\n        go to x: (240) y: (246)\n    else\n        hide\n    end\nend\n\nwhen I start as a clone\nshow\nrepeat ((236) / (2.5))\n    change x by (-3)\n    change x by (-3)\nend\ndelete this clone\n\n@Thumbnail\n\nwhen flag clicked\nhide\n\ngo to [front v] layer\nshow\n\n@Menu BG\n\nwhen flag clicked\nswitch costume to (mountains v)\ngo to x: (0) y: (1)\nshow\nforever\n    set x to ((mouse x) / (30))\n    set y to ((mouse x) / (30))\nend\n\nwhen flag clicked\nforever\n    wait (5) seconds\n    next costume\nend\n\nwhen I receive [start game v]\nhide\nswitch costume to (mountains v)\n\nwhen I receive [code correct v]\nhide\nswitch costume to (mountains v)\n\n@Play\n\nwhen flag clicked\ngo to [front v] layer\nset [code v] to [011]\nshow\nset size to (100) %\nforever\n    if <touching (mouse-pointer v)?> then\n        change size by (((110) - (size)) / (3))\n    else\n        change size by (((100) - (size)) / (3))\n    end\nend\n\nwhen this sprite clicked\nplay sound [Low Whoosh v] until done\nbroadcast (Start Game v)\n\nwhen I receive [start game v]\nhide\n\nwhen I receive [code correct v]\nhide\n\n@Load Game\n\nwhen flag clicked\ngo to [front v] layer\nshow\nset size to (100) %\nforever\n    if <touching (mouse-pointer v)?> then\n        change size by (((110) - (size)) / (3))\n    else\n        change size by (((100) - (size)) / (3))\n    end\nend\n\nwhen I receive [start game v]\nhide\n\nwhen this sprite clicked\nbroadcast (Ask v)\n\nwhen I receive [code correct v]\nhide\n\n@Clones on/off\n\nwhen flag clicked\nswitch costume to (0 v)\ngo to [front v] layer\nshow\nset size to (100) %\nforever\n    set [clones off? v] to (costume [name v])\n    if <touching (mouse-pointer v)?> then\n        change size by (((110) - (size)) / (3))\n    else\n        change size by (((100) - (size)) / (3))\n    end\nend\n\nwhen I receive [start game v]\nhide\n\nwhen I receive [code correct v]\nhide\n\nwhen this sprite clicked\nnext costume\nplay sound [Low Whoosh v] until done\n\n@Save\n\nwhen flag clicked\nset size to (50) %\nhide variable [costume v]\nhide variable [level v]\ngo to [back v] layer\nforever\n    show\n    if <touching (mouse-pointer v)?> then\n        set [brightness v] effect to (15)\n    else\n        set [brightness v] effect to (0)\n    end\nend\n\nwhen I receive [start game v]\ngo to x: (-211) y: (-167)\ngo to [front v] layer\n\nwhen this sprite clicked\nbroadcast (Next Costume v)\nforever\n    if <([costume name v] of [something v]) = [1]> then\n        show variable [costume v]\n        show variable [level v]\n    else\n        hide variable [costume v]\n        hide variable [level v]\n    end\nend\n\n@Something\n\nwhen I receive [next costume v]\nnext costume\n\n@Particles\n\nwhen flag clicked\nset size to (70) %\nhide\nforever\n    if <(Clones Off?) = [0]> then\n        if <(Level) = [4]> then\n            create clone of (_myself_ v)\n            go to x: (pick random (9) to (90)) y: (-90)\n            show\n            wait (0.1) seconds\n        end\n    else\n        hide\n    end\nend\n\nwhen I start as a clone\nrepeat until <<touching color (#ff6b66)?> or <touching (_edge_ v)?>>\n    change y by (3)\nend\ndelete this clone\n\nwhen flag clicked\nforever\n    if <<not <(Level) = [4]>> and <(Clones Off?) = [0]>> then\n        hide\n    end\nend\n\n
-Teamwork||A Platformer-\nSTOP ADVERTISING!\nYou and your friend are lost in a alien place where you must work together to escape and go back home!\nNew Game https://scratch.mit.edu/projects/486293968/\n\n-How to Play-\nUse Arrow keys to move blue and WASD to move red.\nYou can only stay on a platform that is the same color as the character.\nPress the black button to change the colors around.\nAvoid the spikes and get to the flag for the next level.\n\n-Milestones-\nShared! (1/29/2021)\n1000 views! (1/31/2021)\n@Indian-Programmer liked/faved! (2/1/2021)\n10000 views! (2/2/2021)\nFront-paged! (2/8/2021)\n\n-Credits-\nThanks to me for the code (some references to @griffpatch 's engine).\nArt also by me.\nMusic is excerpt from Tevo by Vexento.\n\n-Tags-\n#All #Games #Platformer #Unique #Teamwork #Red #Blue #Spikes #Flag #Button #kevtheguy