Plains ~Scroll Platformer~

Instructions: ～操作～\n・PC\n十字キーで操作\n\n・モバイル\n画面をタップで移動\n\nステージは短いです\n旗はチェックポイントです

@Stage\n\nwhen I receive [始まるお v]\nswitch backdrop to (背景1 v)\nforever\n    play sound [RetroVision - Puzzle _NCS Release_ 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)\n    if <<(Y) < [-500]> or <touching (障害物 v)?>> then\n    end\n    if <touching (チェックポイント v)?> then\n        set [復活x v] to (Camera_x)\n        set [復活y v] to (Camera _y)\n    end\nend\n処理\nbroadcast (プログラム2 v)\n\nwhen I receive [プログラム v]\n動作\n\ndefine 処理\nchange [x v] by ((x position) - ((X) - (Camera_x)))\nchange [y v] by ((y position) - (((Y) - (Camera _y)) - (20)))\nchange [camera_x v] by ([floor v] of (((X) - (Camera_x)) * (0.1)) )\nchange [camera _y v] by ([floor v] of (((Y) - (Camera _y)) * (0.2)) )\nset x to ((X) - (Camera_x))\nset y to (((Y) - (Camera _y)) - (20))\n\ndefine 位置補正x (向き) (回数)\nif <(xの力) = [0]> then\n    stop [this script v]\nend\nset [i v] to [0]\nrepeat until <<not <touching (ステージ v)?>> or <(i) = ((回数) + (1))>>\n    change [i v] by (1)\n    change x by (向き)\nend\nchange x by (() - ((向き) * (((回数) + (1)) * <<(i) = ((回数) + (1))> and <touching (ステージ v)?>>)))\n\ndefine 位置補正y (向き) (回数)\nif <(yの力) = [0]> then\n    stop [this script v]\nend\nset [i v] to [0]\nrepeat until <<not <touching (ステージ v)?>> or <(i) = ((回数) + (1))>>\n    change [i v] by (1)\n    change y by (向き)\nend\nchange y by (() - ((向き) * (((回数) + (1)) * <<(i) = ((回数) + (1))> and <touching (ステージ v)?>>)))\nset [yの力 v] to [0]\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]\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\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]\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 <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ステージ配置 [600] [0] [1]\nステージ配置 [960] [0] [2]\nステージ配置 [1440] [0] [3]\nステージ配置 [2880] [0] [4]\nステージ配置 [3360] [0] [5]\nステージ配置 [3840] [0] [6]\nステージ配置 [4320] [0] [7]\nステージ配置 [4800] [0] [8]\nステージ配置 [5280] [0] [9]\nswitch costume to (none 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]\nset [1 v] to [0]\nhide\nステージ配置 [2400] [0] [1]\nステージ配置 [4120] [10] [1]\nswitch costume to (none v)\nbroadcast (プログラム v)\n\nwhen flag clicked\nhide\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ステージ配置 [1440] [0] [4]\nステージ配置 [1920] [0] [5]\nステージ配置 [2400] [0] [6]\nステージ配置 [4320] [0] [7]\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ステージ配置 [4800] [-50] [1]\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]) > [6]> 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 (50)\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@スプライト2\n\nwhen flag clicked\nshow\nforever\n    go to [front v] layer\n    set [ghost v] effect to (100)\nend\n\n