- Clear - Platformer ( #4 )


@Stage\n\nwhen flag clicked\nforever\n    play sound [TheFatRat  Phaera - Sunlight v] until done\nend\n\n@Player\n\ndefine Spin off screen\nset rotation style [all around v]\nset [player death v] to [1]\nset [y v v] to [15]\nrepeat until <(y position) < [-178]>\n    go to [front v] layer\n    turn right (10) degrees\n    change y by (Y v)\n    change [y v v] by (-1)\nend\nset [player death v] to [0]\ngo to [back v] layer\nset rotation style [left-right v]\npoint in direction (90)\ngo [forward v] (3) layers\ngo to [front v] layer\n\nnext backdrop\n\nwhen flag clicked\ngo [forward v] (10) layers\nhide variable [☁ world record v]\nhide variable [☁ your time v]\nreset timer\nswitch costume to (1 v)\nswitch backdrop to (2 v)\nshow\nforever\n    change y by (1)\n    change [y v] by (-1)\n    if <<key (right arrow v) pressed?> or <<(mouse x) > [1]> and <mouse down?>>> then\n        change [x v] by (1)\n        point in direction (90)\n    end\n    if <<key (left arrow v) pressed?> or <<(mouse x) < [-1]> and <mouse down?>>> then\n        change [x v] by (-1)\n        point in direction (-90)\n    end\n    set [x v] to ((x) * (0.9))\n    change x by (x)\n    if <touching (ground v)?> then\n        change y by (1)\n    end\n    if <touching (ground v)?> then\n        change y by (1)\n    end\n    if <touching (ground v)?> then\n        change y by (1)\n    end\n    if <touching (ground v)?> then\n        change y by (1)\n    end\n    if <touching (ground v)?> then\n        change y by (-4)\n        change x by ((x) * (-1))\n        set [y v] to [0]\n        if <<key (up arrow v) pressed?> or <<(mouse y) > [50]> and <mouse down?>>> then\n            set [y v] to [15]\n            if <(x) > [0]> then\n                set [x v] to [-10]\n            else\n                set [x v] to [10]\n            end\n        else\n            set [y v] to [0]\n        end\n    end\n    change y by (y)\n    if <touching (ground v)?> then\n        change y by ((0) - (y))\n        set [y v] to [0]\n    end\n    change y by (-1)\n    if <<<key (up arrow v) pressed?> and <touching (ground v)?>> or <<mouse down?> and <<touching (ground v)?> and <(mouse y) > [50]>>>> then\n        start sound [ジャンプ v]\n        set [y v] to [15]\n    end\n    if <touching (spike v)?> then\n        Spin off screen\n    else\n        if <[-166] > (y position)> then\n            go to x: (-199) y: (-50)\n        end\n    end\n    if <touching color (#ffff00)?> then\n        start sound [smw_spring_jump @ToadfanSchool v]\n        set [y v] to [23]\n        broadcast (アニメーション v)\n    end\n    if <(Stage) = [9]> then\nend\n\nwhen flag clicked\nset [ghost v] effect to (70)\ngo [forward v] (3) layers\ngo to x: (-206) y: (-50)\nset rotation style [left-right v]\npoint in direction (90)\nset size to (100) %\nset [x v] to [0]\nset [y v] to [0]\nshow\n\n@Ground\n\nwhen flag clicked\nset [ghost v] effect to (80)\nshow\nswitch costume to (1 v)\ngo to x: (0) y: (0)\ngo [forward v] (5) layers\nforever\n    switch costume to (Stage)\nend\n\nwhen flag clicked\nset [stage v] to [1]\n\nwhen I receive [goal v]\nchange [stage v] by (1)\n\n@transition\n\nwhen flag clicked\nset [ghost v] effect to (50)\nhide\n\nwhen I receive [goal v]\nset [trans on or off v] to [On]\ngo [forward v] (1) layers\ngo to [front v] layer\nset x to (480)\nshow\nrepeat (6)\n    change x by (-77)\nend\nchange x by (-15)\nwait (0.6) seconds\nset [trans on or off v] to [Off]\nrepeat (5)\n    change x by (-80)\nend\nhide\n\n@演出\n\nwhen flag clicked\ngo to [back v] layer\nhide\nset [大きさ v] to [40]\nforever\n    go to x: (pick random (240) to (-240)) y: (-150)\n    wait (0.1) seconds\n    create clone of (_myself_ v)\nend\n\nwhen I start as a clone\nset size to (0) %\nshow\nset size to (pick random (0) to (大きさ)) %\nswitch costume to (pick random (1) to (3))\nset [ghost v] effect to (pick random (20) to (70))\nset [演出: 変数 v] to (pick random (1) to (10))\nrepeat until <touching (_edge_ v)?>\n    change y by (演出: 変数)\nend\ndelete this clone\n\n@Spike\n\nwhen flag clicked\nshow\nswitch costume to (コスチューム1 v)\nhide variable [☁ world record v]\nhide variable [☁ your time v]\nforever\n    set [ghost v] effect to (70)\nend\n\nwhen I receive [goal v]\nwait (0.5) seconds\nnext costume\n\n@スプライト1\n\nwhen flag clicked\nshow\nset [ghost v] effect to (100)\ngo to [front v] layer\n\n