[#52] 2.75Dプラットフォーマー / 2.75D platformer

Instructions: 2.75Dプラットフォーマー / 2.75D platformer\n\n日本語は下です。\n\n[English]\nIt is a platformer that advances not only left to right and up and down, but also in depth.\n\nControls\n←→Use the left and right arrow keys to move left and right.\nUse ↑↓ keys to move backward or forward.\nSpacebar to jump.\n\n\n[日本語]\n左右上下だけでなく、奥にも進めるプラットフォーマーです。\n\n操作方法\n←→キーで左右に移動する。\n↑↓キーで奥や手前に移動する。\nスペースキーでジャンプする。

@Stage\n\nwhen flag clicked\nswitch backdrop to (背景1 v)\nforever\n    erase all\n    broadcast (3 v)\n    if <(z) = [3]> then\n        broadcast (キャラ v)\n    end\n    broadcast (2 v)\n    if <(z) = [2]> then\n        broadcast (キャラ v)\n    end\n    broadcast (1 v)\n    if <(z) = [1]> then\n        broadcast (キャラ v)\n    end\nend\n\nwhen flag clicked\nbroadcast (タイトル画面 v)\n\nwhen I receive [クリア v]\nif <(タイム) < (☁ 世界記録2)> then\n    set [☁ 世界記録2 v] to (タイム)\nend\nwait (0.2) seconds\nbroadcast (結果 v)\n\nwhen I receive [スタート v]\nreset timer\nchange [プレイ回数 v] by (1)\n\nwhen flag clicked\nset [プレイ回数 v] to [0]\n\nwhen flag clicked\nforever\n    play sound [MusMus-BGM-040 v] until done\nend\n\n@キャラ\n\nwhen flag clicked\nforever\n\nif <(x) < [0]> then\n\nwhen flag clicked\n\ndefine z座標を (数字) ずつ変える\nchange y by ((数字) * (10))\nchange size by ((数字) * (-5))\nchange y by (11)\nif <not <touching (((z) + (数字)) v)?>> then\n    change y by ((数字) * (-10))\n    change size by ((数字) * (5))\n    change y by (-11)\n    change [z v] by (数字)\n    repeat (5)\n        change y by ((数字) * (2))\n        change size by ((数字) * (-1))\n    end\nelse\n    change y by ((数字) * (-10))\n    change size by ((数字) * (5))\n    change y by (-11)\nend\n\nrepeat (10)\n\ngo [backward v] (数字) layers\n\nwhen I receive [キャラ v]\nset [ghost v] effect to (0)\nstamp\nset [ghost v] effect to (100)\n\nz座標を [1] ずつ変える\n\nchange [z v] by ((数字) * (-1))\nchange y by ((数字) * (-10))\nchange size by ((数字) * (5))\nchange y by (-3)\n\nchange [z v] by ((数字) * (-1))\n\nchange size by ((数字) * (5))\nchange y by (-10)\nchange y by (-6)\n\nz座標を [1] ずつ変える\n\nwait until <not <key (up arrow v) pressed?>>\n\nwhen flag clicked\nforever\n    set [ghost v] effect to (100)\nend\n\nwait until <not <key (up arrow v) pressed?>>\nwait until <not <key (down arrow v) pressed?>>\n\ndefine 初期化する\nset size to (100) %\ngo to x: (-200) y: (50)\nset [x v] to [0]\nset [y v] to [0]\nset [z v] to [1]\nshow\n\nwhen I receive [スタート v]\nforever\n    if <key (right arrow v) pressed?> then\n        change [x v] by (2)\n    end\n    if <key (left arrow v) pressed?> then\n        change [x v] by (-2)\n    end\n    set [x v] to ((x) * (0.8))\n    change x by (x)\nend\n\nwhen I receive [スタート v]\n初期化する\nforever\n    if <key (up arrow v) pressed?> then\n        if <(z) < [3]> then\n            start sound [High Whoosh v]\n            z座標を [1] ずつ変える\n            wait (0.1) seconds\n        end\n    end\n    if <key (down arrow v) pressed?> then\n        if <[1] < (z)> then\n            start sound [Low Whoosh v]\n            z座標を [-1] ずつ変える\n            wait (0.1) seconds\n        end\n    end\n    if <touching ((z) v)?> then\n        change y by (1)\n        if <touching ((z) v)?> then\n            change y by (1)\n            if <touching ((z) v)?> then\n                change y by (1)\n                if <touching ((z) v)?> then\n                    change y by (1)\n                    if <touching ((z) v)?> then\n                        change y by (1)\n                        if <touching ((z) v)?> then\n                            change y by (1)\n                            if <touching ((z) v)?> then\n                                change y by (1)\n                                if <touching ((z) v)?> then\n                                    change y by (1)\n                                    change x by ((x) * (-1))\n                                    change y by (-8)\n                                    if <key (space v) pressed?> then\n                                        if <[0] < (x)> then\n                                            set [x v] to [-10.5]\n                                        else\n                                            set [x v] to [10.5]\n                                        end\n                                        set [y v] to [13]\n                                        start sound [Jump2 v]\n                                    else\n                                        set [x v] to [0]\n                                    end\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\n    if <<touching ((join [障害物] (z)) v)?> or <(y position) < [-179]>> then\n        start sound [Crunch v]\n        初期化する\n    end\nend\n\nwhen I receive [スタート v]\nforever\n    change [y v] by (-1)\n    change y by (y)\n    if <touching ((z) v)?> then\n        change y by ((y) * (-1))\n        set [y v] to [0]\n    end\n    change y by (-3)\n    if <<touching ((z) v)?> and <key (space v) pressed?>> then\n        set [y v] to [15]\n        start sound [Jump v]\n    end\n    change y by (3)\nend\n\nwhen I receive [スタート v]\nset [ステージ v] to [1]\ngo to x: (-200) y: (-23)\n\nwhen flag clicked\nset [ステージ v] to [1]\ngo to x: (-200) y: (-23)\n\nwhen I receive [スタート v]\nwait (0.1) seconds\nforever\n    if <<touching (ゴール v)?> and <(z) = [1]>> then\n        broadcast (クリア v)\n        stop [other scripts in sprite v]\n        play sound [Win v] until done\n        stop [this script v]\n    end\nend\n\nwhen I receive [スタート v]\nforever\n    if <[230] < (x position)> then\n        start sound [Connect v]\n        初期化する\n        change [ステージ v] by (1)\n    end\nend\n\n@1\n\ndefine 描画\ngo to x: (0) y: (10)\nset size to (95) %\nset [brightness v] effect to (-10)\nset [ghost v] effect to (0)\nrepeat (10)\n    stamp\n    change [brightness v] effect by (1)\n    change y by (-1)\n    change size by (0.5)\nend\ngo to x: (0) y: (0)\nset size to (100) %\nset [brightness v] effect to (0)\nset [ghost v] effect to (100)\n\nerase all\n\nwhen I receive [1 v]\n描画\n\nwhen flag clicked\nset [ghost v] effect to (100)\n\nstamp\n\nwhen flag clicked\nforever\n    switch costume to (ステージ)\nend\n\n@2\n\ndefine 描画\ngo to x: (0) y: (20)\nset size to (90) %\nset [brightness v] effect to (-20)\nset [ghost v] effect to (0)\nrepeat (10)\n    stamp\n    change [brightness v] effect by (1)\n    change y by (-1)\n    change size by (0.5)\nend\ngo to x: (0) y: (10)\nset size to (95) %\nset [brightness v] effect to (-10)\nset [ghost v] effect to (100)\n\nwait (0.1) seconds\n\nwhen I receive [2 v]\n描画\n\nwhen flag clicked\nset [ghost v] effect to (100)\n\nwhen flag clicked\nforever\n    switch costume to (ステージ)\nend\n\n@3\n\ndefine 描画\ngo to x: (0) y: (30)\nset size to (85) %\nset [brightness v] effect to (-30)\nset [ghost v] effect to (0)\nrepeat (10)\n    stamp\n    change [brightness v] effect by (1)\n    change y by (-1)\n    change size by (0.5)\nend\ngo to x: (0) y: (20)\nset size to (90) %\nset [brightness v] effect to (-20)\nset [ghost v] effect to (100)\n\nwait (0.1) seconds\n\nwhen I receive [3 v]\n描画\n\nwhen flag clicked\nset [ghost v] effect to (100)\n\nwhen flag clicked\nforever\n    switch costume to (ステージ)\nend\n\n@障害物1\n\ndefine 描画\ngo to x: (0) y: (10)\nset size to (95) %\nset [brightness v] effect to (-10)\nset [ghost v] effect to (0)\nrepeat (10)\n    stamp\n    change [brightness v] effect by (1)\n    change y by (-1)\n    change size by (0.5)\nend\ngo to x: (0) y: (0)\nset size to (100) %\nset [brightness v] effect to (0)\nset [ghost v] effect to (100)\n\nerase all\n\nwhen I receive [1 v]\n描画\n\nwhen flag clicked\nset [ghost v] effect to (100)\n\nstamp\n\nwhen flag clicked\nforever\n    switch costume to (ステージ)\nend\n\n@障害物2\n\ndefine 描画\ngo to x: (0) y: (20)\nset size to (90) %\nset [brightness v] effect to (-20)\nset [ghost v] effect to (0)\nrepeat (10)\n    stamp\n    change [brightness v] effect by (1)\n    change y by (-1)\n    change size by (0.5)\nend\ngo to x: (0) y: (10)\nset size to (95) %\nset [brightness v] effect to (-10)\nset [ghost v] effect to (100)\n\nwait (0.1) seconds\n\nwhen I receive [2 v]\n描画\n\nwhen flag clicked\nset [ghost v] effect to (100)\n\nwhen flag clicked\nforever\n    switch costume to (ステージ)\nend\n\n@障害物3\n\ndefine 描画\ngo to x: (0) y: (30)\nset size to (85) %\nset [brightness v] effect to (-30)\nset [ghost v] effect to (0)\nrepeat (10)\n    stamp\n    change [brightness v] effect by (1)\n    change y by (-1)\n    change size by (0.5)\nend\ngo to x: (0) y: (20)\nset size to (90) %\nset [brightness v] effect to (-20)\nset [ghost v] effect to (100)\n\nwait (0.1) seconds\n\nwhen I receive [3 v]\n描画\n\nwhen flag clicked\nset [ghost v] effect to (100)\n\nwhen flag clicked\nforever\n    switch costume to (ステージ)\nend\n\n@ゴール\n\nwhen flag clicked\ngo to x: (0) y: (0)\nforever\n    if <(ステージ) = [16]> then\n        show\n    else\n        hide\n    end\nend\n\n@スタート\n\nwhen I receive [タイトル画面 v]\ngo to x: (-50) y: (-85)\nshow\nforever\n    if <not <touching (説明 v)?>> then\n        if <touching (mouse-pointer v)?> then\n            set [ghost v] effect to (40)\n            if <mouse down?> then\n                broadcast (スタート v)\n                hide\n                stop [this script v]\n            end\n        else\n            set [ghost v] effect to (0)\n        end\n    end\nend\n\nwhen I receive [スタート v]\nstart sound [試合開始のゴング \(2\) v]\n\n@説明\n\nwhen I receive [スタート v]\nset [プレイ中? v] to [1]\n\nstop [other scripts in sprite v]\nhide\n\nwhen I receive [タイトル画面 v]\nswitch costume to (クエスチョン v)\nshow\nforever\n    if <(costume [number v]) = [1]> then\n        if <touching (mouse-pointer v)?> then\n            set [ghost v] effect to (40)\n            if <mouse down?> then\n                start sound [決定、ボタン押下9 v]\n                next costume\n                set [ghost v] effect to (0)\n                wait until <not <mouse down?>>\n            end\n        else\n            set [ghost v] effect to (0)\n        end\n    end\n    if <(costume [number v]) = [2]> then\n        set [ghost v] effect to (0)\n        wait until <<mouse down?> and <touching (mouse-pointer v)?>>\n        wait until <not <<mouse down?> and <touching (mouse-pointer v)?>>>\n        start sound [キャンセル2 v]\n        next costume\n    end\nend\n\nwhen I receive [タイトル画面 v]\nforever\n    if <(costume [number v]) = [1]> then\n        if <(プレイ中?) = [0]> then\n            go to [front v] layer\n            go [backward v] (2) layers\n            go to x: (50) y: (-85)\n        end\n        if <(プレイ中?) = [1]> then\n            go to x: (200) y: (140)\n            go to [back v] layer\n            if <touching (キャラ v)?> then\n                set [ghost v] effect to (50)\n            else\n                if <touching (mouse-pointer v)?> then\n                    set [ghost v] effect to (40)\n                else\n                    set [ghost v] effect to (0)\n                end\n            end\n        end\n    end\n    if <(costume [number v]) = [2]> then\n        go to [front v] layer\n        go [backward v] (2) layers\n        go to x: (0) y: (0)\n    end\nend\n\nwhen I receive [タイトル画面 v]\nset [プレイ中? v] to [0]\n\n@?マークを指す\n\nwhen I receive [スタート v]\nwait (0.1) seconds\nif <(プレイ回数) = [1]> then\n    show\n    clear graphic effects\n    wait (2.5) seconds\n    repeat (10)\n        change [ghost v] effect by (10)\n    end\n    hide\nend\n\nwhen flag clicked\ngo to x: (50) y: (130)\nhide\nforever\n    go to [front v] layer\nend\n\n@結果\n\nwhen I receive [結果 v]\nswitch costume to (結果 v)\nshow\nwait until <<touching (mouse-pointer v)?> and <mouse down?>>\nwait until <not <<touching (mouse-pointer v)?> and <mouse down?>>>\nstart sound [キャンセル2 v]\nbroadcast (タイトル画面 v)\n\nwait (0.1) seconds\n\nset [ステージ v] to [16]\n\nwhen I receive [タイトル画面 v]\ngo to [front v] layer\ngo [backward v] (2) layers\nhide\n\n@スコア数字\n\nwhen I start as a clone\nset size to (80) %\ngo to [front v] layer\ngo to [front v] layer\nchange [クローンの数スコア用 v] by (1)\nshow\nset [クローン番号 v] to (クローンの数スコア用)\ngo to x: (-235) y: (0)\nchange x by ((65) * (クローン番号))\nswitch costume to (letter (クローン番号) of (タイム))\n\nif <(クローンリセットするか?) = [y]> then\n    delete this clone\nend\nforever\n\nwhen I start as a clone\ngo to [front v] layer\nforever\n    if <(length of (タイム)) < (クローン番号)> then\n        change [クローンの数スコア用 v] by (-1)\n        delete this clone\n    end\nend\n\nwhen flag clicked\nhide\n\nwhen I receive [結果 v]\nset [クローンの数スコア用 v] to [0]\nrepeat ((length of (タイム)) + (1))\n    create clone of (_myself_ v)\nend\n\nwhen I receive [タイトル画面 v]\ndelete this clone\n\nwait (0.05) seconds\n\nif <[] = (クローンの数スコア用)> then\n\n@世界記録数字\n\nwhen I start as a clone\nchange [クローンの数世界記録用 v] by (1)\nshow\nset [クローン番号 v] to (クローンの数世界記録用)\ngo to x: (-96) y: (-114)\nchange x by ((45) * (クローン番号))\nswitch costume to (letter (クローン番号) of (☁ 世界記録2))\n\nforever\n\nif <(クローンリセットするか?) = [y]> then\n    delete this clone\nend\n\nwhen I start as a clone\nset size to (50) %\ngo to [front v] layer\nforever\n    if <(length of (☁ 世界記録2)) < (クローン番号)> then\n        change [クローンの数世界記録用 v] by (-1)\n        delete this clone\n    end\nend\n\nwhen flag clicked\nhide\n\ngo to x: (-62) y: (-114)\n\ngo to [front v] layer\n\nwhen I receive [結果 v]\nset [クローンの数世界記録用 v] to [0]\nrepeat (length of (☁ 世界記録2))\n    create clone of (_myself_ v)\nend\n\nwhen I receive [タイトル画面 v]\ndelete this clone\n\n@途中タイム数字\n\nwhen I start as a clone\nset size to (30) %\ngo to [back v] layer\ngo to [back v] layer\nchange [クローンの数途中用 v] by (1)\nshow\nset [クローン番号 v] to (クローンの数途中用)\ngo to x: (-240) y: (130)\nchange x by ((35) * (クローン番号))\nforever\n    switch costume to (letter (クローン番号) of (タイム))\nend\n\nif <(クローンリセットするか?) = [y]> then\n    delete this clone\nend\nforever\n\nwhen I start as a clone\ngo to [back v] layer\nforever\n    if <(length of (タイム)) < (クローン番号)> then\n        change [クローンの数途中用 v] by (-1)\n        delete this clone\n    end\nend\n\nwhen flag clicked\nhide\n\nwait (0.05) seconds\n\nif <[] = (クローンの数途中用)> then\n\nwhen I receive [スタート v]\nset [クローンの数途中用 v] to [0]\nforever\n    if <(クローンの数途中用) < (length of (タイム))> then\n        create clone of (_myself_ v)\n    end\nend\n\nwhen I receive [タイトル画面 v]\ndelete this clone\n\nwhen I start as a clone\nforever\n    if <touching (キャラ v)?> then\n        set [ghost v] effect to (50)\n    else\n        set [ghost v] effect to (0)\n    end\nend\n\n@logo\n\nwhen I receive [スタート v]\nhide\n\nwhen I receive [タイトル画面 v]\nswitch costume to (ロゴ v)\nshow\nforever\n    change y by ([cos v] of (ロゴ三角関数) )\nend\n\nwhen flag clicked\nset [ロゴ三角関数 v] to [0]\ngo to x: (0) y: (0)\nforever\n    change [ロゴ三角関数 v] by (5)\nend\n\n@タイマー\n\nwhen I receive [スタート v]\nforever\n    set [タイム v] to (timer)\nend\n\nwhen I receive [クリア v]\nstop [other scripts in sprite v]\n\n@サムネイル\n\nwhen flag clicked\nforever\n    set [ghost v] effect to (100)\n    go to [front v] layer\nend\n\n