One Hour (a platformer) [ÐL]


@Stage\n\nwhen flag clicked\nforever\n    play sound [Monster-scratch-1 v] until done\nend\n\n@Guy\n\nwhen flag clicked\ngo to x: (-222) y: (-125)\nset [level v] to [1]\nset [x-vel v] to [0]\nset [y-vel v] to [0]\nforever\n    Frame\nend\n\ndefine Frame\nchange x by (X-vel)\nchange y by (Y-vel)\nif <[-228] > (x position)> then\n    set x to (-228)\n    set [x-vel v] to [0]\nend\nif <(x position) > [230]> then\n    go to x: (-222) y: (-125)\n    change [level v] by (1)\n    set [x-vel v] to [0]\n    set [y-vel v] to [0]\nend\nif <touching (lava v)?> then\n    go to x: (-222) y: (-125)\n    set [x-vel v] to [0]\n    set [y-vel v] to [0]\nend\nchange [y-vel v] by (-1)\nDetect costume [down] X: [0] Y: [1] go back? [yes]\nDetect costume [up] X: [0] Y: [-1] go back? [no]\nDetect costume [left] X: [1] Y: [0] go back? [yes]\nDetect costume [right] X: [-1] Y: [0] go back? [yes]\nchange [x-vel v] by ((<key (right arrow v) pressed?> - <key (left arrow v) pressed?>) * (1))\nset [y-vel v] to ((Y-vel) * (0.98))\nset [x-vel v] to ((X-vel) * (0.86))\nswitch costume to (main v)\n\ndefine Detect costume (costume) X: (x) Y: (y) go back? (yes/no)\nswitch costume to (costume)\nif <touching (ground v)?> then\n    if <(x) = [0]> then\n        set [y-vel v] to [0]\n        if <<(costume [name v]) = [down]> and <<touching (ground v)?> and <key (up arrow v) pressed?>>> then\n            change [y-vel v] by (12)\n            start sound [2 box v]\n        end\n    else\n        set [x-vel v] to [0]\n        if <key (up arrow v) pressed?> then\n            if <(costume) = [left]> then\n                if <key (left arrow v) pressed?> then\n                    set [x-vel v] to [6]\n                    set [y-vel v] to [9]\n                end\n            else\n                if <key (right arrow v) pressed?> then\n                    set [x-vel v] to [-6]\n                    set [y-vel v] to [9]\n                end\n            end\n        end\n    end\n    repeat until <not <touching (ground v)?>>\n        change x by (x)\n        change y by (y)\n    end\n    if <(yes/no) = [yes]> then\n        change x by (() - (x))\n        change y by (() - (y))\n    end\nend\n\n@Ground\n\nwhen flag clicked\ngo to x: (0) y: (0)\nforever\n    switch costume to (Level)\nend\n\n@Lava\n\nwhen flag clicked\ngo to x: (0) y: (0)\nforever\n    switch costume to (Level)\nend\n\n@Text\n\nwhen flag clicked\ngo to x: (0) y: (0)\nforever\n    go to x: (0) y: (([sin v] of (i) ) * (4))\n    change [i v] by (3)\n    switch costume to (Level)\nend\n\n@Clouds\n\nwhen flag clicked\nstart\nhide\nforever\n    wait (pick random (1) to (3.2)) seconds\n    go to x: (-300) y: (pick random (-20) to (200))\n    set [ghost v] effect to (pick random (70) to (90))\n    set size to (pick random (200) to (360)) %\n    create clone of (_myself_ v)\nend\n\nwhen I start as a clone\nshow\nrepeat until <(x position) > [250]>\n    change x by ((size) / (400))\nend\ndelete this clone\n\ndefine start\nset x to (-300)\nrepeat until <(x position) > [250]>\n    set y to (pick random (40) to (200))\n    set [ghost v] effect to (pick random (70) to (90))\n    set size to (pick random (200) to (360)) %\n    create clone of (_myself_ v)\n    change x by (pick random (20) to (80))\nend\n\n@Sprite1\n\nwhen flag clicked\ngo to x: (0) y: (0)\nswitch costume to (costume1 v)\ngo to [front v] layer\nset [ghost v] effect to (100)\n\n