Minecraft Platformer #games #minecraft
@Stage\n\nwhen flag clicked\nforever\n    play sound [Minecraft Music v] until done\nend\n\n@Steve\n\ndefine Touch Ground\nif <(Yv) > [0]> then\n    repeat until <not <touching (block v)?>>\n        change y by (-1)\n        set [yv v] to [0]\n    end\nelse\n    repeat until <not <touching (block v)?>>\n        change y by (1)\n        set [yv v] to [0]\n        set [falling v] to [0]\n    end\nend\nif <<<key (w v) pressed?> or <key (up arrow v) pressed?>> and <<touching (block v)?> or <(falling) < [5]>>> then\n    set [yv v] to [9]\nend\n\ndefine Touch Wall\nrepeat (10)\n    if <touching (block v)?> then\n        change y by (1)\n    end\nend\nif <touching (block v)?> then\n    change x by ((round (Xv)) * (-1))\n    change y by (-10)\n    set [xv v] to [0]\nend\n\ndefine Reset\nclear graphic effects\nshow\nset size to (35) %\ngo to x: (-147) y: (-21)\nset [xv v] to [0]\nset [yv v] to [0]\nset [falling v] to [0]\nset [state v] to [Alive]\nshow variable [blocks left v]\nshow variable [level v]\n\nwhen flag clicked\nhide variable [blocks left v]\nhide variable [level v]\n\ndefine Mouse touch steve?\nif <<touching (mouse-pointer v)?> or <(distance to [mouse-pointer v]) < [35]>> then\n    set [mouse touch steve? v] to [1]\nelse\n    set [mouse touch steve? v] to [0]\nend\n\nwhen I receive [start v]\nReset\nforever\n    if <(State) = [Alive]> then\n        switch costume to (steve v)\n        Mouse touch steve?\n        if <<key (d v) pressed?> or <key (right arrow v) pressed?>> then\n            change [xv v] by (1)\n        end\n        if <<key (a v) pressed?> or <key (left arrow v) pressed?>> then\n            change [xv v] by (-1)\n        end\n        set [xv v] to ((Xv) * (0.8))\n        change x by (round (Xv))\n        Touch Wall\n        change [yv v] by (-1)\n        change [falling v] by (1)\n        change y by (Yv)\n        Touch Ground\n        set [blocks left v] to (length of [blocks v])\n        Detect Lava <touching (lava v)?>\n        Detect Next Level <touching (diamond v)?>\n    end\nend\n\ndefine Detect Lava <touch lava>\nif <touch lava> then\n    start sound [Disconnect v]\n    set [state v] to [Dead]\n    Fade\n    broadcast (Delete Clones v) and wait\n    broadcast (Reset v)\n    Reset\nend\n\ndefine Fade\nclear graphic effects\nset [ghost v] effect to (0)\nrepeat (20)\n    change [ghost v] effect by (5)\nend\nset [ghost v] effect to (100)\nwait (0.5) seconds\n\ndefine Detect Next Level <next level>\nif <next level> then\n    start sound [Connect v]\n    set [state v] to [Next Level]\n    Fade\n    change [level v] by (1)\n    broadcast (Delete Clones v) and wait\n    broadcast (Reset v)\n    Reset\n    broadcast (Next Level v)\nend\n\nset [state v] to [Dead]\nFade\nbroadcast (Delete Clones v) and wait\nbroadcast (Reset v)\nReset\n\n@Block\n\nwhen flag clicked\nset [level v] to [1]\nReset\nforever\n    set [block snap v] to [16]\n    switch costume to (empty v)\n    Go to mouse\n    Render Block (join (x position) (join [::] (y position)))\n    if <not <key (space v) pressed?>> then\n        set [mouse down? v] to [0]\n    end\nend\n\ndefine Go to mouse\ngo to x: (mouse x) y: (mouse y)\nset x to ((round ((x position) / (block snap))) * (block snap))\nset y to ((round ((y position) / (block snap))) * (block snap))\n\ndefine Render Block (position)\nif <<key (space v) pressed?> and <<(Mouse touch steve?) = [0]> and <<(mouse down?) = [0]> and <<not <[blocks in use v] contains (position)?>> and <<[blocks v] contains [Grass Block]?> or <[blocks v] contains [Dirt Block]?>>>>>> then\n    set [block rendering1 v] to [Dirt Block]\n    switch costume to (Block Rendering1)\n    add (position) to [blocks in use v]\n    delete (1) of [blocks v]\n    create clone of (_myself_ v)\n    set [mouse down? v] to [1]\nend\n\nwhen I start as a clone\ngo to [back v] layer\nif <(Block Rendering1) = [Dirt Block]> then\n    switch costume to (dirt block v)\nend\nif <(Block Rendering1) = [Grass Block]> then\n    switch costume to (grass block v)\nend\nforever\n    if <<touching (mouse-pointer v)?> and <mouse down?>> then\n        delete (item # of (join (x position) (join [::] (y position))) in [blocks in use v]) of [blocks in use v]\n        add (Block Rendering1) to [blocks v]\n        delete this clone\n    end\nend\n\ndefine Set Level\nif <(Level) = [1]> then\n    set [block rendering1 v] to [Grass Block]\n    Make Row Blocks - Start: [0] [-5] End: [-15]\n    Make Row Blocks - Start: [1] [-6] End: [15]\n    set [block rendering1 v] to [Dirt Block]\n    Make Row Blocks - Start: [0] [-6] End: [-15]\n    Make Row Blocks - Start: [-15] [-7] End: [15]\n    Make Row Blocks - Start: [-15] [-8] End: [15]\n    Make Row Blocks - Start: [-15] [-9] End: [15]\n    Make Row Blocks - Start: [-15] [-10] End: [15]\n    repeat (2)\n        add [Dirt Block] to [blocks v]\n    end\nelse\n    if <(Level) = [2]> then\n        set [block rendering1 v] to [Grass Block]\n        Make Row Blocks - Start: [-4] [-5] End: [-15]\n        Make Row Blocks - Start: [0] [-5] End: [3]\n        Make Row Blocks - Start: [7] [-5] End: [15]\n        set [block rendering1 v] to [Dirt Block]\n        Make Row Blocks - Start: [0] [-6] End: [-15]\n        Make Row Blocks - Start: [-15] [-7] End: [15]\n        Make Row Blocks - Start: [-15] [-8] End: [15]\n        Make Row Blocks - Start: [-15] [-9] End: [15]\n        Make Row Blocks - Start: [-15] [-10] End: [15]\n    else\n        if <(Level) = [3]> then\n            set [block rendering1 v] to [Grass Block]\n            Make Row Blocks - Start: [0] [-5] End: [-15]\n            Render Level Blocks [15] [-5]\n            Render Level Blocks [14] [-5]\n            Render Level Blocks [13] [-5]\n            set [block rendering1 v] to [Dirt Block]\n            Make Row Blocks - Start: [0] [-6] End: [-15]\n            Make Row Blocks - Start: [0] [-7] End: [-15]\n            Make Row Blocks - Start: [0] [-8] End: [-15]\n            Make Row Blocks - Start: [0] [-9] End: [-15]\n            Make Row Blocks - Start: [0] [-10] End: [-15]\n            Make Column Blocks - Start: [13] [-6] End: [-10]\n            Make Column Blocks - Start: [14] [-6] End: [-10]\n            Make Column Blocks - Start: [15] [-6] End: [-10]\n        else\n            if <(Level) = [4]> then\n                set [block rendering1 v] to [Grass Block]\n                Make Row Blocks - Start: [-8] [-5] End: [-15]\n                set [block rendering1 v] to [Dirt Block]\n                Make Row Blocks - Start: [-8] [-6] End: [-15]\n                Make Row Blocks - Start: [-8] [-7] End: [-15]\n                Make Row Blocks - Start: [-8] [-8] End: [-15]\n                Make Row Blocks - Start: [-8] [-9] End: [-15]\n                Make Row Blocks - Start: [-8] [-10] End: [-15]\n            else\n                if <(Level) = [5]> then\n                    set [block rendering1 v] to [Grass Block]\n                    Make Row Blocks - Start: [-9] [-5] End: [-15]\n                    set [block rendering1 v] to [Dirt Block]\n                    Make Row Blocks - Start: [-9] [-6] End: [-15]\n                else\n                    if <(Level) = [6]> then\n                        set [block rendering1 v] to [Grass Block]\n                        Make Row Blocks - Start: [-9] [-5] End: [-15]\n                    else\n                        if <(Level) = [7]> then\n                            set [block rendering1 v] to [Grass Block]\n                            Render Level Blocks [-9] [-5]\n                            set [block rendering1 v] to [Dirt Block]\n                            Render Level Blocks [-9] [-6]\n                        else\n                            if <(Level) = [8]> then\n                                set [block rendering1 v] to [Grass Block]\n                                Make Row Blocks - Start: [-7] [-5] End: [-15]\n                                set [block rendering1 v] to [Dirt Block]\n                                Make Row Blocks - Start: [-15] [-6] End: [15]\n                                Make Row Blocks - Start: [-15] [-6] End: [15]\n                                Make Row Blocks - Start: [-15] [-7] End: [15]\n                                Make Row Blocks - Start: [-15] [-8] End: [15]\n                                Make Row Blocks - Start: [-15] [-9] End: [15]\n                                Make Row Blocks - Start: [-15] [-10] End: [15]\n                                Make Row Blocks - Start: [-15] [-11] End: [15]\n                                Make Row Blocks - Start: [-6] [-5] End: [15]\n                                Make Row Blocks - Start: [-6] [-4] End: [15]\n                                Make Row Blocks - Start: [-6] [-3] End: [15]\n                            else\n                                if <(Level) = [9]> then\n                                    set [block rendering1 v] to [Grass Block]\n                                    Render Level Blocks [-9] [-5]\n                                    Render Level Blocks [2] [4]\n                                    Render Level Blocks [12] [-5]\n                                else\n                                    if <(Level) = [10]> then\n                                        set [block rendering1 v] to [Grass Block]\n                                        Render Level Blocks [-9] [-5]\n                                    else\n                                        set [block rendering1 v] to [Grass Block]\n                                        Make Row Blocks - Start: [0] [-5] End: [-15]\n                                        Make Row Blocks - Start: [1] [-6] End: [15]\n                                        set [block rendering1 v] to [Dirt Block]\n                                        Make Row Blocks - Start: [0] [-6] End: [-15]\n                                        Make Row Blocks - Start: [-15] [-7] End: [15]\n                                        Make Row Blocks - Start: [-15] [-8] End: [15]\n                                        Make Row Blocks - Start: [-15] [-9] End: [15]\n                                        Make Row Blocks - Start: [-15] [-10] End: [15]\n                                    end\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\nset [block rendering1 v] to [Dirt Block]\n\ndefine Reset\ndelete all of [blocks in use v]\ndelete all of [blocks v]\nset [block snap v] to [16]\nSet Level\n\nwhen [c v] key pressed\n\nshow variable [mouse x, y v]\nGo to mouse\nset [mouse x, y v] to (join ((x position) / (block snap)) (join [, ] ((y position) / (block snap))))\n\ndefine Render Level Blocks (x) (y)\nswitch costume to (Block Rendering1)\nadd (join ((x) * (block snap)) (join [::] ((y) * (block snap)))) to [blocks in use v]\ngo to x: ((x) * (block snap)) y: ((y) * (block snap))\ncreate clone of (_myself_ v)\n\nwait until <not <key (space v) pressed?>>\n\ngo to x: (0) y: (0)\ncreate clone of (_myself_ v)\n\nRender Level Blocks [0] [-5]\nRender Level Blocks [-1] [-5]\nRender Level Blocks [-2] [-5]\nRender Level Blocks [-3] [-5]\nRender Level Blocks [-4] [-5]\nRender Level Blocks [-5] [-5]\nRender Level Blocks [-6] [-5]\nRender Level Blocks [-7] [-5]\nRender Level Blocks [-8] [-5]\nRender Level Blocks [-9] [-5]\nRender Level Blocks [-10] [-5]\nRender Level Blocks [-11] [-5]\n\ndefine Make Row Blocks - Start: (x1) (y1) End: (x2)\nset [render row1 v] to [0]\nrepeat (([abs v] of ((x1) - (x2)) ) + (1))\n    Render Level Blocks ((x1) + (Render Row1)) (y1)\n    if <((x1) - (x2)) > [0]> then\n        change [render row1 v] by (-1)\n    else\n        change [render row1 v] by (1)\n    end\nend\n\nset [block rendering1 v] to [Grass Block]\n\nwhen I receive [delete clones v]\ndelete all of [blocks in use v]\ndelete all of [blocks v]\ndelete this clone\n\nwhen I receive [reset v]\nReset\n\ndefine Make Column Blocks - Start: (x1) (y1) End: (y2)\nset [render column1 v] to [0]\nrepeat (([abs v] of ((y1) - (y2)) ) + (1))\n    Render Level Blocks (x1) ((y1) + (Render Column1))\n    if <((y1) - (y2)) > [0]> then\n        change [render column1 v] by (-1)\n    else\n        change [render column1 v] by (1)\n    end\nend\n\nRender Level Blocks [9] [-10]\nRender Level Blocks [10] [-10]\nRender Level Blocks [11] [-10]\nRender Level Blocks [12] [-10]\n\nMake Row Blocks - Start: [-6] [-2] End: [15]\nMake Row Blocks - Start: [-6] [-1] End: [15]\nMake Row Blocks - Start: [-6] [0] End: [15]\nMake Row Blocks - Start: [-6] [1] End: [15]\nMake Row Blocks - Start: [-6] [2] End: [15]\nMake Row Blocks - Start: [-6] [3] End: [15]\nMake Row Blocks - Start: [-6] [4] End: [15]\nMake Row Blocks - Start: [-6] [5] End: [15]\nMake Row Blocks - Start: [-6] [6] End: [15]\nMake Row Blocks - Start: [-6] [7] End: [15]\n\n@Thumbnail\n\nwhen flag clicked\nshow\ngo to x: (0) y: (0)\ngo to [front v] layer\nclear graphic effects\nwait (2) seconds\nbroadcast (Start v)\nset [ghost v] effect to (0)\nrepeat (100)\n    change [ghost v] effect by (1)\nend\nset [ghost v] effect to (100)\n\nhide\n\n@Lava\n\nwhen flag clicked\nhide\n\nwhen I receive [start v]\nRender Level\n\ndefine Render Level\nRender Row - Start: [15] [-11] End [-15]\nif <(Level) = [2]> then\n    Render Row - Start: [-3] [-5] End [-1]\n    Render Row - Start: [4] [-5] End [6]\n    Render Row - Start: [1] [-6] End [15]\nelse\n    if <(Level) = [3]> then\n        Render Row - Start: [1] [-10] End [12]\n        Render Row - Start: [1] [-9] End [12]\n    else\n        if <(Level) = [4]> then\n            Render Row - Start: [-7] [-10] End [15]\n        else\n            if <(Level) = [5]> then\n                Render Row - Start: [15] [-11] End [-15]\n                Render Row - Start: [15] [-10] End [-15]\n                Render Row - Start: [15] [-9] End [-15]\n            else\n                if <(Level) = [6]> then\n                    Render Row - Start: [15] [-10] End [-15]\n                else\n                    if <(Level) = [7]> then\n                        Render Row - Start: [15] [-10] End [-15]\n                    else\n                        if <(Level) = [9]> then\n                            Render Row - Start: [15] [8] End [-15]\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\n\ndefine Render Row - Start: (x1) (y1) End (x2)\nset [render row1 v] to [0]\nrepeat (([abs v] of ((x1) - (x2)) ) + (1))\n    Render Level Blocks ((x1) + (Render Row1)) (y1)\n    if <((x1) - (x2)) > [0]> then\n        change [render row1 v] by (-1)\n    else\n        change [render row1 v] by (1)\n    end\nend\n\ndefine Render Level Blocks (x) (y)\nswitch costume to (lava v)\ngo to x: ((x) * (block snap)) y: ((y) * (block snap))\ncreate clone of (_myself_ v)\n\nwhen I start as a clone\nshow\ngo to [back v] layer\n\nwhen I receive [next level v]\nRender Level\n\nrepeat (10)\nend\n\ndefine Render Column Blocks - Start: (x1) (y1) End: (y2)\nset [render column1 v] to [0]\nrepeat (([abs v] of ((y1) - (y2)) ) + (1))\n    Render Level Blocks (x1) ((y1) + (Render Column1))\n    if <((y1) - (y2)) > [0]> then\n        change [render column1 v] by (-1)\n    else\n        change [render column1 v] by (1)\n    end\nend\n\nRender Row - Start: [15] [0] End [-15]\n\nwhen I receive [delete clones v]\ndelete this clone\n\nwhen I receive [reset v]\nRender Level\n\nif  then\nend\n\nRender Row - Start: [15] [-11] End [-15]\n\n@Diamond\n\nwhen flag clicked\nhide\n\nwhen I receive [start v]\nset size to (80) %\nshow\nSet Level\n\ndefine Set Level\nif <(Level) = [8]> then\n    show\n    go to x: (219) y: (-137)\nelse\n    if <(Level) = [11]> then\n        hide\n    else\n        show\n        go to x: (219) y: (-45)\n    end\nend\n\nwhen I receive [next level v]\nset size to (80) %\nshow\nSet Level\n\nwhen I receive [reset v]\nset size to (80) %\nshow\nSet Level\n\n@Level\n\nwhen flag clicked\ngo to x: (0) y: (0)\nswitch costume to (costume1 v)\n\nwhen I receive [next level v]\nnext costume\n\n
MAKE SURE TO READ ALL THE INSTRUCTIONS!!! \nWelcome to Minecraft Platformer!\n- Arrow keys or WASD to move\n- Click to mine blocks\n- Space to place blocks\n- Get to the diamond\n- Avoid Lava\n- There are 10 levels!\n- You CANNOT place blocks over lava, other blocks, or near you (Steve)\n- If you can't place anymore, it is most likely you ran out of dirt so go mine some more \n- When you mine a block, it automatically adds it into your inventory\n- So far, you can only place dirt blocks. But it will change in the future :D (check out updates in notes and credits)\n- When you place a block it subtracts it from your inventory\n- Have fun! :D