Real platformer　V2.1

Instructions: 2 https://scratch.mit.edu/projects/409833764/\n流行2ページ目！ありがとうございます！\n※絶対に最後まで読んでください\n・このプラットフォーマーはなるべく現実に近づけて\n　います。\n・天気が追加されました!\n　3分の1の確率で雨になります。\n　雨だと風が強く視界もとても悪いです\n・壁キックはできません\n・影があります\n・風が吹いています。それによりキャラクターは動か\n　されます。\n　風は強い日や弱い日があります\n・草があります。風や、キャラクターの動きによ動\n　きます。\n・雲があります。風や、キャラクターの動きにより動\n　きます。\n・太陽があります。これによって、より世界がきれい\n　に見えます。\n・操作方法　\n　上矢印キーはジャンプ\n　左右キーで移動します。\n　赤色に触れたら最初からやり直しです。

@Stage\n\nwhen flag clicked\nforever\n    play sound [日時計の丘 v] until done\nend\n\nwhen flag clicked\nforever\n    if <(天気) = [雨]> then\n        switch backdrop to (背景2 v)\n    else\n        switch backdrop to (背景1 v)\n    end\nend\n\n@スプライト1\n\nwhen flag clicked\ngo to x: (-218) y: (0)\nset [変数 v] to [0]\nforever\n    wait until <(止まれ！) = [0]>\n    change y by (変数)\n    change [変数 v] by (-1)\n    if <touching (ステージ v)?> then\n        change y by ((-1) * (変数))\n        set [変数 v] to [0]\n    end\n    if <<key (right arrow v) pressed?> or <<mouse down?> and <[0] < (mouse x)>>> then\n        change [速度 v] by (1)\n        point in direction (90)\n    end\n    if <<key (left arrow v) pressed?> or <<mouse down?> and <(mouse x) < [0]>>> then\n        change [速度 v] by (-1)\n        point in direction (-90)\n    end\n    change x by (速度)\n    if <touching (ステージ v)?> then\n        change x by ((速度) * (-1))\n        set [速度 v] to [0]\n    end\n    set [速度 v] to ((速度) * (0.9))\n    change y by (-1)\n    if <<touching (ステージ v)?> and <<key (up arrow v) pressed?> or <<mouse down?> and <[0] < (mouse y)>>>> then\n        set [変数 v] to [15]\n    end\n    if <[242] < (x position)> then\n        go to x: (-218) y: (42)\n        broadcast (次 v)\n    end\n    if <touching (スプライト6 v)?> then\n        go to x: (-218) y: (42)\n    end\n    change [速度 v] by ((風) * (0.1))\n    wait until <(止まれ！) = [0]>\nend\n\ngo to [back v] layer\n\n@ステージ\n\nwhen I receive [次 v]\nnext costume\n\nwhen flag clicked\nswitch costume to (コスチューム1 v)\n\n@スプライト3\n\nwhen flag clicked\nset [風 v] to [0]\nhide\n\nwhen I start as a clone\ngo [backward v] (2) layers\n草ｗ\nshow\n\nwhen I receive [次 v]\npoint in direction (90)\n\nwhen I receive [次 v]\ndelete this clone\n\ndefine 草ｗ\nshow\ngo to (スプライト4 v)\nrepeat until <touching (ステージ v)?>\n    change y by (-30)\nend\nrepeat until <not <touching (ステージ v)?>>\n    change y by (1)\nend\nforever\n    show\n    turn right (風) degrees\n    if <touching (スプライト1 v)?> then\n        turn right (速度) degrees\n    end\n    if <[90] < (direction)> then\n        turn left (1) degrees\n    end\n    if <(direction) < [90]> then\n        turn right (1) degrees\n    end\n    if <[180] < (direction)> then\n        point in direction (180)\n    end\n    if <(direction) < [0]> then\n        point in direction (0)\n    end\nend\n\nif <(x position) < ([x position v] of [スプライト1 v])> then\n    point in direction (0)\nelse\n    point in direction (180)\nend\n\nwhen flag clicked\nset [風レベル v] to (pick random (-10) to (10))\nset [天気 v] to (pick random (1) to (3))\nif <[3] = (天気)> then\n    set [天気 v] to [雨]\nelse\n    set [天気 v] to [晴れ]\nend\nforever\n    if <[雨] = (天気)> then\n        set [風 v] to (pick random ((-10) + ((-1) * (風レベル))) to ((-15) + ((-1) * (風レベル))))\n        wait (pick random (0.1) to (5)) seconds\n        set [風 v] to (pick random ((-10) + ((-1) * (風レベル))) to ((-15) + ((-1) * (風レベル))))\n        wait (pick random (0.1) to (5)) seconds\n    else\n        set [風 v] to (pick random ((-10) + ((-1) * (風レベル))) to ((10) + (風レベル)))\n        wait (pick random (1) to (5)) seconds\n        set [風 v] to (pick random ((-10) + ((-1) * (風レベル))) to ((10) + (風レベル)))\n        wait (pick random (1) to (5)) seconds\n    end\nend\n\nwhen flag clicked\nforever\n    set [風 v] to ((風) * (0.9))\nend\n\nturn right (速度) degrees\n\nstart sound [ポップ v]\n\n@スプライト4\n\nwhen flag clicked\n草\n\ndefine 草\nhide\ngo to x: (-239) y: (126)\ncreate clone of (スプライト3 v)\nrepeat (47)\n    change x by (10)\n    create clone of (スプライト3 v)\nend\n\nwhen I receive [次 v]\nhide\ngo to x: (-239) y: (126)\ncreate clone of (スプライト3 v)\nrepeat (47)\n    change x by (10)\n    create clone of (スプライト3 v)\nend\n\n@スプライト6\n\nwhen flag clicked\nswitch costume to (コスチューム1 v)\nforever\n    go to [back v] layer\nend\n\nwhen I receive [次 v]\nnext costume\n\n@スプライト5\n\nwhen I receive [次 v]\ngo to [front v] layer\nset [止まれ！ v] to [1]\nshow\nwait (1.5) seconds\nhide\nset [止まれ！ v] to [0]\n\nwhen flag clicked\ngo to [front v] layer\nset [止まれ！ v] to [1]\nshow\nwait (1.5) seconds\nhide\nset [止まれ！ v] to [0]\n\n@スプライト7\n\nwhen flag clicked\nswitch costume to (コスチューム1 v)\nset [ghost v] effect to (100)\nforever\n    if <(止まれ！) = [1]> then\n        hide\n    else\n        show\n    end\n    go to x: (0) y: (0)\n    go to [front v] layer\n    go [backward v] (1) layers\n    if <([costume # v] of [ステージ v]) = [6]> then\n        set [ghost v] effect to (30)\n    end\n    set [ghost v] effect to (50)\nend\n\nwhen I receive [次 v]\nnext costume\n\nset [ghost v] effect to (50)\n\nwhen flag clicked\nforever\n    if <(天気) = [雨]> then\n        hide\n    else\n        show\n    end\nend\n\n@太陽\n\nwhen flag clicked\nforever\n    go to [front v] layer\n    go [backward v] (2) layers\n    if <(天気) = [雨]> then\n        hide\n    else\n        show\n    end\nend\n\n@スプライト2\n\nwhen flag clicked\ngo to x: (422) y: (0)\nforever\n    go to [back v] layer\n    change x by ((風) + (1))\n    if <[421] < (x position)> then\n        go to x: (-421) y: (0)\n    end\n    if <(x position) < [-421]> then\n        go to x: (421) y: (0)\n    end\n    if <(天気) = [雨]> then\n        switch costume to (コスチューム2 v)\n    else\n        switch costume to (コスチューム1 v)\n    end\nend\n\n@スプライト8\n\nwhen flag clicked\nset [ghost v] effect to (100)\n\n@スプライト9\n\nwhen flag clicked\nhide\nforever\n    if <(天気) = [雨]> then\n        create clone of (_myself_ v)\n    else\n    end\nend\n\nwhen I start as a clone\nshow\ngo to (random position v)\nset y to (150)\npoint in direction (135)\nrepeat (pick random (200) to (300))\n    if <<touching (ステージ v)?> or <touching (_edge_ v)?>> then\n        delete this clone\n    end\n    change x by (-1)\n    change y by (-1)\n    set [ghost v] effect to (70)\nend\ndelete this clone\n\nshow\n\nwhen I start as a clone\n\n@スプライト10\n\nwhen flag clicked\nforever\n    set [ghost v] effect to (30)\n    if <(天気) = [雨]> then\n        show\n    else\n        hide\n    end\nend\n\n