ダダサバイバー　platformer

Instructions: ◆今回はプラットフォーマーを作ってみました！◆\n楽しんでいただけると嬉しいです！\n最後まで読んでね～\n----------------------------------------------------------\n◤\nーーーーーーー操作方法/Operation Methodーーーーー\n移動　矢印キーまたはタップ\nクナイを投げる　Aキー\n変身　スペースキー\n-----------------------------\nちょっと1話\n敵はクナイを当てると倒せます！

@Stage\n\n@影くん\n\nwhen flag clicked\nshow\nset [ghost v] effect to (60)\npoint in direction (38)\ngo [backward v] (3) layers\nforever\n    go to (player v)\nend\n\n@Stage\n\nwhen flag clicked\nset [stage v] to [1]\nswitch costume to (コスチューム1 v)\ngo to x: (0) y: (0)\nset size to (100) %\nshow\nforever\n    set [ghost v] effect to (0)\n    switch costume to (STAGE)\nend\n\nwhen flag clicked\ngo to [front v] layer\ngo [backward v] (1) layers\nset size to (100) %\n\n@とげ・まぐま\n\nwhen flag clicked\nset size to (100) %\ngo to x: (0) y: (0)\nshow\ngo [backward v] (1) layers\nforever\n    switch costume to (STAGE)\nend\n\n@Player\n\ndefine start position\nset size to (70) %\ngo to x: (-204) y: (-55)\nset rotation style [left-right v]\nset [x v] to [0]\nset [y v] to [0]\ngo to [back v] layer\ngo [forward v] (3) layers\nshow\n\nwhen flag clicked\nset [stage v] to [1]\nstart position\nforever\n    if <<key (right arrow v) pressed?> or <<mouse down?> and <(mouse x) > (x position)>>> then\n        change [x v] by (1)\n        point in direction (90)\n        create clone of (_myself_ v)\n    end\n    if <<key (left arrow v) pressed?> or <<mouse down?> and <(mouse x) < (x position)>>> then\n        change [x v] by (-1)\n        point in direction (-90)\n        create clone of (_myself_ v)\n    end\n    set [x v] to ((x) * (0.9))\n    change x by (x)\n    if <touching (stage v)?> then\n        change y by (1)\n        if <touching (stage v)?> then\n            change y by (1)\n            if <touching (stage v)?> then\n                change y by (1)\n                if <touching (stage v)?> then\n                    change y by (1)\n                    if <touching (stage v)?> then\n                        change y by (1)\n                        if <touching (stage v)?> then\n                            change x by ((x) * (-1))\n                            change y by (-5)\n                            if <<key (up arrow v) pressed?> or <<mouse down?> and <(mouse y) > (y position)>>> then\n                                start sound [じゃんぷ v]\n                                if <(x) > [0]> then\n                                    set [x v] to [-7]\n                                else\n                                    set [x v] to [7]\n                                end\n                                set [y v] to [15]\n                            else\n                                set [x v] to [0]\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 (stage v)?> then\n        change y by ((y) * (-1))\n        set [y v] to [0]\n    end\n    change y by (-1)\n    if <<touching (stage v)?> and <<key (up arrow v) pressed?> or <<mouse down?> and <(mouse y) > (y position)>>>> then\n        start sound [じゃんぷ v]\n        change [y v] by (16)\n    end\n    change y by (1)\n    if <not <(STAGE) = [20]>> then\n        if <(x position) > [200]> then\n            change [stage v] by (1)\n            wait (0.05) seconds\n            start position\n        end\n    end\n    if <<touching (とげ・まぐま v)?> or <(y position) < [-160]>> then\n        start sound [死 v]\n        wait (0.05) seconds\n        start position\n    end\nend\n\nwhen I start as a clone\nswitch costume to (２ v)\nrepeat (7)\n    change size by (-5)\n    change [ghost v] effect by (8)\nend\ndelete this clone\n\nwhen flag clicked\nforever\n    if <(STAGE) = [17]> then\n        show variable [time v]\n        show variable [☁ ワールドレコード v]\n    else\n        hide variable [time v]\n        hide variable [☁ ワールドレコード v]\n    end\nend\n\nwhen flag clicked\nreset timer\nset [time v] to [0]\nshow variable [time v]\nshow variable [☁ ワールドレコード v]\nforever\n    if <not <(STAGE) = [17]>> then\n        wait (1) seconds\n        change [time v] by (1)\n    else\n        if <(☁ ワールドレコード) > (time)> then\n            set [☁ ワールドレコード v] to (time)\n        end\n    end\nend\n\nwhen flag clicked\nhide variable [☁ ワールドレコード v]\nhide variable [time v]\n\nwhen [space v] key pressed\nコスチューム変更\n\ndefine コスチューム変更\nif <(costume [number v]) = [1]> then\n    switch costume to (プレイヤー2 v)\nelse\n    switch costume to (普通 \(1\) v)\nend\n\nwhen flag clicked\nswitch costume to (普通 \(1\) v)\nplay sound [Unlimited v] until done\n\n@クナイ\n\nwhen I start as a clone\nshow\nrepeat until <touching (_edge_ v)?>\n    move (15) steps\nend\nmove (10) steps\nwait (0.2) seconds\nshow\nrepeat until <<<touching (_edge_ v)?> or <touching (敵 v)?>> or <touching (ボス v)?>>\n    move (10) steps\nend\nmove (10) steps\nwait (0.2) seconds\ndelete this clone\n\ndelete this clone\n\nwhen flag clicked\n\nwhen [a v] key pressed\ngo to (player v)\nswitch costume to (クナイ v)\nwait (0.5) seconds\npoint towards (mouse-pointer v)\ncreate clone of (_myself_ v)\n\n@ふわふわ\n\nwhen flag clicked\ngo to [back v] layer\ngo [forward v] (2) layers\nhide\nforever\n    switch costume to (pick random (1) to (2))\n    create clone of (_myself_ v)\n    wait (pick random (0.5) to (2)) seconds\nend\n\nwhen I start as a clone\nset [ghost v] effect to (pick random (75) to (85))\ngo to x: (pick random (300) to (-300)) y: (180)\nshow\nrepeat (265)\n    change y by (-2)\nend\ndelete this clone\n\n@スプライト1\n\nwhen flag clicked\nhide\ngo to x: (0) y: (0)\nforever\n    if <<(STAGE) = [19]> or <<(STAGE) = [18]> or <<(STAGE) = [17]> or <(STAGE) = [20]>>>> then\n        wait (1) seconds\n        create clone of (_myself_ v)\n    else\n        hide\n    end\nend\n\nwhen I start as a clone\nwait (1) seconds\nset rotation style [left-right v]\nset [ghost v] effect to (100)\nshow\nif <(STAGE) = [17]> then\n    go to (random position v)\n    repeat (50)\n        change [ghost v] effect by (-2)\n    end\n    repeat until <touching (stage v)?>\n        change y by (-1)\n    end\n    forever\n        change [えっくす v] by (pick random (-10) to (10))\n        point towards (player v)\n        wait (0.1) seconds\n        change [えっくす v] by (pick random (-10) to (10))\n        point towards (player v)\n        wait (0.1) seconds\n        set [えっくす v] to (pick random (-10) to (10))\n        change x by (えっくす)\n    end\nelse\n    if <(STAGE) = [18]> then\n        go to (random position v)\n        repeat (50)\n            change [ghost v] effect by (-2)\n        end\n        repeat until <touching (stage v)?>\n            change y by (-1)\n        end\n        forever\n            change [えっくす v] by (pick random (-10) to (10))\n            point towards (player v)\n            wait (0.1) seconds\n            change [えっくす v] by (pick random (-10) to (10))\n            point towards (player v)\n            wait (0.1) seconds\n            set [えっくす v] to (pick random (-10) to (10))\n            change x by (えっくす)\n        end\n    else\n        if <(STAGE) = [19]> then\n            go to (random position v)\n            repeat (50)\n                change [ghost v] effect by (-2)\n            end\n            repeat until <touching (stage v)?>\n                change y by (-1)\n            end\n            forever\n                change [えっくす v] by (pick random (-10) to (10))\n                point towards (player v)\n                wait (0.1) seconds\n                change [えっくす v] by (pick random (-10) to (10))\n                point towards (player v)\n                wait (0.1) seconds\n                set [えっくす v] to (pick random (-10) to (10))\n                change x by (えっくす)\n            end\n        else\n            if <(STAGE) = [20]> then\n                go to (random position v)\n                repeat (50)\n                    change [ghost v] effect by (-2)\n                end\n                repeat until <touching (stage v)?>\n                    change y by (-1)\n                end\n                forever\n                    change [えっくす v] by (pick random (-10) to (10))\n                    point towards (player v)\n                    wait (0.1) seconds\n                    change [えっくす v] by (pick random (-10) to (10))\n                    point towards (player v)\n                    wait (0.1) seconds\n                    set [えっくす v] to (pick random (-10) to (10))\n                    change x by (えっくす)\n                end\n            end\n        end\n    end\nend\n\nwhen flag clicked\n\ncreate clone of (_myself_ v)\n\nset [stage v] to [17]\n\nwhen flag clicked\n\nwhen I start as a clone\nforever\n    if <touching (スプライト2 v)?> then\n        delete this clone\n    end\nend\n\nwhen I start as a clone\nforever\n    if <touching (クナイ v)?> then\n        repeat (50)\n            change [ghost v] effect by (2)\n        end\n        delete this clone\n    end\nend\n\nwhen I start as a clone\nforever\n    switch costume to (コスチューム2 v)\n    wait (0.1) seconds\n    switch costume to (コスチューム3 v)\n    wait (0.1) seconds\n    switch costume to (コスチューム4 v)\n    wait (0.1) seconds\n    switch costume to (コスチューム5 v)\n    wait (0.1) seconds\nend\n\n@スプライト2\n\nwhen flag clicked\nset [ghost v] effect to (100)\nshow\n\n@スプライト3\n\nwhen flag clicked\nhide\n\n