Platformer

Instructions: Arrow key operation\nalso proceed by tapping the direction you want to proceed.\n\n矢印キーまたは進みたい方向をタップして操作します。\n赤い棘や溶岩に落ちると死んでしまいます。

@Stage\n\nwhen flag clicked\nforever\n    play sound [Minecraft v] until done\nend\n\nwhen flag clicked\nswitch backdrop to (背景1 v)\n\nwhen I receive [洞窟はいつ v]\nswitch backdrop to (背景2 v)\n\nwhen I receive [出た v]\nswitch backdrop to (マイクラ夜 v)\n\nwhen flag clicked\nforever\n\n@すてぃいいいいいぶ\n\ndefine 初期化\nswitch costume to (コスチューム2 v)\nset [yy v] to [0]\nset [xx v] to [0]\ngo to x: (-200) y: (-59)\n\nwhen flag clicked\nset rotation style [left-right v]\nshow\nset [xx v] to [0]\nset [yy v] to [0]\n初期化\nforever\n    change [yy v] by (-1)\n    if <<key (right arrow v) pressed?> or <<mouse down?> and <(mouse x) > [0]>>> then\n        point in direction (90)\n        change [xx v] by (1)\n    end\n    if <<key (left arrow v) pressed?> or <<mouse down?> and <[0] > (mouse x)>>> then\n        point in direction (-75)\n        change [xx v] by (-1)\n    end\n    set [xx v] to ((xx) * (0.9))\n    change x by (xx)\n    if <touching (場所 v)?> then\n        change y by (6)\n    end\n    if <touching (場所 v)?> then\n        change y by (-6)\n        change x by (() - (xx))\n        if <<key (up arrow v) pressed?> or <<mouse down?> and <(mouse y) > [0]>>> then\n            set [yy v] to [15]\n            if <(xx) > [0]> then\n                set [xx v] to [-10]\n            else\n                set [xx v] to [10]\n            end\n        else\n            set [xx v] to [0]\n        end\n    end\n    change y by (yy)\n    if <touching (場所 v)?> then\n        change y by ((-1) * (yy))\n        set [yy v] to [0]\n        if <<key (up arrow v) pressed?> or <<mouse down?> and <(mouse y) > [0]>>> then\n            set [yy v] to [15]\n        end\n    end\n    if <touching (tpge v)?> then\n        broadcast (攻撃された v)\n        start sound [ダメージ v]\n        switch costume to (コスチューム3 v)\n        wait (0.1) seconds\n        初期化\n    end\n    if <(x position) > [230]> then\n        if <not <(ステージ) = [11]>> then\n            change [ステージ v] by (1)\n            初期化\n        end\n    end\nend\n\nwhen I receive [終わり v]\nhide\n\nwhen I receive [終わり v]\nstop [all v]\n\ngo to (random position v)\n\n@場所\n\nwhen flag clicked\nset [ステージ v] to [1]\nforever\n    switch costume to (ステージ)\nend\n\nwhen flag clicked\nforever\n    if <(ステージ) = [6]> then\n        broadcast (洞窟はいつ v)\n    end\nend\n\nwhen flag clicked\nforever\n    if <(ステージ) = [9]> then\n        broadcast (出た v)\n    end\nend\n\nset [ステージ v] to [9]\n\n@tpge\n\nwhen flag clicked\nset [ステージ v] to [1]\nforever\n    switch costume to (ステージ)\nend\n\n@サムネ\n\nwhen flag clicked\ngo to [front v] layer\nset [ghost v] effect to (100)\n\nwhen [timer v] > (0)\nset [pixelate v] effect to (300)\nrepeat (30)\n    change [pixelate v] effect by (-10)\nend\n\nwhen flag clicked\nforever\n    reset timer\nend\n\n@素材1\n\n@洞窟\n\nwhen flag clicked\nhide\n\n@砂漠\n\nwhen flag clicked\nhide\n\n@剣\n\nwhen flag clicked\nhide\ngo to x: (0) y: (0)\nclear graphic effects\nset size to (800) %\nset rotation style [all around v]\npoint in direction (180)\nhide\n\nwhen flag clicked\nforever\n    if <(costume [number v]) = [2]> then\n        if <<key (space v) pressed?> or <key (1 v) pressed?>> then\n            repeat (3)\n                turn right (-15) degrees\n            end\n            broadcast (攻撃 v)\n            repeat (3)\n                turn right (15) degrees\n            end\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <(costume [number v]) = [1]> then\n        if <<key (space v) pressed?> or <key (1 v) pressed?>> then\n            repeat (3)\n                turn right (15) degrees\n            end\n            broadcast (攻撃 v)\n            repeat (3)\n                turn right (-15) degrees\n            end\n        end\n    end\nend\n\nwhen I receive [攻撃準備 v]\nif <(costume [number v]) = [1]> then\n    repeat (3)\n        turn right (15) degrees\n    end\n    broadcast (攻撃 v)\n    repeat (3)\n        turn right (-15) degrees\n    end\n    point in direction (180)\nend\n\nwhen I receive [攻撃準備 v]\nif <(costume [number v]) = [2]> then\n    repeat (3)\n        turn right (-15) degrees\n    end\n    broadcast (攻撃 v)\n    repeat (3)\n        turn right (15) degrees\n    end\n    point in direction (180)\nend\n\nwhen flag clicked\nforever\n    repeat (10)\n        change [color v] effect by (0.5)\n    end\n    wait (0.1) seconds\n    repeat (10)\n        change [color v] effect by (-0.5)\n    end\nend\n\nwhen flag clicked\nset [ステージ v] to [1]\nforever\n    if <[6] < (ステージ)> then\n        show\n        if <touching (すてぃいいいいいぶ v)?> then\n            broadcast (おく v)\n            switch costume to (ダイヤモンドの剣 v)\n            forever\n                go to (すてぃいいいいいぶ v)\n                if <<<key (a v) pressed?> or <key (left arrow v) pressed?>> or <<(mouse x) < (x position)> and <mouse down?>>> then\n                    switch costume to (ダイヤモンドの剣2 v)\n                end\n                if <<<key (d v) pressed?> or <key (right arrow v) pressed?>> or <<(x position) < (mouse x)> and <mouse down?>>> then\n                    switch costume to (ダイヤモンドの剣 v)\n                end\n            end\n        end\n    end\nend\n\n@a\n\nwhen I receive [攻撃 v]\nif <touching (剣 v)?> then\n    start sound [ダメージ v]\n    repeat (5)\n        change x by (10)\n    end\n    change [ゾンビhp v] by (-1)\n    wait () seconds\n    if <(ゾンビHP) = [0]> then\n        delete this clone\n    end\nend\n\nwhen flag clicked\nhide\ngo to x: (245) y: (-66)\nswitch costume to (コスチューム1 v)\nset size to (1000) %\nforever\n    if <(ステージ) = [8]> then\n        create clone of (_myself_ v)\n        wait until <(ステージ) = [9]>\n    end\nend\n\nwhen I receive [メッセージ1 v]\nstop [all v]\n\nwhen I start as a clone\nforever\n    if <touching (すてぃいいいいいぶ v)?> then\n        broadcast (攻撃された v)\n        wait (1) seconds\n    end\nend\n\nwhen I start as a clone\nset [ゾンビhp v] to [10]\nshow\nset rotation style [left-right v]\nforever\n    point towards (すてぃいいいいいぶ v)\n    wait (0.01) seconds\n    move (5) steps\n    if <touching (_edge_ v)?> then\n        point towards (すてぃいいいいいぶ v)\n        wait (0.01) seconds\n        move (5) steps\n    end\n    if <touching (場所 v)?> then\n        change y by (1)\n        if <touching (場所 v)?> then\n            change y by (1)\n            if <touching (場所 v)?> then\n                change y by (1)\n                if <touching (場所 v)?> then\n                    change y by (1)\n                    if <touching (場所 v)?> then\n                        change y by (1)\n                        if <touching (場所 v)?> then\n                            change y by (1)\n                            if <touching (場所 v)?> then\n                                change x by ((0) - (X2))\n                                change y by (-5)\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\n    change [y v] by (-1)\n    change y by (y)\n    if <touching (場所 v)?> then\n        change y by ((0) - (Y))\n        set [y v] to [0]\n    end\n    change y by (-2)\nend\n\nwhen I start as a clone\nif <(y position) = (pick random (-185) to (-103))> then\n    go to x: (245) y: (-66)\nend\n\nwhen I start as a clone\nif <(y position) = (pick random (-185) to (-103))> then\n    go to x: (245) y: (-66)\nend\n\nwait (pick random (5) to (15)) seconds\n\n@ゾンビ\n\n@スプライト6\n\nwhen flag clicked\nshow\ngo to x: (-1) y: (160)\nset size to (150) %\nset [hp v] to [20]\nswitch costume to (health20 v)\n\nwhen I receive [攻撃された v]\nstart sound [ダメージ v]\nchange [hp v] by (-1)\nif <(HP) = [0]> then\n    broadcast (終わり v)\nend\nnext costume\n\nwhen I receive [終わり v]\nstop [all v]\n\nwhen I receive [ゲーム終了です v]\nhide\n\nwhen flag clicked\nforever\n    if <touching (すてぃいいいいいぶ v)?> then\n        set [ghost v] effect to (80)\n    else\n        set [ghost v] effect to (0)\n    end\nend\n\nwhen I receive [次元は違う v]\nhide\n\nwhen flag clicked\nshow\n\n@インベントリ\n\nwhen flag clicked\nshow\nswitch costume to (インベントリ v)\n\nwhen I receive [おく v]\nswitch costume to (インベントリ2 v)\n\nwhen flag clicked\nforever\n    if <touching (すてぃいいいいいぶ v)?> then\n        set [ghost v] effect to (80)\n    else\n        set [ghost v] effect to (0)\n    end\nend\n\nwhen I receive [次元は違う v]\nhide\n\n@選ぶ\n\n@a2\n\nwhen I receive [攻撃 v]\nif <touching (剣 v)?> then\n    start sound [ダメージ v]\n    repeat (5)\n        change x by (10)\n    end\n    change [ゾンビhp v] by (-1)\n    wait () seconds\n    if <(ゾンビHP) = [0]> then\n        delete this clone\n    end\nend\n\nwhen flag clicked\nhide\ngo to x: (245) y: (-66)\nswitch costume to (コスチューム1 v)\nset size to (1000) %\nforever\n    if <(ステージ) = [10]> then\n        create clone of (_myself_ v)\n        wait until <(ステージ) = [11]>\n    end\nend\n\nwhen I receive [メッセージ1 v]\nstop [all v]\n\nwhen I start as a clone\nforever\n    if <touching (すてぃいいいいいぶ v)?> then\n        broadcast (攻撃された v)\n        wait (1) seconds\n    end\nend\n\nwhen I start as a clone\nset [ゾンビhp v] to [10]\nshow\nset rotation style [left-right v]\nforever\n    point towards (すてぃいいいいいぶ v)\n    wait (0.001) seconds\n    move (3) steps\n    if <touching (_edge_ v)?> then\n        point towards (すてぃいいいいいぶ v)\n        wait (0.001) seconds\n        move (3) steps\n    end\n    if <touching (場所 v)?> then\n        change y by (1)\n        if <touching (場所 v)?> then\n            change y by (1)\n            if <touching (場所 v)?> then\n                change y by (1)\n                if <touching (場所 v)?> then\n                    change y by (1)\n                    if <touching (場所 v)?> then\n                        change y by (1)\n                        if <touching (場所 v)?> then\n                            change y by (1)\n                            if <touching (場所 v)?> then\n                                change x by ((0) - (X2))\n                                change y by (-5)\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\n    change [y v] by (-1)\n    change y by (y)\n    if <touching (場所 v)?> then\n        change y by ((0) - (Y))\n        set [y v] to [0]\n    end\n    change y by (-2)\nend\n\nwhen I start as a clone\nif <(y position) = (pick random (-185) to (-103))> then\n    go to x: (245) y: (-66)\nend\n\nwhen I start as a clone\nif <(y position) = (pick random (-185) to (-103))> then\n    go to x: (245) y: (-66)\nend\n\n@ハスク\n\n@背景\n\nwhen flag clicked\nhide\ngo to [back v] layer\ngo [forward v] (1) layers\nset size to (200) %\nset [brightness v] effect to (-18)\ngo to x: (50) y: (-17)\nforever\n    if <(ステージ) = [11]> then\n        go to [back v] layer\n        broadcast (次元は違う v)\n        switch costume to (ステージ5 v)\n        set [brightness v] effect to (-18)\n        show\n    end\nend\n\nswitch costume to (ステージ8 v)\nset [brightness v] effect to (0)\nshow\n\nset [ステージ v] to [9]\n\n