2.5D! Fog | A Platformer
@Stage\n\nwhen I receive [スタート v]\nset [time v] to [0]\nrepeat until <(ステージ番号) = [10]>\n    wait (1) seconds\n    change [time v] by (1)\nend\nset [ゴールした？ v] to [1]\nbroadcast (タイム表示 v)\n\nwhen I receive [スタート v]\nforever\n    play sound [Beave - Talk \[NCS Release\] v] until done\nend\n\nwhen I receive [introend v]\nbroadcast (スタート v)\n\nwhen I receive [スタート v]\nforever\n    set [brightness v] effect to (背景明るさ)\nend\n\n@地形\n\nwhen I receive [スタート v]\nforever\n    set [brightness v] effect to ((背景明るさ) * (-1))\nend\n\nwhen I receive [ステージ切り替え v]\nchange [ステージ番号 v] by (1)\npoint in direction (90)\ngo to x: (0) y: (0)\nnext costume\nif <(ステージ番号) = [5]> then\n    wait until <[0] > ([x position v] of [プレイヤー v])>\n    wait until <([x position v] of [プレイヤー v]) > [0]>\n    repeat (10)\n        change y by (-10)\n    end\nend\nif <(ステージ番号) = [6]> then\n    wait until <[0] > ([x position v] of [プレイヤー v])>\n    wait until <([x position v] of [プレイヤー v]) > [0]>\n    set rotation style [all around v]\n    repeat until <(動いてよろしい?) = [0]>\n        turn right (0.1) degrees\n    end\nend\nif <<(ステージ番号) = [7]> or <(ステージ番号) = [8]>> then\n    wait until <[0] > ([x position v] of [プレイヤー v])>\n    wait until <([x position v] of [プレイヤー v]) > [0]>\n    set rotation style [all around v]\n    repeat until <(動いてよろしい?) = [0]>\n        move (1) steps\n        turn right (0.1) degrees\n    end\nend\nif <(ステージ番号) = [9]> then\n    wait until <[0] > ([x position v] of [プレイヤー v])>\n    wait until <([x position v] of [プレイヤー v]) > [0]>\n    next costume\n    start sound [剣で打ち合う3 v]\nend\n\nwhen I receive [スタート v]\nswitch costume to (1 v)\nset [ステージ番号 v] to [1]\nステージ生成\n\nwhen flag clicked\npoint in direction (90)\ngo to x: (0) y: (0)\nerase all\nhide\n\ndefine ステージ生成\nshow\nerase all\nset size to (50) %\nchange [brightness v] effect by (-10)\nrepeat (49)\n    stamp\n    change size by (1)\nend\nset [brightness v] effect to ((背景明るさ) * (-1))\nchange size by (1)\nset size to (100) %\nstamp\n\nwhen I receive [スタート v]\nforever\n    ステージ生成\nend\n\nwhen I receive [死 v]\nwait (0.1) seconds\npoint in direction (90)\nglide (0.5) secs to x: (0) y: (0)\npoint in direction (90)\nif <(ステージ番号) = [5]> then\n    wait until <[0] > ([x position v] of [プレイヤー v])>\n    wait until <([x position v] of [プレイヤー v]) > [0]>\n    repeat (10)\n        change y by (-10)\n    end\nend\nif <(ステージ番号) = [6]> then\n    wait until <[0] > ([x position v] of [プレイヤー v])>\n    wait until <([x position v] of [プレイヤー v]) > [0]>\n    set rotation style [all around v]\n    repeat until <(動いてよろしい?) = [0]>\n        turn right (0.1) degrees\n    end\nend\nif <<(ステージ番号) = [7]> or <(ステージ番号) = [8]>> then\n    wait until <[0] > ([x position v] of [プレイヤー v])>\n    wait until <([x position v] of [プレイヤー v]) > [0]>\n    set rotation style [all around v]\n    repeat until <(動いてよろしい?) = [0]>\n        move (1) steps\n        turn right (0.1) degrees\n    end\nend\nif <(ステージ番号) = [9]> then\n    wait until <[0] > ([x position v] of [プレイヤー v])>\n    wait until <([x position v] of [プレイヤー v]) > [0]>\n    next costume\n    start sound [剣で打ち合う3 v]\nend\n\n@Intro\n\ndefine Shock wave\nset pen color to (#ffffff)\nset [list 保存 v] to [0]\nrepeat (length of [shock wave1\[intro\] v])\n    set [sin v] to [0]\n    change [list 保存 v] by (1)\n    if <[0] = (round (item (List 保存) of [shock wave4\[intro\] v]))> then\n        delete (List 保存) of [shock wave1\[intro\] v]\n        delete (List 保存) of [shock wave2\[intro\] v]\n        delete (List 保存) of [shock wave3\[intro\] v]\n        delete (List 保存) of [shock wave4\[intro\] v]\n    else\n        repeat (50)\n            set pen (transparency v) to ((item (List 保存) of [shock wave1\[intro\] v]) - (125))\n            set pen size to (item (List 保存) of [shock wave4\[intro\] v])\n            change [sin v] by (0.01)\n            go to x: ((([sin v] of ((Sin) * (1500)) ) * (item (List 保存) of [shock wave1\[intro\] v])) + (item (List 保存) of [shock wave2\[intro\] v])) y: ((([cos v] of ((Sin) * (1500)) ) * (item (List 保存) of [shock wave1\[intro\] v])) + (item (List 保存) of [shock wave3\[intro\] v]))\n            pen down\n        end\n        replace item (List 保存) of [shock wave4\[intro\] v] with ((item (List 保存) of [shock wave4\[intro\] v]) + (((0) - (item (List 保存) of [shock wave4\[intro\] v])) / (10)))\n        replace item (List 保存) of [shock wave1\[intro\] v] with ((item (List 保存) of [shock wave1\[intro\] v]) + ((item (List 保存) of [shock wave4\[intro\] v]) / (8)))\n        pen up\n    end\nend\npen up\n\ndefine Shock wave add list (s) (x) (y) (h)\nadd (s) to [shock wave1\[intro\] v]\nadd (x) to [shock wave2\[intro\] v]\nadd (y) to [shock wave3\[intro\] v]\nadd (h) to [shock wave4\[intro\] v]\n\ndefine Textを描画\nif <[99] < (item (4) of [text cam v])> then\n    switch costume to (ae v)\nelse\n    switch costume to (text1 v)\nend\npoint in direction (item (3) of [text cam v])\ngo to x: (item (1) of [text cam v]) y: (item (2) of [text cam v])\nset size to (item (4) of [text cam v]) %\nswitch costume to ((item (6) of [text cam v]) + (1))\nset [ghost v] effect to (item (5) of [text cam v])\nstamp\nwait (0) seconds\nswitch costume to (ae v)\nset size to ((1) / ()) %\nreplace item (4) of [text cam v] with ((((100) - (item (4) of [text cam v])) / (5)) + (item (4) of [text cam v]))\nif <[7] > (timer)> then\n    replace item (1) of [text cam v] with (([sin v] of ((timer) * (750)) ) * (((item (4) of [text cam v]) - (100)) / (2)))\n    replace item (2) of [text cam v] with (([sin v] of ((timer) * (750)) ) * (((item (4) of [text cam v]) - (100)) / (2)))\nend\nif <[7] < (timer)> then\n    change [color v] effect by (5)\nend\n\nwhen I receive [intro start v]\nplay sound [Pierce Fulton - Losing You \[Premiere\] v] until done\nwait (1) seconds\nbroadcast (introend v)\n\ndefine Line\nset [list 保存 v] to [0]\nset pen color to (#ffffff)\nrepeat (length of [line id v])\n    change [list 保存 v] by (1)\n    replace item (List 保存) of [line x v] with ((item (List 保存) of [line x v]) + ((item (List 保存) of [line spd v]) * (item (List 保存) of [line id v])))\n    set pen size to (20)\n    set x to (item (List 保存) of [line x v])\n    repeat (35)\n        set y to ((([cos v] of ((item (List 保存) of [line sin v]) * ((item (List 保存) of [line spd v]) * (11))) ) * (item (List 保存) of [line z v])) + (item (List 保存) of [line y v]))\n        pen down\n        change x by ((5) * (item (List 保存) of [line id v]))\n        replace item (List 保存) of [line sin v] with ((item (List 保存) of [line sin v]) + (0.05))\n        pen up\n    end\n    if <<[-480] > (item (List 保存) of [line x v])> or <[480] < (item (List 保存) of [line x v])>> then\n        delete (List 保存) of [line id v]\n        delete (List 保存) of [line x v]\n        delete (List 保存) of [line y v]\n        delete (List 保存) of [line spd v]\n        delete (List 保存) of [line z v]\n        delete (List 保存) of [line sin v]\n    end\nend\npen up\n\ndefine Line add list (id) (x) (y) (z) (spd)\nadd (id) to [line id v]\nadd (x) to [line x v]\nadd (y) to [line y v]\nadd (z) to [line z v]\nadd (spd) to [line spd v]\nadd [0] to [line sin v]\n\nwhen flag clicked\ndelete all of [text cam v]\nadd [0] to [text cam v]\nadd [0] to [text cam v]\nadd [90] to [text cam v]\nadd [0] to [text cam v]\nadd [0] to [text cam v]\nadd [1] to [text cam v]\n\nwhen I receive [intro start v]\nwait (2) seconds\nLine add list [-1] [300] [50] [40] [20]\nLine add list [1] [-300] [-50] [40] [20]\nLine add list [1] [-300] [100] [40] [20]\nLine add list [-1] [300] [-100] [40] [20]\nShock wave add list [0] [0] [0] [100]\nShock wave add list [25] [0] [0] [125]\nreplace item (4) of [text cam v] with ((100) + (item (4) of [text cam v]))\nwait (0.5) seconds\nShock wave add list [0] [100] [100] [100]\nShock wave add list [25] [100] [100] [125]\nShock wave add list [0] [-100] [-100] [100]\nShock wave add list [25] [-100] [-100] [125]\nreplace item (4) of [text cam v] with ((100) + (item (4) of [text cam v]))\nwait (0.5) seconds\nShock wave add list [0] [-100] [100] [100]\nShock wave add list [25] [-100] [100] [125]\nShock wave add list [0] [100] [-100] [100]\nShock wave add list [25] [100] [-100] [125]\nreplace item (4) of [text cam v] with [0]\nwait (1) seconds\nLine add list [-1] [300] [-100] [20] [20]\nLine add list [1] [-300] [100] [20] [20]\nLine add list [1] [-300] [-50] [40] [20]\nLine add list [-1] [300] [50] [40] [20]\nShock wave add list [0] [0] [0] [100]\nShock wave add list [25] [0] [0] [125]\nreplace item (4) of [text cam v] with ((100) + (item (4) of [text cam v]))\nwait (1) seconds\nLine add list [1] [-300] [-100] [40] [20]\nLine add list [-1] [300] [100] [40] [20]\nShock wave add list [0] [100] [100] [100]\nShock wave add list [25] [100] [100] [125]\nShock wave add list [0] [-100] [-100] [100]\nShock wave add list [25] [-100] [-100] [125]\nShock wave add list [0] [-100] [100] [100]\nShock wave add list [25] [-100] [100] [125]\nShock wave add list [0] [100] [-100] [100]\nShock wave add list [25] [100] [-100] [125]\nreplace item (4) of [text cam v] with ((100) + (item (4) of [text cam v]))\n\nwhen I receive [intro start v]\nset size to ((1) / ()) %\ndelete all of [line id v]\ndelete all of [line x v]\ndelete all of [line y v]\ndelete all of [line z v]\ndelete all of [line spd v]\ndelete all of [line sin v]\ndelete all of [shock wave2\[intro\] v]\ndelete all of [shock wave3\[intro\] v]\ndelete all of [shock wave4\[intro\] v]\ndelete all of [shock wave1\[intro\] v]\n\nwhen I receive [intro start v]\nforever\n    erase all\n    BG\n    Textを描画\n    Shock wave\n    Line\n    Lights\nend\n\nwhen I receive [intro start v]\nreset timer\nwait until <[7.001] < (timer)>\nset [spd v] to [0]\nrepeat (50)\n    replace item (2) of [text cam v] with ((SPD) + (item (2) of [text cam v]))\n    replace item (3) of [text cam v] with (((SPD) / (-12)) + (item (3) of [text cam v]))\n    replace item (5) of [text cam v] with ((5) + (item (5) of [text cam v]))\n    change [spd v] by (-2)\nend\n\ndefine BG\ngo to x: (0) y: (0)\nset pen color to (#000000)\nset pen (transparency v) to (item (5) of [text cam v])\nset pen size to (item (1) of [bg v])\npen down\nrepeat (10)\npen up\nif <[7] > (timer)> then\n    replace item (1) of [bg v] with ((((600) - (item (1) of [bg v])) / (18)) + (item (1) of [bg v]))\nelse\n    replace item (1) of [bg v] with ((((0) - (item (1) of [bg v])) / (10)) + (item (1) of [bg v]))\nend\n\ndefine Lights\ngo to x: (0) y: (-360)\nset [list 保存 v] to [75]\nset pen size to ((item (1) of [bg v]) / (600))\nset pen color to (#000000)\nset pen (transparency v) to (90)\nrepeat (10)\n    pen down\n    repeat (1)\n        change [list 保存 v] by (1)\n        change pen size by ((item (1) of [bg v]) / (6))\n    end\n    set pen (transparency v) to ((List 保存) + (item (5) of [text cam v]))\nend\npen up\ngo to x: (0) y: (240)\nset [list 保存 v] to [75]\nset pen size to ((item (1) of [bg v]) / (600))\nset pen color to (#ffffff)\nset pen (transparency v) to (60)\nrepeat (10)\n    repeat (1)\n        pen down\n        change [list 保存 v] by (1)\n        change pen size by ((item (1) of [bg v]) / (6))\n    end\n    set pen (transparency v) to ((List 保存) + (item (5) of [text cam v]))\nend\npen up\n\nwhen flag clicked\ndelete all of [bg v]\nadd [0] to [bg v]\n\nwhen I receive [intro start v]\nwait until <[3] < (timer)>\nreplace item (6) of [text cam v] with [1]\nrepeat (16)\n    replace item (6) of [text cam v] with ((1) + (item (6) of [text cam v]))\nend\nreplace item (6) of [text cam v] with [1]\n\nwhen I receive [intro start v]\nwait until <[5] < (timer)>\nreplace item (6) of [text cam v] with [1]\nrepeat (16)\n    replace item (6) of [text cam v] with ((1) + (item (6) of [text cam v]))\nend\nreplace item (6) of [text cam v] with [1]\n\nwhen flag clicked\nbroadcast (Intro start v)\n\nwhen I receive [introend v]\nstop [other scripts in sprite v]\n\n@プレイヤー\n\nwhen flag clicked\nset [演出中 v] to [0]\nforever\n    if <(演出中) = [1]> then\n        set [brightness v] effect to ((背景明るさ) * (-1))\n    else\n        if <[200] > (distance to [月 v])> then\n            set [brightness v] effect to (((distance to [月 v]) - (200)) / (2))\n        else\n            set [brightness v] effect to (0)\n        end\n    end\nend\n\nwhen flag clicked\nrepeat (10)\n    hide\nend\n\nwhen I receive [スタート v]\nset [動いてよろしい? v] to [1]\ngo to [back v] layer\nshow\nset size to (100) %\nswitch costume to (player v)\nset drag mode [not draggable v]\ngo to x: (-201) y: (-50)\npoint in direction (90)\nset [ダメージハンデ v] to [0]\nset [xvel v] to [0]\nset [yvel v] to [0]\nset [now v] to [1]\nforever\n    if <(動いてよろしい?) = [1]> then\n        set rotation style [left-right v]\n        if <<<mouse down?> and <(x position) > (mouse x)>> or <key (left arrow v) pressed?>> then\n            if <(ダメージハンデ) = [0]> then\n                change [xv v] by (-0.9)\n                point in direction (-90)\n            end\n        end\n        if <<<mouse down?> and <(x position) < (mouse x)>> or <key (right arrow v) pressed?>> then\n            if <(ダメージハンデ) = [0]> then\n                change [xv v] by (0.9)\n                point in direction (90)\n            end\n        end\n        if <<<mouse down?> and <(mouse y) < (y position)>> or <key (down arrow v) pressed?>> then\n        set [xv v] to ((Xv) * (0.9))\n        change x by (Xv)\n        if <touching (地形 v)?> then\n            change y by (1)\n            if <touching (地形 v)?> then\n                change y by (1)\n                if <touching (地形 v)?> then\n                    change y by (1)\n                    if <touching (地形 v)?> then\n                        change y by (1)\n                        if <touching (地形 v)?> then\n                            change y by (1)\n                            if <touching (地形 v)?> then\n                                change x by ((Xv) * (-1))\n                                change y by (-5)\n                                if <<<<mouse down?> and <(y position) < (mouse y)>> or <key (up arrow v) pressed?>> and <(ダメージハンデ) = [0]>> then\n                                    if <(Xv) > [0]> then\n                                        set [xv v] to [-5]\n                                    else\n                                        set [xv v] to [5]\n                                    end\n                                    set [yv v] to [10]\n                                else\n                                    repeat until <not <touching (地形 v)?>>\n                                        move (-1) steps\n                                    end\n                                    set [xv v] to [0]\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n        change y by (-1)\n        if <touching (地形 v)?> then\n            if <<<mouse down?> and <(y position) < (mouse y)>> or <key (up arrow v) pressed?>> then\n                if <(ダメージハンデ) = [0]> then\n                    set [yv v] to [15]\n                end\n            end\n        end\n        change y by (1)\n        if <<touching (ふわふわ v)?> and <(Yv) < [0]>> then\n            set [yv v] to [-1]\n            change y by (-1)\n        else\n            change [yv v] by (-1)\n        end\n        change y by (Yv)\n        if <touching (地形 v)?> then\n            change y by ((Yv) * (-1))\n            set [yv v] to [0]\n        end\n        hide variable [xv v]\n        if <(x position) > [230]> then\n            set [動いてよろしい? v] to [0]\n            broadcast (next level v)\n            change [now v] by (1)\n            set [yv v] to [0]\n            set [xv v] to [0]\n        end\n        if <(y position) < [-170]> then\n            broadcast (死 v)\n            set [演出中 v] to [1]\n            start sound [指パッチン2 v]\n            set [背景明るさ v] to [100]\n            wait (0.1) seconds\n            point in direction (90)\n            glide (0.5) secs to x: (-201) y: (-50)\n            set [yv v] to [0]\n            set [xv v] to [0]\n            go to x: (-201) y: (-50)\n            repeat (10)\n                change [背景明るさ v] by (-10)\n            end\n            set [演出中 v] to [0]\n            set [動いてよろしい? v] to [1]\n            clear graphic effects\n        end\n        if <<touching (針 v)?> and <(ダメージハンデ) = [0]>> then\n            set [演出中 v] to [1]\n            set [背景明るさ v] to [100]\n            start sound [重いパンチ2 v]\n            set [ダメージハンデ v] to [10]\n            if <(Xv) < [0]> then\n                set [xv v] to [20]\n            else\n                set [xv v] to [-20]\n            end\n            wait (0.05) seconds\n            start sound [名称未設定 1 - 2022:02:19 16 v]\n            set [演出中 v] to [0]\n            set [背景明るさ v] to [0]\n        end\n    end\nend\n\nwhen I receive [ステージ切り替え v]\ngo to x: (-201) y: (-50)\n\nwhen I receive [死 v]\nset [動いてよろしい? v] to [0]\n\nwhen I receive [スタート v]\nforever\n    if <(動いてよろしい?) = [1]> then\n        if <not <(ダメージハンデ) = [0]>> then\n            set [ghost v] effect to (50)\n            change [ダメージハンデ v] by (-1)\n        else\n            set [ghost v] effect to (0)\n        end\n    end\nend\n\n@スコア\n\nwhen flag clicked\nhide\nforever\n    set [不具合防止 v] to (☁ BestTime)\nend\n\ndefine 書く (数字) X (x) Y (y) 大きさ (大きさ) 明るさ (明るさ) 透明度 (透明度) 色 (色)\nset [color v] effect to (色)\nset [書けた? v] to [0]\nhide\ngo to [front v] layer\ngo to x: (x) y: (y)\nset size to (大きさ) %\nset [brightness v] effect to (明るさ)\nset [ghost v] effect to (透明度)\nset [数字の変数 v] to [0]\nrepeat (length of (数字))\n    change [数字の変数 v] by (1)\n    switch costume to (letter (数字の変数) of (数字))\n    create clone of (_myself_ v)\n    change x by ((大きさ) / (9.5))\nend\nset [書けた? v] to [1]\n\nwhen I start as a clone\ngo to [front v] layer\nwait until <(書けた?) = [1]>\nshow\n\nwhen I receive [タイム表示 v]\nif <(☁ BestTime) > (time)> then\n    set [☁ besttime v] to (time)\nend\n書く (time) X [-150] Y [30] 大きさ [200] 明るさ [-100] 透明度 [0] 色 [0]\n書く (☁ BestTime) X [-150] Y [-30] 大きさ [200] 明るさ [-100] 透明度 [0] 色 [0]\n\nset [☁ besttime v] to [1000]\n\n@文字1\n\nwhen flag clicked\nset x to (-200)\nset y to (30)\nhide\n\nwhen I receive [タイム表示 v]\ngo to [front v] layer\nshow\n\nset [☁ best time v] to [100]\n\n@文字2\n\nwhen flag clicked\nset x to (-200)\nset y to (-30)\nhide\n\nwhen I receive [タイム表示 v]\ngo to [front v] layer\nshow\n\n@サムネ\n\nwhen flag clicked\nshow\nset [ghost v] effect to (100)\nswitch costume to (コスチューム5 v)\nforever\n    go to [front v] layer\nend\n\n@霧\n\nwhen flag clicked\nshow\nforever\n    go to [front v] layer\n    repeat (20)\n        change [ghost v] effect by (1)\n    end\n    repeat (20)\n        change [ghost v] effect by (-1)\n    end\nend\n\n@next\n\nwhen flag clicked\ngo to [front v] layer\nhide\n\nwhen I receive [next level v]\nshow\ngo to x: (465) y: (0)\nstart sound [指パッチン1 v]\nglide (0.3) secs to x: (0) y: (0)\nbroadcast (ステージ切り替え v)\nwait (0.3) seconds\nglide (0.3) secs to x: (-465) y: (0)\nhide\nset [背景明るさ v] to [0]\nset [演出中 v] to [0]\nset [動いてよろしい? v] to [1]\n\n
Move with left and right arrow keys\nJump with the up arrow key