scratch cat platformer

Instructions: ◀︎日本語説明▶︎\n-----操作方法-----\n･移動…十字キー、マウス\n･ジャンプ…十字キーの▲、マウス(プレイヤーの上辺り\n-----障害物-----\n･棘\n･敵\n･鉄球\n･落下ﾀﾋなど\n-----------------------------------------------------------------\n◀ ︎ English explanation▶︎\n-----Method of operation-----\n･ Move ... Cross key, mouse\n･ Jump ... Cross key ▲, mouse (above the player)\n-----Obstacle-----\n·thorn\n·enemy\n･ Iron ball\n･ Falling Tahi etc.

@Stage\n\nwhen flag clicked\ndelete all of [💣x v]\ndelete all of [💣y v]\nforever\n    set [ghost v] effect to (15)\nend\n\nbroadcast (敵• coinの配置 v)\nchange [ステージ v] by (1)\n\nwhen flag clicked\nset volume to (100) %\nforever\n    play sound [マップ/草原BGM v] until done\nend\n\nwhen flag clicked\nforever\n    if <(ステージ) = [16]> then\n        change volume by (-1)\n    end\nend\n\n@ネコ\n\ndefine 演出1\nshow\nclear graphic effects\ngo to [front v] layer\nswitch costume to (ネコ走る v)\npoint in direction (90)\nset rotation style [left-right v]\ngo to x: (-300) y: (-55)\nrepeat until <(round (x position)) > [-141]>\n    change x by (((-140) - (x position)) / (7))\nend\n\nwhen flag clicked\nset [ネコx v] to [0]\nset [ネコy v] to [0]\nset [ネコ動き v] to [0]\nset [ステージ v] to [1]\nbroadcast (敵• coinの配置 v)\nhide\nwait (1.5) seconds\n演出1\ncreate clone of (_myself_ v)\nforever\n    if <(ネコ動き) = [0]> then\n        switch costume to (当たり判定 v)\n        set [ghost v] effect to (100)\n        if <<<key (right arrow v) pressed?> or <key (d v) pressed?>> or <<mouse down?> and <(x position) < (mouse x)>>> then\n            point in direction (90)\n            change [ネコx v] by (0.8)\n        end\n        if <<<key (left arrow v) pressed?> or <key (a v) pressed?>> or <<mouse down?> and <(mouse x) < (x position)>>> then\n            point in direction (-90)\n            change [ネコx v] by (-0.8)\n        end\n        change x by (ネコX)\n        set [ネコx v] to ((ネコX) * (0.9))\n        if  then\n            change y by (1)\n            if  then\n                change y by (1)\n                if  then\n                    change y by (1)\n                    if  then\n                        change y by (1)\n                        if  then\n                            change y by (1)\n                            if  then\n                                change x by ((ネコX) * (-1.2))\n                                change y by (-5)\n                                if <(ネコX) > [0]> then\n                                    set [ネコx v] to [-0.1]\n                                else\n                                    set [ネコx v] to [0.1]\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n        change y by (-1)\n        if <<<key (up arrow v) pressed?> or <key (w v) pressed?>> or <<mouse down?> and <(y position) < (mouse y)>>> then\n            if <<touching (ステージ v)?> and <(ネコY) = [0]>> then\n                start sound [ネコジャンプ v]\n                set [ネコy v] to [14]\n            end\n        end\n        change y by (ネコY)\n        change [ネコy v] by (-1)\n        if <touching (ステージ v)?> then\n            change y by ((ネコY) * (-1))\n            set [ネコy v] to [0]\n        end\n        if <[235] < (x position)> then\n            start sound [ステージ移動 v]\n            set [ネコ動き v] to [1]\n            point in direction (90)\n            go to x: (-155) y: (-55)\n            change [ステージ v] by (1)\n            set [ネコ動き v] to [0]\n            set [ネコx v] to [0]\n            set [ネコy v] to [0]\n            broadcast (敵• coinの配置 v)\n        end\n        if <<<touching (棘 v)?> or <touching (回転棘 v)?>> or <<touching (振り子鉄球 v)?> or <touching (敵ネコ v)?>>> then\n            set [ネコ動き v] to [1]\n            set [ネコx v] to [0]\n            set [ネコy v] to [0]\n            start sound [ネコダメージ v]\n            set [ネコy v] to [10]\n            repeat until <(y position) < [-175]>\n                change y by (ネコY)\n                change [ネコy v] by (-1)\n            end\n            point in direction (90)\n            go to x: (-155) y: (-55)\n            set [ネコ動き v] to [0]\n            set [ネコx v] to [0]\n            set [ネコy v] to [0]\n        end\n        if <<touching (溶岩 v)?> or <(y position) < [-175]>> then\n            set [ネコ動き v] to [1]\n            set [ネコx v] to [0]\n            set [ネコy v] to [0]\n            start sound [ネコダメージ v]\n            point in direction (90)\n            go to x: (-155) y: (-55)\n            set [ネコ動き v] to [0]\n        end\n    end\nend\n\nwhen I start as a clone\nforever\n    point in direction ([direction v] of [ネコ v])\n    go to x: ([x position v] of [ネコ v]) y: ([y position v] of [ネコ v])\n    if <not <(ステージ) = [16]>> then\n        if <(ネコ動き) = [0]> then\n            if <touching (ステージ v)?> then\n                switch costume to (ネコ走る v)\n            else\n                switch costume to (ネコジャンプ v)\n            end\n        else\n            switch costume to (ネコダメージ v)\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <(ステージ) = [16]> then\n        broadcast (削除 v)\n        set [ネコ動き v] to [1]\n        show\n        clear graphic effects\n        go to [front v] layer\n        switch costume to (ネコ走る v)\n        point in direction (90)\n        set rotation style [left-right v]\n        go to x: (-300) y: (-55)\n        repeat until <(round (x position)) > [-141]>\n            change x by (((-140) - (x position)) / (7))\n        end\n        wait (0) seconds\n        switch costume to (ネコ走る v)\n        repeat until <[235] < (x position)>\n            change x by (ネコX)\n            set [ネコx v] to ((0.9) * (ネコX))\n            change [ネコx v] by (0.8)\n        end\n        hide\n        wait (0.8) seconds\n        broadcast (クリア v)\n        stop [this script v]\n    end\nend\n\nwhen I receive [削除 v]\ndelete this clone\n\nwhen [timer v] > (0)\ngo to [back v] layer\n\nchange [ステージ v] by (13)\n\n@ステージ\n\nwhen flag clicked\nforever\n    go to x: (0) y: (0)\n    switch costume to (ステージ)\nend\n\nwhen flag clicked\nclear graphic effects\n\n@木\n\nwhen flag clicked\nforever\n    go to x: (0) y: (0)\n    switch costume to (ステージ)\n    go to [back v] layer\nend\n\n@溶岩\n\nwhen flag clicked\ngo to x: (0) y: (0)\nforever\n    switch costume to (ステージ)\n    go to [back v] layer\nend\n\nwhen flag clicked\nforever\n    repeat (50)\n        change y by (0.2)\n    end\n    repeat (50)\n        change y by (-0.2)\n    end\nend\n\n@棘\n\nwhen flag clicked\nforever\n    go to x: (0) y: (0)\n    switch costume to (ステージ)\n    go to [back v] layer\nend\n\nwhen flag clicked\nforever\n    repeat (30)\n        change [brightness v] effect by (0.5)\n    end\n    repeat (30)\n        change [brightness v] effect by (-0.5)\n    end\nend\n\n@バネ\n\nwhen flag clicked\nforever\n    if <(ネコ動き) = [0]> then\n        if <<touching (ネコ v)?> and <[0] > (ネコY)>> then\n            start sound [バネ v]\n            switch costume to (バネ1 v)\n            repeat (3)\n                next costume\n            end\n            wait (0) seconds\n            repeat (3)\n                switch costume to ((costume [number v]) - (1))\n            end\n            wait until <not <touching (ネコ v)?>>\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <(ネコ動き) = [0]> then\n        if <<touching (ネコ v)?> and <[0] > (ネコY)>> then\n            if <<key (up arrow v) pressed?> or <<mouse down?> and <(y position) < (mouse y)>>> then\n                set [ネコy v] to [18]\n            else\n                set [ネコy v] to [15]\n            end\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <<<(ステージ) = [3]> or <(ステージ) = [5]>> or <<(ステージ) = [11]> or <(ステージ) = [13]>>> then\n        show\n    else\n        hide\n    end\n    if <(ステージ) = [3]> then\n        go to x: (-70) y: (-65)\n    end\n    if <(ステージ) = [5]> then\n        go to x: (40) y: (-65)\n    end\n    if <(ステージ) = [11]> then\n        go to x: (180) y: (-65)\n    end\n    if <(ステージ) = [13]> then\n        go to x: (-105) y: (-65)\n    end\nend\n\n@回転棘\n\nwhen flag clicked\nforever\n    turn right (1.5) degrees\nend\n\nwhen flag clicked\ngo to [front v] layer\nforever\n    if <<(ステージ) = [5]> or <<(ステージ) = [10]> or <(ステージ) = [13]>>> then\n        show\n    else\n        hide\n    end\n    if <(ステージ) = [5]> then\n        go to x: (170) y: (15)\n    end\n    if <(ステージ) = [10]> then\n        go to x: (140) y: (-65)\n    end\n    if <(ステージ) = [13]> then\n        go to x: (0) y: (250)\n    end\nend\n\n@振り子鉄球\n\nwhen I start as a clone\npoint in direction (180)\nset [振り子鉄球 v] to [3]\nforever\n    show\n    go to [back v] layer\n    change [振り子鉄球 v] by (([sin v] of (direction) ) * (0.25))\n    turn right (振り子鉄球) degrees\nend\n\nwhen I receive [敵• coinの配置 v]\ndelete this clone\n\nwhen I receive [敵• coinの配置 v]\nwait (0) seconds\nif <(ステージ) = [8]> then\n    go to x: (190) y: (140)\n    create clone of (_myself_ v)\n    go to x: (0) y: (140)\n    create clone of (_myself_ v)\nend\nif <(ステージ) = [11]> then\n    go to x: (-20) y: (150)\n    create clone of (_myself_ v)\nend\n\nbroadcast (敵• coinの配置 v)\nchange [ステージ v] by (1)\n\n@敵ネコ\n\nwhen I start as a clone\nset [敵ネコx v] to [0]\nset [敵ネコy v] to [0]\nset [敵ネコ動き v] to [0]\nshow\nclear graphic effects\nset size to (60) %\ngo to [front v] layer\nswitch costume to (1 v)\nforever\n    if <(敵ネコ動き) = [0]> then\n        change x by (敵ネコX)\n        set [敵ネコx v] to ((敵ネコX) * (0.9))\n        if  then\n            change y by (1)\n            if  then\n                change y by (1)\n                if  then\n                    change y by (1)\n                    if  then\n                        change y by (1)\n                        if  then\n                            change y by (1)\n                            if  then\n                                change x by ((敵ネコX) * (-1.2))\n                                change y by (-5)\n                                if <(敵ネコX) > [0]> then\n                                    set [敵ネコx v] to [-1]\n                                else\n                                    set [敵ネコx v] to [1]\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n        change y by (-1)\n        change y by (敵ネコY)\n        change [敵ネコy v] by (-1)\n        if <touching (ステージ v)?> then\n            change y by ((敵ネコY) * (-1))\n            set [敵ネコy v] to [0]\n        end\n    end\nend\n\nwhen I start as a clone\n\n    repeat (35)\n        point in direction (-90)\n        change [敵ネコx v] by (-0.5)\n    end\n    repeat (35)\n        point in direction (90)\n        change [敵ネコx v] by (0.5)\n    end\nend\n\nwhen I receive [敵• coinの配置 v]\ndelete this clone\n\nwhen I receive [敵• coinの配置 v]\nwait (0) seconds\nif <(ステージ) = [14]> then\n    go to x: (80) y: (40)\n    create clone of (_myself_ v)\nend\n\nwhen flag clicked\nhide\n\n@クリア\n\nwhen I receive [クリア v]\nshow\nset [ghost v] effect to (100)\ngo to x: (0) y: (200)\nrepeat until <(y position) < [6]>\n    change y by (((5) - (y position)) / (7))\n    change [ghost v] effect by (-5)\nend\nrepeat until <[199] < (y position)>\n    change y by (((200) - (y position)) / (7))\n    change [ghost v] effect by (5)\nend\nhide\nstop [all v]\n\n@サムネイル\n\nwhen flag clicked\nforever\n    set [ghost v] effect to (100)\nend\n\n@スプライト1\n\nwhen flag clicked\nshow\nforever\n    go to x: (0) y: (0)\n    set [ghost v] effect to (100)\n    go to [front v] layer\nend\n\nwhen flag clicked\nforever\n    reset timer\nend\n\nwhen [timer v] > (0)\nset [ghost v] effect to (0)\n\n