Platformer / プラットフォーマー　DEMO

Instructions: 試作品ですので、まだまだバグや欠点が多いと思います。意見をください。\n@Banakki1230様バグ修正ありがとうございます\n\n\n<English>\nIt's a platformer.\nTap or arrow keys to operate.\n\n▼Be careful of thorns, magma, and falling. I'll die.\n▼Respawn point\nWhen you die, it starts at the respawn point, not from the beginning of the stage.\n\n▼Except for BGM, all of them are self-made.\n\nThe program has also improved a little from the previous one, but the behavior is still strange.\n\n▼Overview\nShared date: November 22\nCapacity: 5.1MB\n\n<日本語>\nただのプラットフォーマーです。\nタップ又は矢印キーで操作します。\n▼トゲやマグマ、落下には注意しましょう。デスします。\n\n▼リスポーン地点\nデスすると、ステージの最初からではなくリスポーン地点から始まります。\n\n▼BGMを除き、全て自作となっています。\nプログラムも以前のものから少し改良していますが、まだ挙動がおかしいです。\n\n▼概要\n共有日：11月22日\n容量：5.1MB\n

@Stage\n\nwhen I receive [start v]\nswitch backdrop to (背景4 v)\nforever\n    play sound [1 v] until done\n    wait (3) seconds\nend\n\nwhen flag clicked\nbroadcast (intro start v)\n\n@intro\n\ndefine ID (id) x (x) y (y) size (size) 向き (向き)\nset size to (size) %\npoint in direction (向き)\ngo to x: (x) y: (y)\nset [id v] to (id)\ncreate clone of (_myself_ v)\n\nwhen I start as a clone\nshow\nif <(ID) = [back]> then\n    set [ghost v] effect to (100)\n    switch costume to (back v)\n    repeat (10)\n        change [ghost v] effect by (-10)\n    end\n    タイマー [3.5] 秒まで待つ\n    repeat (30)\n        change [ghost v] effect by (5)\n    end\n    delete this clone\nend\n\ndefine タイマー (タイム) 秒まで待つ\nif <[] = (タイム)> then\n    タイマー ((timer) + (0.01)) 秒まで待つ\nelse\n    wait until <(タイム) < (timer)>\nend\n\nwhen I start as a clone\nif <(ID) = [logo]> then\n    go to [front v] layer\n    set [ghost v] effect to (100)\n    switch costume to (logo v)\n    if <(雑用) = [1]> then\n        repeat (20)\n            change [ghost v] effect by (-4)\n            change size by (((100) - (size)) / (8))\n        end\n        delete this clone\n    end\n    repeat (20)\n        change [ghost v] effect by (-4)\n        change size by (((100) - (size)) / (8))\n    end\n    タイマー [1] 秒まで待つ\n    repeat (20)\n        change [ghost v] effect by (4)\n        change size by (((0) - (size)) / (8))\n    end\n    タイマー [2] 秒まで待つ\n    delete this clone\nend\n\nwhen I start as a clone\nif <(ID) = [パーツ]> then\n    set [ghost v] effect to (100)\n    go to [front v] layer\n    if <(雑用) = [2]> then\n        switch costume to (パーツ1 v)\n    else\n        if <(雑用) = [3]> then\n            switch costume to (パーツ2 v)\n        else\n            if <(雑用) = [4]> then\n                switch costume to (パーツ3 v)\n            else\n                if <(雑用) = [5]> then\n                    switch costume to (パーツ4 v)\n                else\n                    if <(雑用) = [6]> then\n                        switch costume to (パーツ5 v)\n                    else\n                        if <(雑用) = [7]> then\n                            switch costume to (パーツ6 v)\n                        else\n                            go to [front v] layer\n                            go [backward v] (6) layers\n                            switch costume to (パーツ7 v)\n                        end\n                    end\n                end\n            end\n        end\n    end\n    repeat until <(x position) = [1]>\n        change x by ([floor v] of (((1) - (x position)) / (4)) )\n        change [ghost v] effect by (-10)\n    end\n    タイマー [2] 秒まで待つ\n    repeat (15)\n        change size by (((150) - (size)) / (4))\n    end\n    タイマー [3.5] 秒まで待つ\n    repeat (30)\n        change size by (((300) - (size)) / (8))\n        change [ghost v] effect by (5)\n    end\n    delete this clone\nend\n\nwhen I start as a clone\nif <(ID) = [text]> then\n    set [ghost v] effect to (100)\n    go to [front v] layer\n    change [brightness v] effect by (-20)\n    set size to (170) %\n    if <(雑用) = [8]> then\n        switch costume to (コスチューム3 v)\n    else\n        if <(雑用) = [9]> then\n            switch costume to (コスチューム4 v)\n        else\n            switch costume to (コスチューム5 v)\n        end\n    end\n    repeat (30)\n        change [ghost v] effect by (-5)\n        change size by (((80) - (size)) / (8))\n    end\n    wait (0.3) seconds\n    repeat (30)\n        change size by (((300) - (size)) / (8))\n        change [ghost v] effect by (5)\n    end\n    delete this clone\nend\n\nwhen I receive [intro start v]\nstart sound [Minimalistic Intro for TIG \(dual\) v]\nclear graphic effects\nreset timer\nswitch costume to (コスチューム1 v)\ngo to x: (0) y: (0)\nset size to (100) %\npoint in direction (90)\nset [雑用 v] to [0]\nID [back] x [] y [] size [100] 向き [90]\nタイマー [] 秒まで待つ\nID [logo] x [] y [] size [200] 向き [90]\nタイマー [] 秒まで待つ\nset [雑用 v] to [1]\nID [logo] x [] y [] size [200] 向き [90]\nタイマー [] 秒まで待つ\nID [logo] x [] y [] size [200] 向き [90]\nタイマー [] 秒まで待つ\nID [logo] x [] y [] size [200] 向き [90]\nタイマー [] 秒まで待つ\nID [logo] x [] y [] size [200] 向き [90]\nタイマー [] 秒まで待つ\nID [logo] x [] y [] size [200] 向き [90]\nタイマー [1] 秒まで待つ\nset [雑用 v] to [2]\nID [パーツ] x [100] y [] size [100] 向き [90]\nwait () seconds\nset [雑用 v] to [3]\nID [パーツ] x [100] y [] size [100] 向き [90]\nwait () seconds\nset [雑用 v] to [4]\nID [パーツ] x [100] y [] size [100] 向き [90]\nwait () seconds\nset [雑用 v] to [5]\nID [パーツ] x [100] y [] size [100] 向き [90]\nset [雑用 v] to [6]\nwait () seconds\nID [パーツ] x [100] y [] size [100] 向き [90]\nwait () seconds\nset [雑用 v] to [7]\nID [パーツ] x [100] y [] size [100] 向き [90]\nwait () seconds\nset [雑用 v] to [8]\nID [パーツ] x [100] y [] size [100] 向き [90]\nタイマー [2] 秒まで待つ\nID [text] x [0] y [] size [200] 向き [90]\nタイマー [] 秒まで待つ\nset [雑用 v] to [9]\nID [text] x [0] y [] size [300] 向き [90]\nタイマー [] 秒まで待つ\nset [雑用 v] to [10]\nID [text] x [0] y [] size [200] 向き [90]\nタイマー [3.7] 秒まで待つ\nbroadcast (start v)\n\nclear sound effects\n\n@sign\n\nwhen flag clicked\npoint in direction (90)\nhide\n\nwhen I receive [次 v]\nswitch costume to (ステージ)\n\nwhen I receive [start v]\ngo to x: (0) y: (0)\nshow\nswitch costume to (コスチューム1 v)\nforever\n    go to [back v] layer\n    go [forward v] (4) layers\nend\n\n@character\n\nwhen flag clicked\nhide\n\nwhen [timer v] > (0.01)\nhide\n\ndefine プログラム\nchange [y v] by (-1)\nchange y by (Y)\nif <<[0] < (Y)> and <touching (ground v)?>> then\n    change y by ((0) - (Y))\nend\nif <touching (ground v)?> then\n    change y by ((Y) - ((Y) * (1.8)))\n    set [y v] to [0]\n    if <<<key (up arrow v) pressed?> or <key (w v) pressed?>> or <<(y position) < (mouse y)> and <mouse down?>>> then\n        start sound [Zoop v]\n        set [y v] to [12]\n    end\nend\nif <<<mouse down?> and <(mouse x) < (x position)>> or <<key (left arrow v) pressed?> or <key (a v) pressed?>>> then\n    change [x v] by (-0.8)\nend\nif <<<mouse down?> and <(x position) < (mouse x)>> or <<key (right arrow v) pressed?> or <key (d v) pressed?>>> then\n    change [x v] by (0.8)\nend\nset [x v] to ((X) * (0.93))\nchange x by (X)\nif <touching (ground v)?> then\n    change y by (1)\nend\nif <touching (ground v)?> then\n    change y by (1)\nend\nif <touching (ground v)?> then\n    change y by (1)\nend\nif <touching (ground v)?> then\n    change y by (1)\nend\nif <touching (ground v)?> then\n    change y by (1)\nend\nif <touching (ground v)?> then\n    change y by (-4)\n    change x by ((X) * (-1.1))\n    if <<<key (up arrow v) pressed?> or <key (w v) pressed?>> or <<(y position) < (mouse y)> and <mouse down?>>> then\n        start sound [Zoop v]\n        set [y v] to [14]\n        if <(X) > [0]> then\n            set [x v] to [-10]\n        else\n            set [x v] to [10]\n        end\n    else\n        set [x v] to [0]\n    end\nend\nif <<touching (spike/lava v)?> or <<not <(ステージ) = [9]>> and <(y position) < [-178]>>> then\n    start sound [Crunch v]\n    repeat (10)\n        change [ghost v] effect by (10)\n    end\n    set [ステージ v] to (リスポーン地点)\n    broadcast (次 v)\n    set [y v] to [0]\n    set [x v] to [0]\n    hide\n    go to x: (-200) y: (80)\n    clear graphic effects\n    switch costume to (正面 v)\n    show\n    wait (0.3) seconds\n    set [x v] to [0]\nend\nif <<<<(y position) < [-180]> and <(ステージ) = [9]>> or <<[240] < (x position)> and <not <(ステージ) = [9]>>>> and <not <(ステージ) = [11]>>> then\n    change [ステージ v] by (1)\n    broadcast (次 v)\n    hide\n    go to x: (-200) y: (80)\n    set [x v] to [0]\n    set [y v] to [0]\n    switch costume to (正面 v)\n    clear graphic effects\n    show\n    wait (0.3) seconds\n    set [x v] to [0]\nend\n\nwhen I receive [start v]\ngo to x: (-200) y: (40)\nset size to (90) %\nshow\nhide variable [x v]\nhide variable [y v]\nset [x v] to [0]\nset [y v] to [0]\nset [ステージ v] to [1]\nset [動き v] to [はい]\ngo to [back v] layer\ngo [forward v] (5) layers\nswitch costume to (正面 v)\nset rotation style [left-right v]\nforever\n    go to [back v] layer\n    go [forward v] (5) layers\n    if <(動き) = [はい]> then\n        プログラム\n        コスチューム\n    end\nend\n\nwhen I receive [start v]\nset [time v] to [0]\nrepeat until <(ステージ) = [11]>\n    wait (1) seconds\n    change [time v] by (1)\nend\nif <(Time) < (☁ World Record)> then\n    set [☁ world record v] to (Time)\nend\nshow variable [time v]\nshow variable [☁ world record v]\n\nwhen flag clicked\nhide variable [☁ world record v]\nhide variable [time v]\n\ndefine コスチューム\nif <<<key (up arrow v) pressed?> or <key (w v) pressed?>> or <<(y position) < (mouse y)> and <mouse down?>>> then\n    if <<<mouse down?> and <(x position) < (mouse x)>> or <<key (right arrow v) pressed?> or <key (d v) pressed?>>> then\n        switch costume to (斜め上 v)\n        point in direction (90)\n    end\n    if <<<mouse down?> and <(mouse x) < (x position)>> or <<key (left arrow v) pressed?> or <key (a v) pressed?>>> then\n        switch costume to (斜め上 v)\n        point in direction (-90)\n    end\n    if <not <<<<mouse down?> and <(x position) < (mouse x)>> or <<key (right arrow v) pressed?> or <key (d v) pressed?>>> or <<<mouse down?> and <(mouse x) < (x position)>> or <<key (left arrow v) pressed?> or <key (a v) pressed?>>>>> then\n        switch costume to (上 v)\n    end\nelse\n    if <<<mouse down?> and <(x position) < (mouse x)>> or <<key (right arrow v) pressed?> or <key (d v) pressed?>>> then\n        point in direction (90)\n        switch costume to (横 v)\n    else\n        if <<<mouse down?> and <(mouse x) < (x position)>> or <<key (left arrow v) pressed?> or <key (a v) pressed?>>> then\n            point in direction (-90)\n            switch costume to (横 v)\n        else\n            switch costume to (横 v)\n        end\n    end\nend\n\n@ground\n\nwhen I receive [次 v]\nswitch costume to (ステージ)\n\nwhen [timer v] > (0.01)\n\nwhen I receive [start v]\ngo to x: (0) y: (-45)\nshow\nswitch costume to (1 v)\nforever\n    go to [front v] layer\nend\n\nwhen flag clicked\nhide\n\nwhen flag clicked\npoint in direction (90)\nhide\n\n@spike/lava\n\nwhen I receive [次 v]\nswitch costume to (ステージ)\n\nwhen [timer v] > (0.01)\npoint in direction (90)\nhide\n\nwhen I receive [start v]\nswitch costume to (コスチューム1 v)\ngo to x: (0) y: (0)\nshow\nforever\n    1\nend\n\ndefine 1\ngo to [back v] layer\ngo [forward v] (5) layers\n\n@grass/\n\nwhen [timer v] > (0.01)\nhide\n\nwhen I receive [start v]\ngo to x: (0) y: (-45)\nswitch costume to (none v)\npoint in direction (90)\nhide\nforever\n    go to [front v] layer\n    go [backward v] (2) layers\nend\n\nwhen I receive [start v]\n草の配置\n\ndefine 草の配置\nwait (0.001) seconds\nset [草のステージ情報 v] to (ステージ)\nif <(ステージ) = [1]> then\n    switch costume to (none v)\n    クローン生成　X: [-96] Y: [-93] どこまで: [235]\nend\nif <(ステージ) = [2]> then\n    switch costume to (none v)\n    クローン生成　X: [80] Y: [-70] どこまで: [235]\nend\nif <(ステージ) = [3]> then\n    switch costume to (none v)\n    クローン生成　X: [-60] Y: [45] どこまで: [88]\nend\nif <(ステージ) = [4]> then\n    switch costume to (none v)\n    クローン生成　X: [-93] Y: [-100] どこまで: [235]\nend\nif <(ステージ) = [5]> then\n    switch costume to (none v)\n    クローン生成　X: [-235] Y: [-48] どこまで: [-93]\nend\nif <(ステージ) = [6]> then\n    switch costume to (none v)\n    クローン生成　X: [-85] Y: [-20] どこまで: [235]\nend\nif <(ステージ) = [8]> then\n    switch costume to (none v)\n    クローン生成　X: [113] Y: [115] どこまで: [235]\nend\nif <(ステージ) = [9]> then\n    switch costume to (none v)\n    クローン生成　X: [-240] Y: [-60] どこまで: [-140]\nend\nif <(ステージ) = [10]> then\n    switch costume to (none v)\n    クローン生成　X: [-165] Y: [45] どこまで: [-60]\nend\nif <(ステージ) = [11]> then\n    switch costume to (none v)\n    クローン生成　X: [-235] Y: [-80] どこまで: [235]\nend\n\nwhen I receive [次 v]\nif <not <(ステージ) = (草のステージ情報)>> then\n    草の配置\nend\n\ndefine クローン生成　X: (x座標) Y: (y座標) どこまで: (どこまで行きたいかx)\nset [草 v] to [0]\ngo to x: (x座標) y: (y座標)\nif <(x座標) < (どこまで行きたいかx)> then\n    repeat until <(どこまで行きたいかx) < (x position)>\n        change x by (15)\n        create clone of (_myself_ v)\n    end\nelse\n    repeat until <(x position) < (どこまで行きたいかx)>\n        change x by (-15)\n        create clone of (_myself_ v)\n    end\nend\n\nwhen I start as a clone\npoint in direction (90)\nshow\n今のステージ (ステージ)\n\ndefine 今のステージ (ステージ)\nrepeat until <not <(ステージ) = (ステージ)>>\n    草の配置（ｚ）\n    turn right (([cos v] of (草) ) / (1.5)) degrees\nend\ndelete this clone\n\ndefine 草の配置（ｚ）\ngo to [front v] layer\ngo [backward v] (3) layers\n\nwhen I receive [start v]\nforever\n    change [草 v] by (3)\nend\n\n@thumbnail\n\nwhen flag clicked\ngo to x: (0) y: (0)\ngo to [front v] layer\ngo to [front v] layer\nswitch costume to (コスチューム1 v)\nset [ghost v] effect to (100)\n\n@Sun/cloud\n\nwhen flag clicked\ngo to [back v] layer\ngo [forward v] (2) layers\nset [クローン v] to [1]\ncreate clone of (_myself_ v)\nset [クローン v] to [2]\nforever\n    wait (pick random (2) to (5)) seconds\n    create clone of (_myself_ v)\nend\n\nset [クローン v] to [3]\ncreate clone of (_myself_ v)\n\nwhen I start as a clone\nif <(クローン) = [1]> then\n    clear graphic effects\n    set size to (100) %\n    set [cos v] to [0]\n    switch costume to (sun v)\n    go to x: (225) y: (157)\n    show\n    forever\n        go to [back v] layer\n        change [cos v] by (5)\n        change size by ([cos v] of (cos) )\n    end\nend\nif <(クローン) = [2]> then\n    clear graphic effects\n    switch costume to (join [cloud] (pick random (1) to (2)))\n    go to x: (300) y: (pick random (30) to (170))\n    set size to (90) %\n    set [ghost v] effect to (pick random (25) to (0))\n    show\n    repeat until <(x position) < [-289]>\n        go to [back v] layer\n        go [forward v] (2) layers\n        change x by (-3)\n    end\n    delete this clone\nend\n\nif <(クローン) = [3]> then\n    switch costume to (back ground v)\n    go to x: (0) y: (0)\n    set size to (100) %\n    clear graphic effects\n    show\n    forever\n        go to [back v] layer\n        go [forward v] (2) layers\n    end\nend\n\n@respwan\n\nwhen flag clicked\nhide\n\nwhen I receive [start v]\nset [リスポーン地点 v] to [1]\nswitch costume to (on v)\ngo to [back v] layer\ngo [forward v] (4) layers\nshow\nforever\n    go to [back v] layer\n    go [forward v] (4) layers\n    if <<(costume [number v]) = [1]> and <<not <(ステージ) = (リスポーン地点)>> and <touching (character v)?>>> then\n        start sound [Coin v]\n        switch costume to (on v)\n        set [リスポーン地点 v] to (ステージ)\n    end\nend\n\nwhen I receive [次 v]\nif <<(ステージ) = [1]> or <<(ステージ) = [3]> or <<(ステージ) = [6]> or >>> then\n    show\n    if <(ステージ) = (リスポーン地点)> then\n        switch costume to (on v)\n    else\n        switch costume to (off v)\n    end\nelse\n    hide\nend\n\n