Minecraft Platformer World[DEMO] remix
@Stage\n\n@System\n\nwhen flag clicked\nbroadcast (Menu - Setup v)\nset [menu - select v] to [None]\nset [#gamemode v] to [Menu]\nwait until <(#Gamemode) = [Set]>\nset [clone count x v] to ((480) / (30))\nset [clone count y v] to ((360) / (30))\nset [#level v] to [1]\nbroadcast (Set - Generate level v) and wait\nwait (1) seconds\nbroadcast (Set - Player Spawn v)\n\nwhen I receive [set - player spawn v]\nbroadcast (Set - Generate level v)\n\n@Stage Blocks\n\ndefine Generate Shadow (obj) (up) (low) <left end> <right end>\nif <not <<left end> or <right end>>> then\n    if <<not <(item ((obj) + ((up) * (1))) of [tile list v]) = [0]>> and <<not <(item ((obj) + ((low) * (1))) of [tile list v]) = [0]>> and <<not <(item ((obj) - (1)) of [tile list v]) = [0]>> and <not <(item ((obj) + (1)) of [tile list v]) = [0]>>>>> then\n        set [brightness v] effect to (-5)\n        if <<not <(item ((obj) + (((up) * (1)) - (1))) of [tile list v]) = [0]>> and <<not <(item ((obj) + (((up) * (1)) + (1))) of [tile list v]) = [0]>> and <<not <(item ((obj) + (((low) * (1)) - (1))) of [tile list v]) = [0]>> and <not <(item ((obj) + (((low) * (1)) + (1))) of [tile list v]) = [0]>>>>> then\n            set [brightness v] effect to (-10)\n            if <<not <(item ((obj) + ((up) * (2))) of [tile list v]) = [0]>> and <<not <(item ((obj) + ((low) * (2))) of [tile list v]) = [0]>> and <<not <(item ((obj) - (2)) of [tile list v]) = [0]>> and <not <(item ((obj) + (2)) of [tile list v]) = [0]>>>>> then\n                set [brightness v] effect to (-15)\n            end\n            if <<(((tile id) - (2)) mod (Clone Count X)) = [0]> or <(((tile id) + (1)) mod (Clone Count X)) = [0]>> then\n                if <<not <(item ((obj) + ((up) * (2))) of [tile list v]) = [0]>> and <not <(item ((obj) + ((low) * (2))) of [tile list v]) = [0]>>> then\n                    set [brightness v] effect to (-15)\n                end\n            end\n        end\n    end\nelse\n    if <<left end> and <<not <(item ((obj) + ((up) * (1))) of [tile list v]) = [0]>> and <<not <(item ((obj) + ((low) * (1))) of [tile list v]) = [0]>> and <not <(item ((obj) + (1)) of [tile list v]) = [0]>>>>> then\n        set [brightness v] effect to (-5)\n        if <<not <(item ((obj) + (((up) * (1)) + (1))) of [tile list v]) = [0]>> and <not <(item ((obj) + ((low) + (1))) of [tile list v]) = [0]>>> then\n            set [brightness v] effect to (-10)\n            if <<not <(item ((obj) + ((up) * (2))) of [tile list v]) = [0]>> and <not <(item ((obj) + ((low) * (2))) of [tile list v]) = [0]>>> then\n                set [brightness v] effect to (-15)\n            end\n        end\n    end\n    if <<right end> and <<not <(item ((obj) + ((up) * (1))) of [tile list v]) = [0]>> and <<not <(item ((obj) + ((low) * (1))) of [tile list v]) = [0]>> and <not <(item ((obj) - (1)) of [tile list v]) = [0]>>>>> then\n        set [brightness v] effect to (-5)\n        if <<not <(item ((obj) + (((up) * (1)) - (1))) of [tile list v]) = [0]>> and <not <(item ((obj) + (((low) * (1)) - (1))) of [tile list v]) = [0]>>> then\n            set [brightness v] effect to (-10)\n            if <<not <(item ((obj) + ((up) * (2))) of [tile list v]) = [0]>> and <not <(item ((obj) + ((low) * (2))) of [tile list v]) = [0]>>> then\n                set [brightness v] effect to (-15)\n            end\n        end\n    end\nend\n\ndefine Generate Stage Blocks\nshow\nrepeat (1)\n    delete this clone\nend\nset [tile id v] to [1]\nset [tile y v] to ((((Clone Count Y) * (-30)) / (2)) + ((30) / (2)))\nrepeat (Clone Count Y)\n    set [tile x v] to ((((Clone Count X) * (-30)) / (2)) + ((30) / (2)))\n    repeat (Clone Count X)\n        if <(item (tile id) of [tile list v]) > [0]> then\n            create clone of (_myself_ v)\n        end\n        change [tile x v] by (30)\n        change [tile id v] by (1)\n    end\n    change [tile y v] by (30)\nend\nhide\n\nwhen I start as a clone\ngo to [back v] layer\ngo [forward v] (1) layers\ngo to x: (tile x) y: (tile y)\nset [tile v] to (item (tile id) of [tile list v])\nChange block (tile id) (Clone Count X) ((0) - (Clone Count X))\nGenerate Shadow (tile id) (Clone Count X) ((0) - (Clone Count X)) <(((tile id) - (1)) mod (Clone Count X)) = [0]> <((tile id) mod (Clone Count X)) = [0]>\nswitch costume to (tile)\n\nwhen I receive [set - generate level v]\nwait (0) seconds\nclear graphic effects\nGenerate Stage Blocks\n\ndefine Change block (obj) (up) (low)\n\n@Water\n\nwhen I receive [set - generate level v]\nwait (0) seconds\nclear graphic effects\nGenerate Stage Blocks\n\ndefine Generate Stage Blocks\nshow\nrepeat (1)\n    delete this clone\nend\nset [tile id v] to [1]\nset [tile y v] to ((((Clone Count Y) * (-30)) / (2)) + ((30) / (2)))\nrepeat (Clone Count Y)\n    set [tile x v] to ((((Clone Count X) * (-30)) / (2)) + ((30) / (2)))\n    repeat (Clone Count X)\n        if < (item (tile id) of [tile list v]) contains [#]?> then\n            create clone of (_myself_ v)\n        end\n        change [tile x v] by (30)\n        change [tile id v] by (1)\n    end\n    change [tile y v] by (30)\nend\nhide\n\nwhen I start as a clone\ngo to [back v] layer\ngo [forward v] (1) layers\ngo to x: (tile x) y: (tile y)\nset [tile v] to (item (letter (2) of (tile id)) of [tile list v])\nswitch costume to (tile)\n\n@Damage Blocks\n\nwhen I receive [set - generate level v]\nwait (0) seconds\nclear graphic effects\nGenerate Damage Blocks\n\ndefine Change costume\nif <(lava costume) = [1]> then\n    repeat until <(lava costume) = [20]>\n        if <(lava animator) = [3]> then\n            set [lava animator v] to [0]\n            change [lava costume v] by (1)\n        else\n            change [lava animator v] by (1)\n        end\n        switch costume to (lava costume)\n    end\nend\nif <(lava costume) = [20]> then\n    repeat until <(lava costume) = [1]>\n        if <(lava animator) = [3]> then\n            set [lava animator v] to [0]\n            change [lava costume v] by (-1)\n        else\n            change [lava animator v] by (1)\n        end\n        switch costume to (lava costume)\n    end\nend\n\ndefine Generate Damage Blocks\nshow\nrepeat (1)\n    delete this clone\nend\nset [tile id v] to [1]\nset [tile y v] to ((((Clone Count Y) * (-30)) / (2)) + ((30) / (2)))\nrepeat (Clone Count Y)\n    set [tile x v] to ((((Clone Count X) * (-30)) / (2)) + ((30) / (2)))\n    repeat (Clone Count X)\n        if < (item (tile id) of [tile list v]) contains [-]?> then\n            create clone of (_myself_ v)\n        end\n        change [tile x v] by (30)\n        change [tile id v] by (1)\n    end\n    change [tile y v] by (30)\nend\nhide\n\nwhen I start as a clone\ngo to [front v] layer\ngo [backward v] (1) layers\ngo to x: (tile x) y: (tile y)\nif <(item (tile id) of [tile list v]) = [-1]> then\n    set [lava costume v] to [1]\nelse\n    set [lava costume v] to [0]\nend\nif <(item (tile id) of [tile list v]) = [-2]> then\n    set [tile v] to ((item (tile id) of [tile list v]) + (23))\nend\nswitch costume to (tile)\nforever\n    Change costume\nend\n\n@generator\n\ndefine Generate\ndelete all of [tile list v]\nif <(#Level) = [1]> then\n    Set spawn [-210] [0]\n    1-1\nend\nif <(#Level) = [2]> then\n    Set spawn [-210] [-90]\n    1-2\nend\nif <(#Level) = [3]> then\n    Set spawn [-210] [-90]\n    1-3\nend\nif <(#Level) = [4]> then\n    Set spawn [-210] [120]\n    1-4\nend\nif <(#Level) = [5]> then\n    Set spawn [-210] [-90]\n    1-5\nend\nif <(#Level) = [6]> then\n    1-6\nend\nif <(#Level) = [7]> then\n    1-7\nend\nif <(#Level) = [8]> then\n    1-8\nend\nif <(#Level) = [9]> then\n    1-9\nend\nif <(#Level) = [10]> then\n    2-1\nend\nif <(#Level) = [11]> then\n    2-2\nend\n\ndefine List add 0\nrepeat (((Clone Count X) * (Clone Count Y)) - (length of (Tile List)))\n    add [0] to [tile list v]\nend\n\nwhen I receive [set - generate level v]\nGenerate\nList add 0\n\ndefine 1-1\nrepeat (Clone Count X)\n    add [2] to [tile list v]\nend\nrepeat (Clone Count X)\n    add [3] to [tile list v]\nend\n\ndefine 1-2\nrepeat (10)\n    add [2] to [tile list v]\nend\nrepeat (4)\n    add [3] to [tile list v]\nend\nrepeat (2)\n    add [2] to [tile list v]\nend\nrepeat (4)\n    add [3] to [tile list v]\nend\nrepeat (4)\n    add [2] to [tile list v]\nend\nrepeat (2)\n    add [3] to [tile list v]\nend\nrepeat (4)\n    add [0] to [tile list v]\nend\nrepeat (2)\n    add [3] to [tile list v]\nend\nrepeat (4)\n    add [0] to [tile list v]\nend\nrepeat (4)\n    add [3] to [tile list v]\nend\n\ndefine 1-3\nrepeat (Clone Count X)\n    add [2] to [tile list v]\nend\nrepeat (14)\n    add [3] to [tile list v]\nend\nrepeat (2)\n    add [2] to [tile list v]\nend\nrepeat (14)\n    add [0] to [tile list v]\nend\nrepeat (2)\n    add [2] to [tile list v]\nend\nrepeat (4)\n    add [0] to [tile list v]\nend\nadd [3] to [tile list v]\nrepeat (9)\n    add [0] to [tile list v]\nend\nrepeat (2)\n    add [2] to [tile list v]\nend\nrepeat (8)\n    add [0] to [tile list v]\nend\nadd [3] to [tile list v]\nrepeat (5)\n    add [0] to [tile list v]\nend\nrepeat (2)\n    add [2] to [tile list v]\nend\nrepeat (12)\n    add [0] to [tile list v]\nend\nadd [3] to [tile list v]\nadd [0] to [tile list v]\nrepeat (2)\n    add [2] to [tile list v]\nend\nrepeat (14)\n    add [0] to [tile list v]\nend\nrepeat (2)\n    add [2] to [tile list v]\nend\nrepeat (14)\n    add [0] to [tile list v]\nend\nrepeat (2)\n    add [3] to [tile list v]\nend\n\ndefine 1-4\nrepeat (6)\n    add [2] to [tile list v]\nend\nrepeat (4)\n    add [3] to [tile list v]\nend\nrepeat (3)\n    add [0] to [tile list v]\nend\nrepeat (3)\n    add [3] to [tile list v]\nend\nadd [2] to [tile list v]\nrepeat (4)\n    add [-1] to [tile list v]\nend\nadd [3] to [tile list v]\nrepeat (10)\n    add [0] to [tile list v]\nend\nrepeat (5)\n    add [2] to [tile list v]\n    repeat (15)\n        add [0] to [tile list v]\n    end\nend\nadd [3] to [tile list v]\n\ndefine 1-5\nrepeat (16)\n    add [2] to [tile list v]\nend\nrepeat (2)\n    add [3] to [tile list v]\nend\nrepeat (4)\n    add [#1] to [tile list v]\nend\nrepeat (10)\n    add [2] to [tile list v]\nend\nrepeat (6)\n    add [0] to [tile list v]\nend\nadd [3] to [tile list v]\nrepeat (4)\n    add [#1] to [tile list v]\nend\nrepeat (5)\n    add [2] to [tile list v]\nend\nrepeat (11)\n    add [0] to [tile list v]\nend\nadd [3] to [tile list v]\nrepeat (4)\n    add [#1] to [tile list v]\nend\n\ndefine 1-6\nrepeat (3)\n    add [3] to [tile list v]\nend\nrepeat (3)\n    repeat (2)\n        add [-1] to [tile list v]\n    end\n    repeat (1)\n        add [2] to [tile list v]\n    end\nend\nrepeat (3)\n    add [-1] to [tile list v]\nend\nadd [3] to [tile list v]\nrepeat (5)\n    add [0] to [tile list v]\nend\nadd [3] to [tile list v]\nrepeat (2)\n    repeat (2)\n        add [0] to [tile list v]\n    end\n    add [2] to [tile list v]\nend\nrepeat (4)\n    add [0] to [tile list v]\nend\nrepeat (8)\n    add [0] to [tile list v]\nend\nadd [3] to [tile list v]\nrepeat (2)\n    add [0] to [tile list v]\nend\nadd [2] to [tile list v]\nrepeat (4)\n    add [0] to [tile list v]\nend\nrepeat (11)\n    add [0] to [tile list v]\nend\nadd [3] to [tile list v]\n\ndefine 1-7\nadd [3] to [tile list v]\nrepeat (2)\n    add [2] to [tile list v]\nend\nrepeat (10)\n    add [#1] to [tile list v]\nend\nrepeat (3)\n    add [2] to [tile list v]\nend\nadd [0] to [tile list v]\nadd [3] to [tile list v]\nadd [3] to [tile list v]\nrepeat (10)\n    add [#1] to [tile list v]\nend\nrepeat (3)\n    add [3] to [tile list v]\nend\nrepeat (6)\n    add [0] to [tile list v]\nend\nrepeat (5)\n    add [2] to [tile list v]\nend\nrepeat (11)\n    add [0] to [tile list v]\nend\nrepeat (5)\n    add [3] to [tile list v]\nend\n\ndefine 1-8\nrepeat (2)\n    repeat (3)\n        add [3] to [tile list v]\n    end\n    repeat (3)\n        add [-1] to [tile list v]\n    end\nend\nrepeat (2)\n    add [3] to [tile list v]\nend\nadd [2] to [tile list v]\nadd [-1] to [tile list v]\nrepeat (14)\n    add [0] to [tile list v]\nend\nadd [3] to [tile list v]\nadd [-1] to [tile list v]\nrepeat (15)\n    add [0] to [tile list v]\nend\nadd [-1] to [tile list v]\nrepeat (8)\n    add [0] to [tile list v]\nend\nadd [2] to [tile list v]\nrepeat (3)\n    add [0] to [tile list v]\nend\nadd [2] to [tile list v]\nrepeat (2)\n    add [0] to [tile list v]\nend\nadd [-1] to [tile list v]\nrepeat (3)\n    add [2] to [tile list v]\nend\nrepeat (3)\n    add [0] to [tile list v]\nend\nadd [2] to [tile list v]\nrepeat (8)\n    add [0] to [tile list v]\nend\nadd [-1] to [tile list v]\nrepeat (15)\n    add [0] to [tile list v]\nend\nadd [-1] to [tile list v]\nadd [2] to [tile list v]\nrepeat (14)\n    add [0] to [tile list v]\nend\nadd [-1] to [tile list v]\nrepeat (2)\n    add [0] to [tile list v]\nend\nadd [2] to [tile list v]\nrepeat (7)\n    add [0] to [tile list v]\nend\nadd [2] to [tile list v]\nrepeat (3)\n    add [0] to [tile list v]\nend\nadd [2] to [tile list v]\nadd [-1] to [tile list v]\nrepeat (6)\n    add [0] to [tile list v]\nend\nadd [2] to [tile list v]\n\ndefine 2-1\nrepeat (Clone Count X)\n    add [5] to [tile list v]\nend\nrepeat (9)\n    add [5] to [tile list v]\nend\nadd [0] to [tile list v]\nrepeat (2)\n    add [-2] to [tile list v]\nend\nrepeat (4)\n    add [5] to [tile list v]\nend\nrepeat (4)\n    add [0] to [tile list v]\nend\nrepeat (4)\n    add [5] to [tile list v]\nend\nrepeat (4)\n    add [0] to [tile list v]\nend\nrepeat (4)\n    add [5] to [tile list v]\nend\nrepeat (12)\n    add [0] to [tile list v]\nend\nrepeat (3)\n    add [5] to [tile list v]\nend\nadd [0] to [tile list v]\n\ndefine 1-9\nrepeat (4)\n    add [3] to [tile list v]\nend\nadd [2] to [tile list v]\nrepeat (4)\n    if <(pick random (0) to (1)) = [1]> then\n        add [2] to [tile list v]\n    else\n        add [5] to [tile list v]\n    end\nend\nrepeat (5)\n    if <(pick random (0) to (4)) = [4]> then\n        add [2] to [tile list v]\n    else\n        add [5] to [tile list v]\n    end\nend\nrepeat (2)\n    add [5] to [tile list v]\nend\nrepeat (4)\n    add [0] to [tile list v]\nend\nadd [2] to [tile list v]\nrepeat (4)\n    if <(pick random (0) to (1)) = [1]> then\n        add [3] to [tile list v]\n    else\n        add [5] to [tile list v]\n    end\nend\nrepeat (5)\n    if <(pick random (0) to (4)) = [4]> then\n        add [2] to [tile list v]\n    else\n        add [5] to [tile list v]\n    end\nend\nrepeat (2)\n    add [5] to [tile list v]\nend\nrepeat (4)\n    add [0] to [tile list v]\nend\nadd [3] to [tile list v]\nrepeat (4)\n    add [0] to [tile list v]\nend\nadd [5] to [tile list v]\nrepeat (4)\n    if <(pick random (0) to (4)) = [4]> then\n        add [3] to [tile list v]\n    else\n        add [5] to [tile list v]\n    end\nend\nrepeat (2)\n    add [0] to [tile list v]\nend\nrepeat (9)\n    add [0] to [tile list v]\nend\nrepeat (2)\n    add [5] to [tile list v]\nend\n\ndefine 2-2\nrepeat (Clone Count X)\n    add [5] to [tile list v]\nend\nrepeat (11)\n    add [5] to [tile list v]\nend\nrepeat (3)\n    add [#1] to [tile list v]\nend\nrepeat (2)\n    add [5] to [tile list v]\nend\nrepeat (5)\n    add [0] to [tile list v]\nend\nadd [-2] to [tile list v]\nrepeat (9)\n    add [0] to [tile list v]\nend\nrepeat (10)\n    add [5] to [tile list v]\n    repeat (15)\n        add [0] to [tile list v]\n    end\nend\n\ndefine Set spawn (x) (y)\nset [player - spawn x v] to (x)\nset [player - spawn y v] to (y)\n\n@Player\n\nwhen I receive [set - player spawn v]\nforever\n    if <(#Gamemode) = [Playing]> then\n        if <<(🧑touch water?) = [Yes]> and <not <(([abs v] of (🧑Vx) ) + ([abs v] of (🧑Vy) )) = [0]>>> then\n            SE\n        else\n            if <<<key (up arrow v) pressed?> or <<key (w v) pressed?> or <<mouse down?> and <(mouse y) > [0]>>>> and <(🧑touch ground？) < [3]>> then\n                SE\n            end\n            if <<<<<key (left arrow v) pressed?> or <<key (a v) pressed?> or <<mouse down?> and <(mouse x) < [0]>>>> or <<key (right arrow v) pressed?> or <<key (d v) pressed?> or <<mouse down?> and <(mouse x) > [0]>>>>> and <(🧑touch ground？) = [0]>> and <not <(🧑Vx) = [0]>>> then\n                SE\n                if <(🧑touch water?) = [No]> then\n                    wait (0.2) seconds\n                end\n                if <(🧑touch slime?) = [Yes]> then\n                    wait (0.1) seconds\n                end\n            end\n            if <<(🧑touch ground？) > [5]> and <(🧑touch water?) = [No]>> then\n        end\n        if <(🧑touch water?) = [Yes]> then\n            wait (0.6) seconds\n        end\n    end\nend\n\ndefine Set costume <left> <right> <jumping>\nchange [player - animator v] by (1)\nif <(player - animator) = [3]> then\n    set [player - animator v] to [0]\n    if <(Player - Costume) = [6]> then\n        set [player - costume v] to [3]\n    else\n        change [player - costume v] by (1)\n    end\nend\nif <<<left> or <right>> and <not <(player vx) = [0]>>> then\n    switch costume to (Player - Costume)\nelse\n    if <<jumping> and <(🧑touch slime?) = [No]>> then\n        switch costume to (jump v)\n    else\n        switch costume to (idle v)\n    end\nend\n\ndefine Player - Respawn\nset size to (400) %\nset [#gamemode v] to [Set]\ngo to x: (Player - Spawn X) y: (Player - Spawn Y)\nset [player - animator v] to [0]\nset [player - costume v] to [2]\nset [player vx v] to [0]\nset [player vy v] to [0]\nset [#gamemode v] to [Playing]\nset rotation style [left-right v]\npoint in direction (90)\n\nwhen I receive [set - player spawn v]\nPlayer - Respawn\nrepeat until <not <(#Gamemode) = [Playing]>>\n    show\n    clear graphic effects\n    switch costume to (hitbox v)\n    set [player x v] to (x position)\n    set [player y v] to (y position)\n    if <<(Goal Dir) = [→]> and <(x position) > [230]>> then\n        hide\n        change [#level v] by (1)\n        broadcast (Set - Player Spawn v) and wait\n    end\n    if <<(Goal Dir) = [↑]> and <(y position) > [170]>> then\n        hide\n        change [#level v] by (1)\n        broadcast (Set - Player Spawn v) and wait\n    end\n    if <(y position) < [-175]> then\n        hide\n        set [#gamemode v] to [Set]\n        start sound [player hurt v]\n        wait (0.3) seconds\n        Player - Respawn\n    end\n    if <touching (water v)?> then\n        set [player vy v] to ((player vy) * (0.4))\n    end\n    if <touching (damage blocks v)?> then\n        hide\n        create clone of (_myself_ v)\n        set [#gamemode v] to [Set]\n        if <<(#Level) = [10]> or <(#Level) = [11]>> then\n            start sound [player hurt v]\n        else\n            start sound [lava＿falling v]\n        end\n        wait (0.3) seconds\n        Player - Respawn\n    end\n    if <(#Gamemode) = [Playing]> then\n        if <<key (left arrow v) pressed?> or <<key (a v) pressed?> or <<mouse down?> and <(mouse x) < [0]>>>> then\n            point in direction (-90)\n            if <(🧑touch ice?) = [Yes]> then\n                change [player vx v] by (-0.4)\n            else\n                change [player vx v] by (-2)\n            end\n        end\n        if <<key (right arrow v) pressed?> or <<key (d v) pressed?> or <<mouse down?> and <(mouse x) > [0]>>>> then\n            point in direction (90)\n            if <(🧑touch ice?) = [Yes]> then\n                change [player vx v] by (0.4)\n            else\n                change [player vx v] by (2)\n            end\n        end\n        if <<key (up arrow v) pressed?> or <<key (w v) pressed?> or <<mouse down?> and <(mouse y) > [0]>>>> then\n            if <(🧑touch ground？) < [3]> then\n                if <(🧑touch slime?) = [Yes]> then\n                    set [player vy v] to [15]\n                else\n                    set [player vy v] to [12]\n                end\n            end\n            if <(🧑touch water?) = [Yes]> then\n                set [player vy v] to [8]\n            end\n        end\n    end\n    if <<<key (up arrow v) pressed?> or <<key (w v) pressed?> or <<mouse down?> and <(mouse y) > [0]>>>> and <(🧑touch ground？) < [5]>> then\n        change [player vy v] by (-1.3)\n    else\n        change [player vy v] by (-1.8)\n    end\n    if <(🧑touch water?) = [Yes]> then\n        set [brightness v] effect to (-8)\n    end\n    Change X [8.1]\n    Move in steps (([abs v] of (player vx) ) + ([abs v] of (player vy) ))\n    Set costume <<key (left arrow v) pressed?> or <<key (a v) pressed?> or <<mouse down?> and <(mouse x) < [0]>>>> <<key (right arrow v) pressed?> or <<key (d v) pressed?> or <<mouse down?> and <(mouse x) > [0]>>>> <<(🧑touch ground？) > [0]> and <(🧑touch water?) = [No]>>\nend\n\ndefine Change X (vmax)\nif <<(🧑touch water?) = [Yes]> or <<(🧑touch slime?) = [Yes]> and <(🧑touch ground？) < [3]>>> then\n    set [player μ v] to [0.6]\nelse\n    if <(🧑touch ice?) = [Yes]> then\n        set [player μ v] to [0.98]\n    else\n        set [player μ v] to [0.75]\n    end\nend\nset [player vx v] to ((player vx) * (player μ))\nif <(player vx) > ((vmax) * (player μ))> then\n    set [player vx v] to ((vmax) * (player μ))\nend\nif <(player vx) < ((vmax) * (() - (player μ)))> then\n    set [player vx v] to ((vmax) * (() - (player μ)))\nend\nif <(🧑touch ice?) = [Yes]> then\n    if <([abs v] of (player vx) ) < [0.1]> then\n        set [player vx v] to [0]\n    end\nelse\n    if <([abs v] of (player vx) ) < [1]> then\n        set [player vx v] to [0]\n    end\nend\n\ndefine SE\nset volume to (100) %\nif <(🧑touch water?) = [Yes]> then\n    start sound (pick random (18) to (21))\nelse\n    if <(🧑touch slime?) = [Yes]> then\n        start sound [Slime v]\n    else\n        if <(🧑touch ice?) = [Yes]> then\n            start sound (pick random (6) to (11))\n        else\n            start sound (pick random (2) to (5))\n        end\n    end\nend\n\nif <(#Biome) = [2]> then\n    start sound (pick random (6) to (11))\n    if <<<(#Level) = [18]> and <(Player X) > [-70]>> or <<(#Level) = [19]> or <<(#Level) = [20]> or <(#Level) = [21]>>>> then\n        start sound (pick random (12) to (15))\n    else\n        start sound (pick random (6) to (11))\n    end\nend\nif <(#Biome) = [3]> then\n    start sound (pick random (12) to (15))\nend\nif <(#Biome) = [4]> then\n    if <(#Level) = [29]> then\n        if <(Player X) > [170]> then\n            start sound (pick random (2) to (5))\n        else\n            start sound (pick random (22) to (25))\n        end\n    end\nend\n\ndefine Move in steps (steps)\nif <(🧑touch ground？) > [4]> then\n    set [🧑touch slime? v] to [No]\nend\nif <(🧑touch ground？) > [3]> then\n    set [🧑touch water? v] to [No]\nend\nchange [🧑touch ground？ v] by (1)\nrepeat (steps)\n    set [player - last pos v] to (x position)\n    change x by ((player vx) / (steps))\n    if <<touching (stage blocks v)?> or <<touching (slime v)?> or <touching (ice v)?>>> then\n        set [player vx v] to [0]\n        set x to (player - last pos)\n    end\n    set [player - last pos v] to (y position)\n    change y by ((player vy) / (steps))\n    if <touching (water v)?> then\n        set [🧑touch water? v] to [Yes]\n        set [🧑touch ground？ v] to [2]\n    end\n    if <touching (slime v)?> then\n        set [🧑touch slime? v] to [Yes]\n        set y to (player - last pos)\n        set [🧑touch ground？ v] to [0]\n        if <([abs v] of (player vy) ) < [2]> then\n            set [player vy v] to [0]\n        else\n            set [player vy v] to ((player vy) * (-0.5))\n        end\n    end\n    if <touching (ice v)?> then\n        set [🧑touch ice? v] to [Yes]\n        set y to (player - last pos)\n        if <(player vy) < [0]> then\n            set [🧑touch ground？ v] to [0]\n        end\n        set [player vy v] to [0]\n    end\n    if <touching (stage blocks v)?> then\n        set [🧑touch water? v] to [No]\n        set [🧑touch slime? v] to [No]\n        set [🧑touch ice? v] to [No]\n        set y to (player - last pos)\n        if <(player vy) < [0]> then\n            set [🧑touch ground？ v] to [0]\n        end\n        set [player vy v] to [0]\n    end\nend\n\nwhen I start as a clone\nshow\nset size to (400) %\nclear graphic effects\npoint in direction (90)\nset rotation style [all around v]\nset [player vy v] to [12]\nrepeat until <(direction) < [0]>\n    go to [front v] layer\n    switch costume to (hurt1 v)\n    change [ghost v] effect by (5)\n    change x by (-1)\n    turn left (5) degrees\n    change y by (player vy)\n    change [player vy v] by (-1.5)\nend\nhide\ndelete this clone\n\nwhen I receive [start v]\nforever\n    wait until <<key (left arrow v) pressed?> or <<key (a v) pressed?> or <<key (right arrow v) pressed?> or <<key (d v) pressed?> or <<key (up arrow v) pressed?> or <<key (w v) pressed?> or <mouse down?>>>>>>>\n    if <[] = [0]> then\n        set [#gamemode v] to (item (4) of [#gamemode v])\n    end\n    wait until <not <(#Gamemode) = (item (4) of [#gamemode v])>>\nend\n\nwhen I receive [menu - setup v]\nhide\n\nwhen [r v] key pressed\nif <(username) = [-Jikky-]> then\n    broadcast (Set - Player Spawn v)\nend\n\n@Menu\n\nwhen I receive [menu - setup v]\nhide\nset size to (100) %\ngo to [back v] layer\nswitch costume to (bg# v)\nset [clone id v] to (costume [name v])\ngo to x: (0) y: (0)\ncreate clone of (_myself_ v)\ngo to [front v] layer\nswitch costume to (title# v)\nset [clone id v] to (costume [name v])\ngo to x: (0) y: (0)\ncreate clone of (_myself_ v)\nswitch costume to (splash# v)\nset [clone id v] to (costume [name v])\ngo to x: (0) y: (0)\ncreate clone of (_myself_ v)\nset size to (10) %\nswitch costume to (play v)\nset [clone id v] to (costume [name v])\ngo to x: (0) y: (-20)\ncreate clone of (_myself_ v)\nswitch costume to (select world v)\nset [clone id v] to (costume [name v])\ngo to x: (0) y: (-90)\ncreate clone of (_myself_ v)\n\nwhen I start as a clone\nif <(#Gamemode) = [Menu]> then\n    show\n    set [menu - select v] to [Play]\n    repeat until <not <(#Gamemode) = [Menu]>>\n        if <<(clone id) = [Play]> or <(clone id) = [Select world]>> then\n            change size by (((90) - (size)) / (5))\n        else\n            change size by (((100) - (size)) / (5))\n        end\n        set [brightness v] effect to (0)\n        if <<key ((join [en] [ter]) v) pressed?> or <key (space v) pressed?>> then\n            start sound [Click v]\n            broadcast (Menu - Close v)\n        end\n        if <<touching (mouse-pointer v)?> and <<not <<key (w v) pressed?> or <key (up arrow v) pressed?>>> and <not <<key (s v) pressed?> or <key (down arrow v) pressed?>>>>> then\n            if <not < (clone id) contains [#]?>> then\n                set [menu - select v] to (clone id)\n                if <(Menu - Select) = [Select World]> then\n                else\n                    change size by (((110) - (size)) / (5))\n                    if <mouse down?> then\n                        start sound [Click v]\n                        broadcast (Menu - Close v)\n                    end\n                end\n            end\n        end\n        if <<key (w v) pressed?> or <key (up arrow v) pressed?>> then\n            set [menu - select v] to [Play]\n            if <(clone id) = (Menu - Select)> then\n                change size by (((110) - (size)) / (5))\n            end\n        end\n        if <(clone id) = (Menu - Select)> then\n            if <not <(Menu - Select) = [Select World]>> then\n                set [brightness v] effect to (12)\n            end\n        end\n        if <(clone id) = [Select World]> then\n            set [brightness v] effect to (-10)\n        end\n        if <(clone id) = [Splash#]> then\n            repeat (10)\n                change size by (0.5)\n            end\n            repeat (10)\n                change size by (-0.5)\n            end\n        end\n    end\nend\n\nwhen I receive [menu - close v]\nhide\nDelete Clone\nset size to (100) %\nif <(Menu - Select) = [Play]> then\n    set [#gamemode v] to [Set]\nend\nif <(#Gamemode) = [Set]> then\n    show\n    switch costume to (_soil bg# v)\n    go to x: (0) y: (0)\n    go to [front v] layer\n    wait (1) seconds\n    hide\nend\nif <(#Gamemode) = [Menu - SelectWorld]> then\n    switch costume to (_bg# v)\n    set [clone id v] to (costume [name v])\n    go to x: (0) y: (0)\n    create clone of (_myself_ v)\n    go to [front v] layer\n    switch costume to (_select world# v)\n    set [clone id v] to (costume [name v])\n    go to x: (0) y: (100)\n    create clone of (_myself_ v)\n    set size to (50) %\n    switch costume to (_plains v)\n    set [clone id v] to (costume [name v])\n    go to x: (-150) y: (-50)\n    create clone of (_myself_ v)\n    switch costume to (_desert v)\n    set [clone id v] to (costume [name v])\n    go to x: (-50) y: (-50)\n    create clone of (_myself_ v)\n    switch costume to (play v)\n    set [clone id v] to (costume [name v])\n    go to x: (0) y: (-130)\n    create clone of (_myself_ v)\nend\n\nwhen I start as a clone\nif <(#Gamemode) = [Menu - SelectWorld]> then\n    show\n    set [menu - select v] to []\n    set [menu - selectworld v] to []\n    repeat until <not <(#Gamemode) = [Menu - SelectWorld]>>\n        if <touching (mouse-pointer v)?> then\n            if <not < (clone id) contains [#]?>> then\n                set [menu - select v] to (clone id)\n                change size by (((90) - (size)) / (5))\n                if <mouse down?> then\n                    if <(clone id) = [Play]> then\n                        if <not <(Menu - SelectWorld) = []>> then\n                            broadcast (Menu - Close v)\n                        end\n                    else\n                        set [menu - selectworld v] to (Menu - Select)\n                    end\n                end\n            end\n        end\n        if <(clone id) = (Menu - SelectWorld)> then\n            set [brightness v] effect to (20)\n        else\n            if <not < (clone id) contains [#]?>> then\n                set [brightness v] effect to (0)\n                change size by (((80) - (size)) / (5))\n            end\n            if <(clone id) = (Menu - Select)> then\n                set [brightness v] effect to (12)\n            end\n        end\n    end\nend\n\ndefine Delete Clone\ndelete this clone\n\n@Clouds\n\nwhen I receive [menu - setup v]\nhide\nset [cloud_num v] to [0]\nset [cloud x v] to [-100]\ncreate clone of (_myself_ v)\nchange [cloud_num v] by (1)\nset [cloud x v] to [100]\ncreate clone of (_myself_ v)\nchange [cloud_num v] by (1)\nforever\n    if <(Cloud_Num) < [10]> then\n        if <(pick random (1) to (5)) = [1]> then\n            set [cloud x v] to [300]\n            change [cloud_num v] by (1)\n            create clone of (_myself_ v)\n        end\n        wait (3) seconds\n    end\nend\n\nwhen I start as a clone\ngo to [back v] layer\ngo [forward v] (1) layers\nset [cloud y v] to (pick random (100) to (170))\nset [ghost v] effect to (20)\nif <(#Biome) = [2]> then\n    go [forward v] (5) layers\n    set [cloud y v] to (pick random (-80) to (0))\n    set [ghost v] effect to (50)\nend\nswitch costume to ((1) + (pick random (1) to (10)))\nset y to (cloud y)\nrepeat until <(cloud x) < [-400]>\n    show\n    set x to (cloud x)\n    change [cloud x v] by (-0.4)\n    if <(#Biome) = [3]> then\n        repeat (20)\n            change [ghost v] effect by (5)\n        end\n        change [cloud_num v] by (-1)\n        delete this clone\n    end\n    if <(#Biome) = [4]> then\n        set [ghost v] effect to (20)\n    end\nend\nchange [cloud_num v] by (-1)\ndelete this clone\n\n@Music\n\nwhen I receive [menu - close v]\nwait (2) seconds\nforever\n    if <(pick random (1) to (2)) = [1]> then\n        play sound [Minecraft \(cavequest remix\) v] until done\n    else\n        play sound [Moog City \(Felix Zophar Remix\) v] until done\n    end\nend\n\n@THANK YOU\n\nwhen flag clicked\nhide\n\nwhen I receive [set - generate level v]\nif <(#Level) = [11]> then\n    show\nend\n\n@サムネイル\n\nwhen flag clicked\nhide\n\n
DEMO版。初めてちゃんと共有する作品です。\n参照数が多かったら続きつくるかもです。\n\n\nこの作品の専用スタジオはこちらから\nhttps://scratch.mit.edu/studios/31574266\n