Desert area ~Scroll platformer~   (&tomato421)

Instructions: 難易度調節ミスりました(((\n\n～操作～\n・PC\n十字キーで操作\n\n・モバイル\n画面をタップで移動\n\nステージちょっと長くしました\n旗はチェックポイントです！\n難易度　★★★★☆\n\n\n\n\n\n\n\n\nバネの形珍しいとか言うな(((

@Stage\n\nwhen I receive [始まるお v]\nset volume to (80) %\nswitch backdrop to (背景1 v)\nforever\n    play sound [Jim Yosef - Firefly v] until done\nend\n\nwhen flag clicked\nswitch backdrop to (背景2 v)\n\n@Player\n\ndefine 動作\nchange [yの力 v] by (-1)\nif <(ﾀﾋんだ？) = [いや]> then\n    if <<key (right arrow v) pressed?> or <<key (d v) pressed?> or <<(mouse x) > [0]> and <mouse down?>>>> then\n        point in direction (90)\n        change [xの力 v] by (1)\n    end\n    if <<key (left arrow v) pressed?> or <<key (a v) pressed?> or <<[0] > (mouse x)> and <mouse down?>>>> then\n        point in direction (-90)\n        change [xの力 v] by (-1)\n    end\n    set [xの力 v] to ((xの力) * (0.88))\n    change x by (xの力)\n    repeat (6)\n        if <touching (ステージ v)?> then\n            change y by (1)\n        end\n    end\n    if <touching (ステージ v)?> then\n        change y by (-6)\n        位置補正x (() - ((xの力) / ([abs v] of (xの力) ))) ([ceiling v] of ([abs v] of (xの力) ) )\n        if <<key (up arrow v) pressed?> or <<key (w v) pressed?> or <<(mouse y) > [0]> and <mouse down?>>>> then\n            set [yの力 v] to [12]\n            set [xの力 v] to ((7) - (<(xの力) > [0]> * (14)))\n        else\n            set [xの力 v] to [0]\n        end\n    end\n    change y by (yの力)\n    if <touching (ステージ v)?> then\n        位置補正y (() - ((yの力) / ([abs v] of (yの力) ))) ([ceiling v] of ([abs v] of (yの力) ) )\n    end\n    change y by (-1.1)\n    if <<touching (ステージ v)?> and <<key (up arrow v) pressed?> or <<key (w v) pressed?> or <<(mouse y) > [0]> and <mouse down?>>>>> then\n        set [yの力 v] to [15]\n    end\n    if <touching (バネ v)?> then\n        set [yの力 v] to [19]\n    end\n    change y by (1.1)\nend\n処理\nbroadcast (プログラム2 v)\n\nwhen I receive [プログラム v]\n動作\n\ndefine 処理\nif <(ﾀﾋんだ？) = [いや]> then\n    change [x v] by ((x position) - ((X) - (Camera_x)))\n    change [y v] by ((y position) - (((Y) - (Camera _y)) - (20)))\n    change [camera_x v] by ([floor v] of (((X) - (Camera_x)) * (0.1)) )\n    change [camera _y v] by ([floor v] of (((Y) - (Camera _y)) * (0.2)) )\n    set x to ((X) - (Camera_x))\n    set y to (((Y) - (Camera _y)) - (20))\nend\n\ndefine 位置補正x (向き) (回数)\nif <(ﾀﾋんだ？) = [いや]> then\n    if <(xの力) = [0]> then\n        stop [this script v]\n    end\n    set [i v] to [0]\n    repeat until <<not <touching (ステージ v)?>> or <(i) = ((回数) + (1))>>\n        change [i v] by (1)\n        change x by (向き)\n    end\n    change x by (() - ((向き) * (((回数) + (1)) * <<(i) = ((回数) + (1))> and <touching (ステージ v)?>>)))\nend\n\ndefine 位置補正y (向き) (回数)\nif <(ﾀﾋんだ？) = [いや]> then\n    if <(yの力) = [0]> then\n        stop [this script v]\n    end\n    set [i v] to [0]\n    repeat until <<not <touching (ステージ v)?>> or <(i) = ((回数) + (1))>>\n        change [i v] by (1)\n        change y by (向き)\n    end\n    change y by (() - ((向き) * (((回数) + (1)) * <<(i) = ((回数) + (1))> and <touching (ステージ v)?>>)))\n    set [yの力 v] to [0]\nend\n\ndefine 初期位置\nclear graphic effects\ngo to x: (0) y: (-20)\nset [xの力 v] to [0]\nset [yの力 v] to [0]\nset [camera_x v] to (復活x)\nset [camera _y v] to (復活y)\nset [x v] to [0]\nset [y v] to [0]\n\nwhen I receive [始まるお v]\ngo to [front v] layer\nset [ﾀﾋんだ？ v] to [いや]\nclear graphic effects\nshow\nset rotation style [left-right v]\nset size to (48) %\npoint in direction (90)\ngo to x: (0) y: (-20)\nset [xの力 v] to [0]\nset [yの力 v] to [0]\nset [camera_x v] to [-200]\nset [camera _y v] to [-20]\nset [復活x v] to [-200]\nset [復活y v] to [-20]\nset [x v] to [-200]\nset [y v] to [-20]\n\nwhen flag clicked\nhide\n\nwhen flag clicked\nforever\n    if <<(Y) < [-500]> or <touching (障害物 v)?>> then\n        set [ﾀﾋんだ？ v] to [うん]\n        repeat (10)\n            change [ghost v] effect by (10)\n        end\n        wait (0.1) seconds\n        set [ﾀﾋんだ？ v] to [いや]\n        初期位置\n    end\nend\n\nwhen flag clicked\nwait until <touching (クリア v)?>\nクリア\n\ndefine クリア\nset y to (0)\nset [ﾀﾋんだ？ v] to [うん]\nset rotation style [all around v]\nshow\nclear graphic effects\nrepeat (20)\n    point towards (クリア v)\n    turn right (65) degrees\n    move ((distance to [クリア v]) / (2)) steps\n    change size by (-1)\n    change [ghost v] effect by (5)\nend\nhide\nset [ghost v] effect to (0)\nbroadcast (クリア v)\nstop [this script v]\n\n@ステージ\n\ndefine ステージ配置 (x座標) (y座標) (ステージ番号)\nswitch costume to (none v)\nset [my_x v] to (x座標)\nset [my_y v] to (y座標)\nswitch costume to ((ステージ番号) + (1))\nset [my_n v] to ((ステージ番号) + (1))\ncreate clone of (_myself_ v)\n\ndefine 移動 (x) (y)\nswitch costume to (none v)\ngo to x: (x) y: (y)\nif <<([abs v] of (x) ) > ([abs v] of (x position) )> or <([abs v] of (y) ) > ([abs v] of (y position) )>> then\n    hide\nelse\n    show\nend\nswitch costume to (My_n)\n\nwhen I receive [プログラム2 v]\nif <(costume [number v]) = [1]> then\n    broadcast (プログラム v)\nelse\n    移動 ((My_x) - (Camera_x)) ((My_y) - (Camera _y))\nend\n\nwhen I start as a clone\nshow\n\nwhen I receive [始まるお v]\nhide\nステージ配置 [0] [0] [1]\nステージ配置 [480] [0] [2]\nステージ配置 [960] [0] [3]\nステージ配置 [1440] [0] [4]\nステージ配置 [1920] [0] [5]\nステージ配置 [2400] [0] [6]\nステージ配置 [2880] [0] [7]\nステージ配置 [3360] [0] [8]\nステージ配置 [3840] [0] [9]\nステージ配置 [4320] [0] [10]\nステージ配置 [4800] [0] [11]\nステージ配置 [5280] [0] [12]\nステージ配置 [5760] [0] [13]\nステージ配置 [6240] [0] [14]\nステージ配置 [6720] [0] [15]\nswitch costume to (none v)\nbroadcast (プログラム v)\n\nwhen flag clicked\nhide\n\nset [camera_x v] to [6720]\n\n@障害物\n\ndefine ステージ配置 (x座標) (y座標) (ステージ番号)\nswitch costume to (none v)\nset [my_x v] to (x座標)\nset [my_y v] to (y座標)\nswitch costume to ((ステージ番号) + (1))\nset [my_n v] to ((ステージ番号) + (1))\ncreate clone of (_myself_ v)\n\ndefine 移動 (x) (y)\nswitch costume to (none v)\ngo to x: (x) y: (y)\nif <<([abs v] of (x) ) > ([abs v] of (x position) )> or <([abs v] of (y) ) > ([abs v] of (y position) )>> then\n    hide\nelse\n    show\nend\nswitch costume to (My_n)\n\nwhen I receive [プログラム2 v]\nif <not <(costume [number v]) = [1]>> then\n    移動 ((My_x) - (Camera_x)) ((My_y) - (Camera _y))\nend\n\nwhen I start as a clone\nshow\n\nwhen I receive [始まるお v]\nhide\nステージ配置 [0] [0] [1]\nステージ配置 [480] [0] [2]\nステージ配置 [960] [0] [3]\nステージ配置 [1440] [0] [4]\nステージ配置 [1920] [0] [5]\nステージ配置 [2400] [0] [6]\nステージ配置 [2880] [0] [7]\nステージ配置 [3360] [0] [8]\nステージ配置 [3840] [0] [9]\nステージ配置 [4320] [0] [10]\nステージ配置 [4800] [0] [11]\nステージ配置 [5280] [0] [12]\nステージ配置 [5760] [0] [13]\nステージ配置 [6240] [0] [14]\nswitch costume to (none v)\n\n@スプライト1\n\nwhen I receive [始まるお v]\ngo to x: (270) y: (190)\nshow\nforever\n    change [san v] by (6)\n    change size by ([sin v] of (san) )\nend\n\nwhen flag clicked\nhide\n\n@背景\n\ndefine ステージ配置 (x座標) (y座標) (ステージ番号)\nswitch costume to (none v)\nset [my_x v] to (x座標)\nset [my_y v] to (y座標)\nswitch costume to ((ステージ番号) + (1))\nset [my_n v] to ((ステージ番号) + (1))\ncreate clone of (_myself_ v)\n\ndefine 移動 (x) (y)\nswitch costume to (none v)\ngo to x: (x) y: (y)\nif <<([abs v] of (x) ) > ([abs v] of (x position) )> or <([abs v] of (y) ) > ([abs v] of (y position) )>> then\n    hide\nelse\n    show\nend\nswitch costume to (My_n)\n\nwhen I receive [プログラム2 v]\nif <(costume [number v]) = [1]> then\n    broadcast (プログラム v)\nelse\n    移動 ((My_x) - (Camera_x)) ((My_y) - (Camera _y))\nend\n\nwhen I start as a clone\nshow\n\nwhen I receive [始まるお v]\nhide\ngo to [back v] layer\nステージ配置 [0] [0] [1]\nステージ配置 [480] [0] [2]\nステージ配置 [960] [0] [3]\nステージ配置 [1440] [0] [4]\nステージ配置 [1920] [0] [5]\nステージ配置 [2400] [0] [6]\nステージ配置 [2880] [0] [7]\nステージ配置 [3360] [0] [8]\nステージ配置 [3840] [0] [9]\nステージ配置 [4320] [0] [10]\nステージ配置 [4800] [0] [11]\nステージ配置 [5280] [0] [12]\nステージ配置 [5760] [0] [13]\nステージ配置 [6240] [0] [14]\nswitch costume to (none v)\nbroadcast (プログラム v)\n\nwhen flag clicked\nhide\n\n@バネ\n\ndefine ステージ配置 (x座標) (y座標) (ステージ番号)\nswitch costume to (none v)\nset [my_x v] to (x座標)\nset [my_y v] to (y座標)\nswitch costume to ((ステージ番号) + (1))\nset [my_n v] to ((ステージ番号) + (1))\ncreate clone of (_myself_ v)\n\ndefine 移動 (x) (y)\nswitch costume to (none v)\ngo to x: (x) y: (y)\nif <<([abs v] of (x) ) > ([abs v] of (x position) )> or <([abs v] of (y) ) > ([abs v] of (y position) )>> then\n    hide\nelse\n    show\nend\nswitch costume to (My_n)\n\nwhen I receive [プログラム2 v]\nif <(costume [number v]) = [1]> then\n    broadcast (プログラム v)\nelse\n    移動 ((My_x) - (Camera_x)) ((My_y) - (Camera _y))\nend\n\nwhen I start as a clone\nshow\n\nwhen I receive [始まるお v]\nhide\nステージ配置 [0] [0] [1]\nステージ配置 [480] [0] [2]\nステージ配置 [960] [0] [3]\nステージ配置 [1440] [0] [4]\nステージ配置 [1920] [0] [5]\nステージ配置 [2400] [0] [6]\nステージ配置 [2880] [0] [7]\nステージ配置 [3360] [0] [8]\nステージ配置 [3840] [0] [9]\nステージ配置 [4320] [0] [10]\nステージ配置 [4800] [0] [11]\nステージ配置 [5280] [0] [12]\nステージ配置 [5760] [0] [13]\nステージ配置 [6240] [0] [14]\nswitch costume to (none v)\nbroadcast (プログラム v)\n\nwhen flag clicked\nhide\n\n@intro\n\nwhen I start as a clone\nhide\nif <(costume [number v]) > [2]> then\n    go to x: (0) y: (0)\n    show\n    set size to (pick random (10) to (20)) %\n    set [sx v] to (pick random (-15) to (15))\n    set [sy v] to (pick random (5) to (17))\n    go to [front v] layer\n    repeat until <touching (_edge_ v)?>\n        change x by (Sx)\n        change y by (Sy)\n        if <[1] < (Sx)> then\n            change [sx v] by (-0.5)\n        end\n        if <(Sx) < [-1]> then\n            change [sx v] by (0.5)\n        end\n        turn right ((size) / (7)) degrees\n        change [sy v] by (-1)\n    end\n    delete this clone\nelse\n    if <(costume) = [1]> then\n        show\n        switch costume to (2 v)\n        go to x: (0) y: (0)\n        point in direction (90)\n        set [ghost v] effect to (50)\n        set size to (10) %\n        repeat (20)\n            change size by (10)\n            change [brightness v] effect by (5)\n        end\n        delete this clone\n    else\n        if <(costume) = [2]> then\n            go to [front v] layer\n            set size to (200) %\n            show\n            switch costume to (コスチューム1 v)\n            go to x: (0) y: (-455)\n            point in direction (90)\n            repeat until <(round (y position)) = [0]>\n                change y by (((0) - (y position)) / (4))\n            end\n            wait until <(?) = [1]>\n            start sound [Low Whoosh v]\n            repeat until <(round (direction)) = [0]>\n                turn right (((0) - (direction)) / (6)) degrees\n            end\n            repeat until <(round (x position)) = [225]>\n                change x by (((225) - (x position)) / (4))\n            end\n            delete this clone\n        else\n            if <(costume) = [3]> then\n                go to [front v] layer\n                set size to (200) %\n                show\n                switch costume to (コスチューム2 v)\n                go to x: (0) y: (455)\n                point in direction (90)\n                start sound [High Whoosh v]\n                repeat until <(round (y position)) = [0]>\n                    change y by (((0) - (y position)) / (4))\n                end\n                switch backdrop to (背景1 v)\n                change [? v] by (1)\n                wait (0.01) seconds\n                repeat until <(round (direction)) = [0]>\n                    turn right (((0) - (direction)) / (6)) degrees\n                end\n                repeat until <(round (x position)) = [-225]>\n                    change x by (((-225) - (x position)) / (4))\n                end\n                broadcast (始まるお v)\n                delete this clone\n            end\n        end\n    end\nend\n\ndefine splash\nrepeat (25)\n    switch costume to (pick random (3) to (8))\n    create clone of (_myself_ v)\nend\nswitch costume to (1 v)\n\nwhen flag clicked\nset [? v] to [0]\ngo to x: (0) y: (0)\npoint in direction (90)\nset size to (10) %\nswitch costume to (1 v)\nstart sound [Jensation - Delicious \[NCS Release\]2 v]\nreset timer\nset [s v] to [0]\nshow\nset [costume v] to [1]\ncreate clone of (_myself_ v)\nwait () seconds\nsplash\nrepeat until <(timer) > [1]>\n    set [s v] to (((s) * (0.75)) + (((90) - (size)) * (0.3)))\n    change size by (s)\nend\nset [x3 v] to [0]\nswitch costume to (1 v)\nrepeat (10)\n    change [x3 v] by (-5)\n    change x by (x3)\n    turn left (((-90) - (direction)) / (-6)) degrees\nend\ngo to x: (455) y: (0)\nrepeat until <(round (x position)) = [0]>\n    change x by (((0) - (x position)) / (5))\n    turn left (((90) - (direction)) / (-6)) degrees\nend\nset [s v] to [0]\npoint in direction (90)\nwait until <(timer) > [5]>\npoint in direction (-90)\nsplash\nsplash\nrepeat (46)\n    set [s v] to (((s) * (0.75)) + (((90) - (direction)) * (0.3)))\n    turn right (s) degrees\nend\nbroadcast (メッセージ1 v)\n\nwhen I receive [メッセージ1 v]\ngo to [back v] layer\nrepeat (2)\n    change [costume v] by (1)\n    create clone of (_myself_ v)\n    wait () seconds\nend\nwait (1) seconds\nhide\n\n@サムネ\n\nwhen flag clicked\nshow\nforever\n    go to [front v] layer\n    set [ghost v] effect to (100)\nend\n\n@クリア\n\ndefine ステージ配置 (x座標) (y座標) (ステージ番号)\nswitch costume to (none v)\nset [my_x v] to (x座標)\nset [my_y v] to (y座標)\nswitch costume to ((ステージ番号) + (1))\nset [my_n v] to ((ステージ番号) + (1))\ncreate clone of (_myself_ v)\n\ndefine 移動 (x) (y)\nswitch costume to (none v)\ngo to x: (x) y: (y)\nif <<([abs v] of (x) ) > ([abs v] of (x position) )> or <([abs v] of (y) ) > ([abs v] of (y position) )>> then\n    hide\nelse\n    show\nend\nswitch costume to (My_n)\n\nwhen I receive [プログラム2 v]\nif <(costume [number v]) = [1]> then\n    broadcast (プログラム v)\nelse\n    移動 ((My_x) - (Camera_x)) ((My_y) - (Camera _y))\nend\n\nwhen I start as a clone\nshow\n\nwhen I receive [始まるお v]\nhide\nステージ配置 [7200] [30] [1]\nswitch costume to (none v)\nbroadcast (プログラム v)\n\nwhen flag clicked\nhide\n\n@スプライト3\n\nwhen flag clicked\nset [a v] to [0]\nhide\n\nwhen I receive [クリア v]\nset [a v] to [1]\ngo to x: (0) y: (0)\nshow\nset [ghost v] effect to (100)\nrepeat (10)\n    change [ghost v] effect by (-10)\nend\n\n@スプライト4\n\nwhen I start as a clone\nswitch costume to (コスチューム1 v)\nshow\ngo to x: (240) y: (pick random (200) to (-200))\npoint in direction (pick random (-70) to (-110))\nset size to (pick random (5) to (10)) %\nset [ghost v] effect to (pick random (50) to (60))\nrepeat until <(x position) < [-230]>\n    move ((size) / (2)) steps\nend\nhide\ndelete this clone\n\nwhen I receive [始まるお v]\nhide\ngo to [back v] layer\nforever\n    wait (pick random (0.05) to (0.2)) seconds\n    create clone of (_myself_ v)\nend\n\nwhen flag clicked\nhide\n\n@チェックポイント2\n\nwhen flag clicked\nset [チェックポイント到達 v] to [0]\nswitch costume to (a v)\nhide\n\nwhen I receive [プログラム2 v]\n移動 ((1900) - (Camera_x)) ((-20) - (Camera _y))\n\ndefine 移動 (x) (y)\nswitch costume to (none v)\ngo to x: (x) y: (y)\nswitch costume to ((チェックポイント到達) + (2))\nif <<([abs v] of (x) ) > ([abs v] of (x position) )> or <([abs v] of (y) ) > ([abs v] of (y position) )>> then\n    hide\nelse\n    show\n    go to [back v] layer\n    if <<touching (player v)?> and <(チェックポイント到達) = [0]>> then\n        broadcast (チェックポイント v)\n        set [チェックポイント到達 v] to [1]\n        set [復活x v] to [1890]\n        set [復活y v] to [-10]\n    end\nend\nswitch costume to ((チェックポイント到達) + (2))\n\n@チェックポイント3\n\nwhen flag clicked\nset [チェックポイント到達 v] to [0]\nswitch costume to (a v)\nhide\n\nwhen I receive [プログラム2 v]\n移動 ((3910) - (Camera_x)) ((-20) - (Camera _y))\n\ndefine 移動 (x) (y)\nswitch costume to (none v)\ngo to x: (x) y: (y)\nswitch costume to ((チェックポイント到達) + (2))\nif <<([abs v] of (x) ) > ([abs v] of (x position) )> or <([abs v] of (y) ) > ([abs v] of (y position) )>> then\n    hide\nelse\n    show\n    go to [back v] layer\n    if <<touching (player v)?> and <(チェックポイント到達) = [0]>> then\n        broadcast (チェックポイント v)\n        set [チェックポイント到達 v] to [1]\n        set [復活x v] to [3910]\n        set [復活y v] to [-30]\n    end\nend\nswitch costume to ((チェックポイント到達) + (2))\n\n@Particle\n\nwhen I start as a clone\ngo to [front v] layer\nclear graphic effects\nset size to (pick random (45) to (70)) %\nset [brightness v] effect to (pick random (0) to (100))\nshow\ngo to x: (0) y: (0)\nset [x v] to (pick random (-16.) to (16.))\nset [y v] to (pick random (-15.) to (15.))\nset [i v] to (pick random (-10.) to (-10.))\nrepeat (80)\n    change x by (x)\n    set [x v] to ((x) * (.94))\n    change y by (y)\n    set [y v] to ((y) * (.94))\n    turn right (i) degrees\n    set [i v] to ((i) * (.9))\n    change size by (-1)\n    change [ghost v] effect by (2)\nend\ndelete this clone\n\ndefine Particle\nrepeat (35)\n    switch costume to (◯ v)\n    create clone of (_myself_ v)\nend\n\nwhen flag clicked\nhide\n\nwhen I receive [チェックポイント v]\nParticle\n\n@宣伝\n\nwhen flag clicked\nhide\n\nwhen I receive [始まるお v]\nforever\n    wait (pick random (8) to (10)) seconds\n    if <(a) = [0]> then\n        show\n        start sound (pick random (1) to (6))\n        パターン (pick random (1) to (4))\n        hide\n    end\nend\n\ndefine パターン (　)\nif <(　) = [1]> then\n    clear graphic effects\n    set size to (100) %\n    go to x: (-300) y: (130)\n    point in direction (0)\n    repeat (50)\n        change x by (((-130) - (x position)) / (4))\n        turn right (((90) - (direction)) / (4)) degrees\n    end\n    repeat until <(x position) < [-280]>\n        change x by (((x position) - (-129)) / (4))\n        turn right (((direction) - (91)) / (4.8)) degrees\n    end\nend\nif <(　) = [2]> then\n    clear graphic effects\n    set size to (100) %\n    go to x: (130) y: (200)\n    point in direction (90)\n    repeat (50)\n        change y by (((130) - (y position)) / (4))\n    end\n    repeat until <[300] < (x position)>\n        change x by (((x position) - (129)) / (4))\n    end\nend\nif <(　) = [3]> then\n    clear graphic effects\n    set size to (0) %\n    go to x: (-300) y: (-300)\n    point in direction (90)\n    repeat (50)\n        change [bounce v] by ((((50) - (Bounce)) / (4)) + (((50) - (size)) / (4)))\n        change size by (Bounce)\n        change x by (((-130) - (x position)) / (4))\n        change y by (((-130) - (y position)) / (4))\n    end\n    repeat (10)\n        change [ghost v] effect by (10)\n    end\nend\nif <(　) = [4]> then\n    clear graphic effects\n    set size to (100) %\n    go to x: (130) y: (-130)\n    point in direction (90)\n    set [ghost v] effect to (100)\n    set [bounce v] to [0.01]\n    repeat (50)\n        change [bounce v] by (0.08)\n        go to x: ((130) + ((Bounce) * (pick random (1) to (-1)))) y: ((-130) + ((Bounce) * (pick random (1) to (-1))))\n        point in direction ((90) + ((Bounce) * (pick random (2) to (-2))))\n        change [ghost v] effect by (-2.5)\n    end\n    repeat (10)\n        change [bounce v] by (0.08)\n        go to x: ((130) + ((Bounce) * (pick random (1) to (-1)))) y: ((-130) + ((Bounce) * (pick random (1) to (-1))))\n        point in direction ((90) + ((Bounce) * (pick random (2) to (-2))))\n        change [ghost v] effect by (10)\n    end\nend\n\n