Droppy's Platformer Demo
@Stage\n\nwhen I receive [level 9 v]\nswitch backdrop to (background9 v)\n\nwhen I receive [level 6 v]\nswitch backdrop to (background6 v)\n\nwhen I receive [level 5 v]\nswitch backdrop to (background5 v)\n\nwhen I receive [level 4 v]\nswitch backdrop to (background4 v)\n\nwhen I receive [level 3 v]\nswitch backdrop to (background3 v)\n\nwhen I receive [level 2 v]\nswitch backdrop to (background2 v)\n\nwhen flag clicked\nswitch backdrop to (background1 v)\n\nwhen I receive [level 7 v]\nswitch backdrop to (background7 v)\n\nwhen I receive [level 8 v]\nswitch backdrop to (background8 v)\n\nwhen I receive [level 10 v]\nswitch backdrop to (background10 v)\n\n@Sprite1\n\nwhen I receive [level 9 v]\nswitch costume to (costume6 v)\n\nwhen I receive [level 5 v]\nswitch costume to (costume5 v)\n\nwhen I receive [level 4 v]\nswitch costume to (costume4 v)\n\nwhen I receive [level 3 v]\nswitch costume to (costume3 v)\n\nwhen I receive [level 2 v]\nswitch costume to (costume2 v)\n\nwhen I receive [level 10 v]\nswitch costume to (costume7 v)\n\nwhen flag clicked\nswitch costume to (costume1 v)\n\n@Droppy\n\nwhen I receive [level 9 v]\ngo to x: (-197) y: (-129)\n\nwhen I receive [level 7 v]\ngo to x: (-193) y: (-127)\n\nwhen I receive [level 6 v]\ngo to x: (-193) y: (-127)\n\nwhen I receive [level 5 v]\ngo to x: (-193) y: (-127)\n\nwhen I receive [level 4 v]\ngo to x: (-193) y: (-127)\n\nwhen I receive [you haz died v]\ngo to x: (-193) y: (-127)\n\nwhen I receive [level 3 v]\ngo to x: (-193) y: (-127)\n\nwhen I receive [level 2 v]\ngo to x: (-197) y: (-129)\n\nwhen flag clicked\nset size to (100) %\nshow\ngo to x: (-156) y: (-120)\nset [xvel v] to [0]\nset [yvel v] to [0]\nforever\n    set [touch x? v] to [0]\n    set [xvel v] to ((xvel) * (0.8))\n    change x by (xvel)\n    if <touching (sprite1 v)?> then\n        set [touch x? v] to [1]\n    end\n    if <(touch x?) = [1]> then\n        if <<touching (sprite1 v)?> and <(xvel) < [0]>> then\n            change y by (((-1) * (xvel)) / (2))\n            if <touching (sprite1 v)?> then\n                change y by (((-1) * (xvel)) / (2))\n                if <touching (sprite1 v)?> then\n                    change y by (((-1) * (xvel)) / (2))\n                    if <touching (sprite1 v)?> then\n                        change y by ((-1) * (xvel))\n                        change x by ((-1) * (xvel))\n                        set [xvel v] to [0]\n                    else\n                        change y by ((xvel) / (2))\n                    end\n                else\n                    change y by ((xvel) / (2))\n                end\n            else\n                change y by ((xvel) / (2))\n            end\n        else\n            change y by ((xvel) / (2))\n        end\n        if <<touching (sprite1 v)?> and <(xvel) > [0]>> then\n            change y by ((xvel) / (2))\n            if <touching (sprite1 v)?> then\n                change y by ((xvel) / (2))\n                if <touching (sprite1 v)?> then\n                    change y by ((xvel) / (2))\n                    if <touching (sprite1 v)?> then\n                        change y by (xvel)\n                        change x by ((-1) * (xvel))\n                        set [xvel v] to [0]\n                    else\n                        change y by ((-1) * ((xvel) / (2)))\n                    end\n                else\n                    change y by ((-1) * ((xvel) / (2)))\n                end\n            else\n                change y by ((-1) * ((xvel) / (2)))\n            end\n        else\n            change y by ((-1) * ((xvel) / (2)))\n        end\n    else\n        change y by ((-1) * ([abs v] of ((xvel) / (2)) ))\n        if <not <touching (sprite1 v)?>> then\n            change y by ((-1) * ([abs v] of ((xvel) / (2)) ))\n            if <not <touching (sprite1 v)?>> then\n                change y by ((-1) * ([abs v] of ((xvel) / (2)) ))\n                if <not <touching (sprite1 v)?>> then\n                    change y by ((-1) * ([abs v] of ((xvel) / (2)) ))\n                    if <not <touching (sprite1 v)?>> then\n                        change y by ((2) * ([abs v] of (xvel) ))\n                    end\n                end\n            end\n        end\n    end\n    change x by ((-1) * (xvel))\n    change y by (yvel)\n    set [touch y? v] to [0]\n    if <touching (sprite1 v)?> then\n        set [touch y? v] to [1]\n    end\n    change x by (xvel)\n    if <(touch y?) = [1]> then\n        change y by ((-1) * (yvel))\n        if <<key (up arrow v) pressed?> and <<(yvel) < [0]> or <(yvel) = [0]>>> then\n            set [yvel v] to ((5) + (([abs v] of (xvel) ) * (1.25)))\n        else\n            if <(yvel) > [0]> then\n                set [yvel v] to [-3]\n            else\n                set [yvel v] to [0]\n            end\n        end\n    else\n        change [yvel v] by (-0.5)\n    end\n    if <key (right arrow v) pressed?> then\n        change [xvel v] by (1)\n        point in direction (90)\n    end\n    if <key (left arrow v) pressed?> then\n        change [xvel v] by (-1)\n        point in direction (-90)\n    end\n    go to x: ((round ((x position) * (10))) / (10)) y: ((round ((y position) * (10))) / (10))\nend\n\nwhen I receive [level 8 v]\ngo to x: (-197) y: (-129)\n\nwhen I receive [level 10 v]\nhide\nwait (1) seconds\ngo to x: (-197) y: (-129)\nshow\n\n@Sprite3\n\nwhen flag clicked\nforever\n    if <<touching (droppy v)?> and <(Level) = [10]>> then\n        broadcast (end v)\n        hide\n    end\nend\n\nwhen I receive [level 9 v]\ngo to x: (82) y: (124)\n\nwhen flag clicked\nforever\n    if <<touching (droppy v)?> and <(Level) = [8]>> then\n        broadcast (level 9 v)\n        wait (0.5) seconds\n        set [level v] to [9]\n    end\nend\n\nwhen flag clicked\nforever\n    if <<touching (droppy v)?> and <(Level) = [6]>> then\n        broadcast (level 7 v)\n        wait (0.5) seconds\n        set [level v] to [7]\n    end\nend\n\nwhen I receive [level 6 v]\ngo to x: (174) y: (-122)\n\nwhen flag clicked\nforever\n    if <<touching (droppy v)?> and <(Level) = [5]>> then\n        broadcast (level 6 v)\n        wait (0.5) seconds\n        set [level v] to [6]\n    end\nend\n\nwhen I receive [level 5 v]\ngo to x: (174) y: (-122)\n\nwhen flag clicked\nforever\n    if <<touching (droppy v)?> and <(Level) = [4]>> then\n        broadcast (level 5 v)\n        wait (0.5) seconds\n        set [level v] to [5]\n    end\nend\n\nwhen I receive [level 4 v]\ngo to x: (149) y: (-124)\n\nwhen flag clicked\nforever\n    if <<touching (droppy v)?> and <(Level) = [3]>> then\n        broadcast (level 4 v)\n        wait (0.5) seconds\n        set [level v] to [4]\n    end\nend\n\nwhen I receive [level 3 v]\ngo to x: (-10) y: (-1)\n\nwhen flag clicked\nforever\n    if <<touching (droppy v)?> and <(Level) = [2]>> then\n        broadcast (level 3 v)\n        wait (0.5) seconds\n        set [level v] to [3]\n    end\nend\n\nwhen I receive [level 2 v]\ngo to x: (187) y: (55)\n\nwhen flag clicked\nforever\n    if <<touching (droppy v)?> and <(Level) = [1]>> then\n        broadcast (level 2 v)\n        wait (0.5) seconds\n        set [level v] to [2]\n    end\nend\n\nwhen flag clicked\nshow\ngo to x: (-45) y: (23)\nset [level v] to [1]\n\nwhen flag clicked\nforever\n    if <<touching (droppy v)?> and <(Level) = [7]>> then\n        broadcast (level 8 v)\n        wait (0.5) seconds\n        set [level v] to [8]\n    end\nend\n\nwhen I receive [level 8 v]\ngo to x: (190) y: (-72)\n\nwhen flag clicked\nforever\n    if <<touching (droppy v)?> and <(Level) = [9]>> then\n        broadcast (level 10 v)\n        wait (0.5) seconds\n        set [level v] to [10]\n    end\nend\n\nwhen I receive [level 10 v]\ngo to x: (191) y: (-84)\n\n@Sprite4\n\nwhen flag clicked\nforever\n    if <touching (droppy v)?> then\n        broadcast (you haz died v)\n    end\nend\n\nwhen I receive [level 5 v]\nhide\n\nwhen I receive [level 4 v]\ngo to x: (-18) y: (-158)\nshow\n\nwhen flag clicked\nhide\n\n@Sprite5\n\nwhen flag clicked\nforever\n    if <touching (droppy v)?> then\n        broadcast (you haz died v)\n    end\nend\n\nwhen I receive [level 6 v]\nhide\n\nwhen flag clicked\nhide\n\nwhen I receive [level 5 v]\nshow\n\n@Sprite6\n\nwhen I receive [level 6 v]\nhide\n\nwhen flag clicked\nforever\n    if <touching (droppy v)?> then\n        broadcast (you haz died v)\n    end\nend\n\nwhen flag clicked\nhide\n\nwhen I receive [level 5 v]\nshow\n\n@Sprite7\n\nwhen I receive [level 6 v]\nhide\n\nwhen flag clicked\nforever\n    if <touching (droppy v)?> then\n        broadcast (you haz died v)\n    end\nend\n\nwhen flag clicked\nhide\n\nwhen I receive [level 5 v]\nshow\n\n@Sprite8\n\nwhen I receive [level 7 v]\nhide\n\nwhen flag clicked\nforever\n    if <touching (droppy v)?> then\n        broadcast (you haz died v)\n    end\nend\n\nwhen flag clicked\npoint in direction (90)\nhide\n\nwhen flag clicked\nforever\n    turn left (10) degrees\n    wait (0.1) seconds\nend\n\nwhen I receive [level 6 v]\nshow\n\n@Sprite9\n\nwhen I receive [level 8 v]\nhide\n\nwhen flag clicked\ngo to x: (-6) y: (-120)\nhide\n\nwhen I receive [level 7 v]\nshow\nforever\n    glide (1) secs to x: (-67) y: (-120)\n    glide (1) secs to x: (123) y: (-120)\nend\n\nwhen flag clicked\nforever\n    if <touching (droppy v)?> then\n        broadcast (you haz died v)\n    end\nend\n\n@Sprite10\n\nwhen flag clicked\nforever\n    if <touching (droppy v)?> then\n        broadcast (you haz died v)\n    end\nend\n\nwhen I receive [level 9 v]\nhide\n\nwhen flag clicked\nhide\n\nwhen I receive [level 8 v]\nshow\n\n@Sprite11\n\nwhen I receive [level 9 v]\nhide\n\nwhen flag clicked\nhide\n\nwhen I receive [level 8 v]\nshow\n\nwhen flag clicked\nforever\n    if <touching (droppy v)?> then\n        broadcast (you haz died v)\n    end\nend\n\n@Sprite12\n\nwhen I receive [level 9 v]\nshow\n\nwhen flag clicked\nforever\n    if <touching (droppy v)?> then\n        broadcast (you haz died v)\n    end\nend\n\nwhen flag clicked\ngo to x: (-3) y: (71)\nhide\nforever\n    glide (1) secs to x: (-3) y: (-55)\n    glide (1) secs to x: (-3) y: (71)\nend\n\nwhen I receive [level 10 v]\nhide\n\n@Sprite13\n\nwhen flag clicked\npoint in direction (90)\nforever\n    turn left (1) degrees\n    wait (0.3) seconds\n    turn left (2) degrees\n    wait (0.1) seconds\n    turn left (4) degrees\n    wait (0.06) seconds\n    turn left (7) degrees\n    wait (0.06) seconds\n    turn left (10) degrees\n    wait (0.03) seconds\n    turn left (15) degrees\n    wait (0.01) seconds\n    turn left (22) degrees\n    wait (0.006) seconds\n    turn left (32) degrees\n    repeat (55)\n        turn left (50) degrees\n    end\n    repeat (5)\n        turn left (5) degrees\n    end\n    repeat (12)\n        turn left (1) degrees\n    end\n    wait (0.5) seconds\n    turn left (-1) degrees\n    wait (0.3) seconds\n    turn left (-2) degrees\n    wait (0.1) seconds\n    turn left (-4) degrees\n    wait (0.06) seconds\n    turn left (-7) degrees\n    wait (0.06) seconds\n    turn left (-10) degrees\n    wait (0.03) seconds\n    turn left (-15) degrees\n    wait (0.01) seconds\n    turn left (-22) degrees\n    wait (0.006) seconds\n    turn left (-32) degrees\n    repeat (55)\n        turn left (-50) degrees\n    end\n    repeat (5)\n        turn left (-5) degrees\n    end\n    repeat (12)\n        turn left (-1) degrees\n    end\n    wait (0.5) seconds\nend\n\nwhen flag clicked\ngo to x: (-7) y: (87)\nforever\n    glide (1) secs to x: (-19) y: (64)\n    glide (1) secs to x: (-4) y: (25)\n    glide (1) secs to x: (12) y: (42)\n    glide (1) secs to x: (-5) y: (68)\n    glide (1) secs to x: (-6) y: (75)\n    glide (1) secs to x: (-7) y: (87)\nend\n\nwhen flag clicked\nforever\n    if <touching (droppy v)?> then\n        broadcast (you haz died v)\n    end\nend\n\nwhen flag clicked\nhide\n\nwhen I receive [level 10 v]\nshow\n\n@Sprite2\n\nwhen flag clicked\npoint in direction (90)\ngo to x: (9) y: (-124)\nforever\n    turn left (1) degrees\n    wait (0.05) seconds\n    turn left (2) degrees\n    wait (0.05) seconds\n    repeat (10)\n        turn left (2) degrees\n        wait (0.05) seconds\n    end\n    turn left (2) degrees\n    wait (0.05) seconds\n    turn left (1) degrees\n    wait (0.05) seconds\n    turn left (-1) degrees\n    wait (0.05) seconds\n    turn left (-2) degrees\n    wait (0.05) seconds\n    repeat (10)\n        turn left (-2) degrees\n        wait (0.05) seconds\n    end\n    turn left (-2) degrees\n    wait (0.05) seconds\n    turn left (-1) degrees\n    wait (0.05) seconds\nend\n\nwhen flag clicked\nforever\n    if <touching (droppy v)?> then\n        broadcast (you haz died v)\n    end\nend\n\nwhen flag clicked\nhide\n\nwhen I receive [level 10 v]\nshow\n\n@Sprite14\n\nwhen flag clicked\npoint in direction (90)\ngo to x: (-21) y: (-124)\nforever\n    repeat (10)\n        turn left (2) degrees\n        wait (0.05) seconds\n    end\n    turn left (2) degrees\n    wait (0.05) seconds\n    turn left (1) degrees\n    wait (0.05) seconds\n    turn left (-1) degrees\n    wait (0.05) seconds\n    turn left (-2) degrees\n    wait (0.05) seconds\n    repeat (20)\n        turn left (-2) degrees\n        wait (0.05) seconds\n    end\n    turn left (-2) degrees\n    wait (0.05) seconds\n    turn left (-1) degrees\n    wait (0.05) seconds\n    turn left (1) degrees\n    wait (0.05) seconds\n    turn left (2) degrees\n    wait (0.05) seconds\n    repeat (10)\n        turn left (2) degrees\n        wait (0.05) seconds\n    end\nend\n\nwhen flag clicked\nforever\n    if <touching (droppy v)?> then\n        broadcast (you haz died v)\n    end\nend\n\nwhen flag clicked\nhide\n\nwhen I receive [level 10 v]\nshow\n\n@Sprite15\n\nwhen flag clicked\nforever\n    if <touching (droppy v)?> then\n        broadcast (you haz died v)\n    end\nend\n\nwhen flag clicked\nhide\n\nwhen I receive [level 10 v]\nshow\n\n@Sprite16\n\nwhen flag clicked\nhide\npoint in direction (90)\nforever\n    turn right (5) degrees\nend\n\nwhen I receive [level 10 v]\nrepeat until <(Level) = [11]>\n    hide\n    set [ghost v] effect to (100)\n    wait (pick random (1) to (6)) seconds\n    go to x: (pick random (213) to (-213)) y: (-121)\n    show\n    repeat (20)\n        change [ghost v] effect by (-5)\n    end\n    repeat (20)\n        change [ghost v] effect by (5)\n    end\nend\n\nwhen flag clicked\nforever\n    if <touching (droppy v)?> then\n        broadcast (you haz died v)\n    end\nend\n\n@Sprite17\n\nwhen flag clicked\nhide\npoint in direction (90)\nforever\n    turn right (5) degrees\nend\n\nwhen I receive [level 10 v]\nrepeat until <(Level) = [11]>\n    hide\n    set [ghost v] effect to (100)\n    wait (pick random (1) to (6)) seconds\n    go to x: (pick random (213) to (-213)) y: (-121)\n    show\n    repeat (20)\n        change [ghost v] effect by (-5)\n    end\n    repeat (20)\n        change [ghost v] effect by (5)\n    end\nend\n\nwhen flag clicked\nforever\n    if <touching (droppy v)?> then\n        broadcast (you haz died v)\n    end\nend\n\n@Sprite18\n\nwhen I receive [end v]\ngo to [front v] layer\nshow\nstop [all v]\n\nwhen flag clicked\nhide\n\n