【night】platformer 　　　#Platformer
@Stage\n\nwhen flag clicked\nswitch backdrop to (イントロ v)\n\nwhen I receive [【偽り】next v]\nif <(れべる) = [7]> then\n\nwhen I receive [next v]\nif <(れべる) = [10]> then\n\nwhen I receive [終わり v]\n\nwhen I receive [スタート v]\nswitch backdrop to (夜 v)\nforever\n    play sound [【◆BGM】WORLD 00 v] until done\nend\n\n@イントロ\n\nwhen flag clicked\npoint in direction (90)\nhide\nset [ghost v] effect to (0)\nset [動き v] to [0]\ngo to x: (0) y: (171)\nイントロ [1]\nwait (5.5) seconds\nイントロ [2]\n\ndefine イントロ (gao)\nset [動き2 v] to (gao)\ncreate clone of (_myself_ v)\n\nwhen I start as a clone\nshow\nif <(動き2) = [1]> then\n    switch costume to (コスチューム1 v)\n    repeat (30)\n        change y by (((0) - (y position)) / (5))\n    end\n    wait (0.2) seconds\n    repeat (60)\n        change [動き v] by (-15)\n        change y by ([cos v] of (動き) )\n    end\n    wait () seconds\n    repeat (30)\n        turn right (((200) - (direction)) / (10)) degrees\n    end\n    wait (0.2) seconds\n    repeat (30)\n        change x by (((-330) - (x position)) / (7))\n    end\n    hide\nend\n\nwhen I start as a clone\nshow\nif <(動き2) = [2]> then\n    switch costume to (コスチューム2 v)\n    go to x: (0) y: (171)\n    repeat (30)\n        change y by (((0) - (y position)) / (5))\n    end\n    wait (0.7) seconds\n    broadcast (スタート v)\n    repeat (30)\n        change y by (((300) - (y position)) / (5))\n    end\n    hide\nend\n\n@自分\n\nwhen I receive [next v]\n初期化\n\nwhen I receive [スタート v]\nshow\n初期化\nforever\n    if <key (down arrow v) pressed?> then\n        switch costume to (cube6 v)\n        broadcast (ランタン下 v)\n    end\n    if  then\n        change [このスプライトのx v] by (0.7)\n        if <key (down arrow v) pressed?> then\n            switch costume to (cube3 v)\n            broadcast (ランタン右下 v)\n        else\n            switch costume to (cube1 v)\n            broadcast (ランタン右 v)\n        end\n    end\n    if  then\n        change [このスプライトのx v] by (-0.7)\n        if <key (down arrow v) pressed?> then\n            switch costume to (cube4 v)\n            broadcast (ランタン左下 v)\n        else\n            switch costume to (cube2 v)\n            broadcast (ランタン左 v)\n        end\n    end\n    change x by (このスプライトのx)\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 y by (1)\n                            if <touching (地面 v)?> then\n                                change x by ((0) - (このスプライトのx))\n                                change y by (-5)\n                                if  then\n                                    if <(このスプライトのx) > [0]> then\n                                        set [このスプライトのx v] to [-6]\n                                    else\n                                        set [このスプライトのx v] to [6]\n                                    end\n                                    set [このスプライトのy v] to [12]\n                                else\n                                    set [このスプライトのx v] to [0]\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\n    set [このスプライトのx v] to ((このスプライトのx) * (0.93))\n    change [このスプライトのy v] by (-1)\n    change y by (このスプライトのy)\n    if <touching (地面 v)?> then\n        change y by ((0) - (このスプライトのy))\n        set [このスプライトのy v] to [0]\n    end\n    change y by (-2)\n    if  then\n        if <touching (地面 v)?> then\n            set [このスプライトのy v] to [15]\n        end\n    end\n    change y by (1)\n    if <<not <<(れべる) = [6]> or <<(れべる) = [7]> or <(れべる) = [8]>>>> and <(y position) < [-170]>> then\n        初期化\n    end\n    if <[220] < (x position)> then\n        broadcast (next v)\n        hide\n    end\n    if <<touching (トゲ v)?> or <<touching (まち針w v)?> or <(y position) < [-175]>>> then\n        broadcast (もう一度 v)\n    end\nend\n\ndefine 初期化\nsay []\nshow\ngo to x: (-203) y: (-30)\nswitch costume to (cube1 v)\nset size to (100) %\npoint in direction (90)\ngo to [back v] layer\ngo [backward v] <key (down arrow v) pressed?> layers\nset [このスプライトのx v] to [0]\nset [このスプライトのy v] to [0]\n\nwhen flag clicked\nhide\nset [レベル v] to [0]\n\nwhen flag clicked\nforever\n    change [ターボ v] by (1)\nend\n\nwhen flag clicked\nforever\n    set [ターボ v] to [0]\n    wait (0.001) seconds\n    if <[3] < (ターボ)> then\n        stop [all v]\n    end\nend\n\nwhen I receive [もう一度 v]\n初期化\n\nwhen flag clicked\nforever\n    if <not <<key (up arrow v) pressed?> or <key (w v) pressed?>>> then\n        wait until <<key (up arrow v) pressed?> or <key (w v) pressed?>>\n        play sound [jump v] until done\n    end\nend\n\nwhen I receive [もう一度 v]\nstart sound [Pew v]\n\nwhen I receive [ランタン右 v]\nset [ランタン向き v] to [右]\n\nwhen I receive [ランタン右下 v]\nset [ランタン向き v] to [右下]\n\nwhen I receive [ランタン左 v]\nset [ランタン向き v] to [左]\n\nwhen I receive [ランタン左下 v]\nset [ランタン向き v] to [左下]\n\nwhen I receive [ランタン下 v]\nset [ランタン向き v] to [下]\n\n@地面\n\nwhen flag clicked\nset [れべる v] to [1]\nset size to (100) %\ngo to x: (0) y: (0)\npoint in direction (90)\nswitch costume to (1 v)\nhide\n\nwhen I receive [スタート v]\nswitch costume to (1 v)\nshow\n\nwhen I receive [next v]\nchange [れべる v] by (1)\nnext costume\nwait (0.6) seconds\nif <(れべる) = [15]> then\n    broadcast (終わり v)\nend\n\nwhen I receive [【偽り】next v]\nchange [れべる v] by (1)\nnext costume\nwait (0.6) seconds\n\nwhen I receive [変形 v]\nnext costume\n\nwhen flag clicked\nhide variable [☁ 世界記録 v]\nhide variable [time v]\nset [time v] to [0]\n\nwhen I receive [スタート v]\nrepeat until <(れべる) = [10]>\n    change [time v] by (1)\n    wait (1) seconds\nend\nshow variable [time v]\nshow variable [☁ 世界記録 v]\nif <(☁ 世界記録) < (time)> then\n    set [☁ 世界記録 v] to (time)\nend\n\nwhen [timer v] > (0)\nhide variable [☁ 世界記録 v]\nhide variable [time v]\nset [time v] to [0]\n\n@トゲ\n\nwhen flag clicked\nset size to (100) %\ngo to x: (0) y: (0)\npoint in direction (90)\nswitch costume to (コスチューム2 v)\ngo to [back v] layer\nhide\n\nwhen I receive [スタート v]\nhide\n\nwhen flag clicked\nforever\n    if <(れべる) = [3]> then\n        switch costume to (1 v)\n        show\n    end\n    if <(れべる) = [4]> then\n        switch costume to (2 v)\n        show\n    end\n    if <(れべる) = [5]> then\n        switch costume to (3 v)\n        show\n    end\n    if <(れべる) = [6]> then\n        switch costume to (4 v)\n        show\n    end\n    if <(れべる) = [7]> then\n        point in direction (90)\n        go to x: (0) y: (0)\n        go to [back v] layer\n        switch costume to (5 v)\n        show\n        glide (1) secs to x: (175) y: (0)\n        glide (1) secs to x: (0) y: (0)\n    end\n    if <(れべる) = [8]> then\n        point in direction (90)\n        switch costume to (6 v)\n        point in direction (90)\n        go to x: (0) y: (0)\n        glide (1.5) secs to x: (0) y: (-110)\n        glide (1.5) secs to x: (0) y: (0)\n    end\n    if <(れべる) = [9]> then\n        point in direction (90)\n        switch costume to (7 v)\n        go to x: (157) y: (-6)\n        go to [back v] layer\n        show\n        switch costume to (7 v)\n        glide (1.55) secs to x: (-109) y: (-65)\n        glide (1.55) secs to x: (157) y: (-6)\n    end\n    if <(れべる) = [10]> then\n        hide\n    end\nend\n\nwhen I receive [終わり v]\nhide\n\nwhen flag clicked\nforever\n    if <(れべる) = [7]> then\n        turn right (10) degrees\n    end\nend\n\nwhen flag clicked\nforever\n    if <(れべる) = [9]> then\n        turn right (7) degrees\n    end\nend\n\n@透明\n\nwhen flag clicked\nhide\n\nwhen flag clicked\nforever\n    if <(れべる) = [5]> then\n        switch costume to (1 v)\n        go to x: (176) y: (-149)\n        set size to (100) %\n        set [ghost v] effect to (100)\n        show\n    end\n    if <(れべる) = [6]> then\n        switch costume to (1 v)\n        go to x: (169) y: (64)\n        set size to (100) %\n        set [ghost v] effect to (100)\n        show\n    end\n    if <(れべる) = [9]> then\n        switch costume to (1 v)\n        go to x: (146) y: (158)\n        set size to (100) %\n        set [ghost v] effect to (100)\n        show\n    end\nend\n\nhide\n\n@鍵\n\nwhen I receive [スタート v]\nhide\n\nwhen flag clicked\n\nwhen flag clicked\nset size to (30) %\ngo to x: (0) y: (0)\npoint in direction (90)\nswitch costume to (コスチューム2 v)\nhide\n\nwhen flag clicked\nforever\n    if <touching (自分 v)?> then\n        go to [front v] layer\n        go to (自分 v)\n        if <<<(れべる) = [6]> or <<(れべる) = [5]> or <(れべる) = [9]>>> and <touching (透明 v)?>> then\n            broadcast (スペースキー v)\n        else\n            broadcast (スペースキー☒ v)\n        end\n    end\nend\n\nwhen I receive [next v]\nwait (0.3) seconds\nif <(れべる) = [5]> then\n    go to x: (-75) y: (-62)\n    go to [back v] layer\n    switch costume to (1 v)\n    point in direction (60)\n    show\nend\nif <(れべる) = [6]> then\n    go to [back v] layer\n    go to x: (214) y: (-41)\n    switch costume to (1 v)\n    point in direction (60)\n    show\nend\nif <(れべる) = [9]> then\n    go to [back v] layer\n    go to x: (208) y: (66)\n    switch costume to (1 v)\n    point in direction (60)\n    show\nend\n\nwhen I receive [変形 v]\nhide\n\nwhen flag clicked\nforever\n    if <<<(れべる) = [6]> or <<(れべる) = [5]> or <(れべる) = [9]>>> and <touching (透明 v)?>> then\n        if <key (space v) pressed?> then\n            broadcast (変形 v)\n        end\n    end\nend\n\nwhen I receive [もう一度 v]\nif <(れべる) = [5]> then\n    go to x: (-75) y: (-62)\n    go to [back v] layer\n    switch costume to (1 v)\n    point in direction (60)\n    show\nend\nif <(れべる) = [6]> then\n    go to [back v] layer\n    go to x: (214) y: (-41)\n    switch costume to (1 v)\n    point in direction (60)\n    show\nend\nif <(れべる) = [9]> then\n    go to [back v] layer\n    go to x: (208) y: (66)\n    switch costume to (1 v)\n    point in direction (60)\n    show\nend\n\n@まち針w\n\nwhen flag clicked\nset size to (100) %\ngo to x: (0) y: (0)\npoint in direction (90)\nswitch costume to (コスチューム2 v)\ngo to [back v] layer\nhide\n\nwhen I receive [スタート v]\nhide\n\nwhen flag clicked\nforever\n    if <(れべる) = [7]> then\n        switch costume to (1 v)\n        show\n    end\n    if <(れべる) = [8]> then\n        switch costume to (2 v)\n        show\n    end\n    if <(れべる) = [9]> then\n        switch costume to (3 v)\n    end\n    if <(れべる) = [10]> then\n        hide\n    end\nend\n\nwhen I receive [終了 v]\nhide\n\n@暗闇\n\nwhen flag clicked\nhide\nforever\n    go to (ランタン v)\n    switch costume to (コスチューム2 v)\n    set size to (125) %\n    switch costume to (コスチューム1 v)\nend\n\nwhen flag clicked\nwait (0.1) seconds\ngo to [front v] layer\n\nwhen I receive [終了 v]\nhide\n\nwhen I receive [スタート v]\nrepeat until <(れべる) = [10]>\n    show\nend\nhide\n\n@ランタン\n\nwhen I receive [ランタン左 v]\nforever\n\nwhen flag clicked\nhide\n\nwhen I receive [スタート v]\nshow\nforever\n    go to [front v] layer\n    if <(ランタン向き) = [右]> then\n        go to (自分 v)\n        switch costume to (ランタン v)\n    end\n    if <(ランタン向き) = [右下]> then\n        go to (自分 v)\n        switch costume to (ランタン2 v)\n    end\n    if <(ランタン向き) = [左]> then\n        go to (自分 v)\n        switch costume to (ランタン3 v)\n    end\n    if <(ランタン向き) = [左下]> then\n        go to (自分 v)\n        switch costume to (ランタン4 v)\n    end\n    if <(ランタン向き) = [下]> then\n        go to (自分 v)\n        switch costume to (ランタン5 v)\n    end\nend\n\nwhen [timer v] > (0)\nhide\n\n@サムネイル\n\nwhen flag clicked\nhide\nforever\n    reset timer\nend\n\nwhen [timer v] > (0)\ngo to x: (0) y: (0)\nshow\n\n
夜になった！早く家に帰らないと！！\n\n矢印キー　WASDキーで操作\nしゃがむことも可能です\nクラウド変数を使ってみました！