Insano: a platformer (v1.2)


@Stage\n\nwhen backdrop switches to [backdrop20 v]\nset [level v] to [20]\n\nwhen backdrop switches to [backdrop1 v]\nset [level v] to [1]\n\n@Avatar\n\nwhen flag clicked\nset size to (30) %\nswitch backdrop to (backdrop1 v)\ngo to x: (-223) y: (-60)\nset [x velocity v] to [0]\nset [y velocity v] to [0]\nset [level v] to [1]\nforever\n    if <touching color (#00ffff)?> then\n        change y by (300)\n    end\n    if <touching color (#805540)?> then\n        if <<key (w v) pressed?> or <key (up arrow v) pressed?>> then\n            change y by (1)\n        end\n        if <<key (s v) pressed?> or <key (down arrow v) pressed?>> then\n            change y by (-1)\n        end\n    end\n    if <(size) = [10]> then\n        if <touching color (#ff0000)?> then\n            set size to (30) %\n            go to x: (-223) y: (-60)\n        end\n    end\n    if <<key (d v) pressed?> or <key (right arrow v) pressed?>> then\n        turn right (15) degrees\n        change [x velocity v] by (1)\n    end\n    if <<key (a v) pressed?> or <key (left arrow v) pressed?>> then\n        turn left (15) degrees\n        change [x velocity v] by (-1)\n    end\n    if <touching color (#ffe900)?> then\n        next backdrop\n        set size to (30) %\n        if <(Level) = [19]> then\n            go to x: (0) y: (0)\n        else\n            go to x: (-220) y: (-66)\n        end\n        change [level v] by (1)\n    end\n    if <touching color (#00ff6a)?> then\n        if <(size) = [30]> then\n            set size to (10) %\n        end\n    end\n    if <touching color (#ff0000)?> then\n        set size to (30) %\n        if <(Level) = [20]> then\n            go to x: (0) y: (0)\n        else\n            go to x: (-223) y: (-60)\n        end\n    end\n    if <touching color (#ff0094)?> then\n        if <(size) = [10]> then\n            set size to (30) %\n        end\n    end\n    set [x velocity v] to ((X Velocity) * (0.9))\n    change x by (X Velocity)\n    if <not <touching color (#805540)?>> then\n        if <touching color (#000000)?> then\n            change y by (1)\n            if <touching color (#000000)?> then\n                change y by (1)\n                if <touching color (#000000)?> then\n                    change y by (1)\n                    if <touching color (#000000)?> then\n                        change y by (1)\n                        if <touching color (#000000)?> then\n                            change y by (1)\n                            if <touching color (#000000)?> then\n                                change y by (1)\n                                if <touching color (#000000)?> then\n                                    change x by ((X Velocity) * (-1))\n                                    change y by (-6)\n                                    if <<key (w v) pressed?> or <key (up arrow v) pressed?>> then\n                                        if <(X Velocity) > [0]> then\n                                            change [x velocity v] by (-5)\n                                        else\n                                            change [x velocity v] by (5)\n                                        end\n                                        set [y velocity v] to [10]\n                                    else\n                                        set [x velocity v] to [0]\n                                    end\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n        change [y velocity v] by (-1)\n        change y by (Y Velocity)\n        if <touching color (#000000)?> then\n            change y by ((Y Velocity) * (-1))\n            set [y velocity v] to [0]\n        end\n        change y by (-1)\n        if <touching color (#000000)?> then\n            if <<key (w v) pressed?> or <key (up arrow v) pressed?>> then\n                set [y velocity v] to [15]\n            end\n        end\n        change y by (1)\n    end\nend\n\nwhen [r v] key pressed\ngo to x: (-223) y: (-60)\nset size to (30) %\n\n@Boss1\n\nwhen flag clicked\nset [level v] to [1]\npoint in direction (90)\nforever\n    if <not <(Level) = [20]>> then\n        hide\n    end\n    if <(Level) = [20]> then\n        show\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Level) = [20]> then\n        repeat until <(Level) > [20]>\n            turn right (2) degrees\n            wait (0.1) seconds\n        end\n    end\nend\n\n@Boss2a\n\nwhen flag clicked\nforever\n    if <not <([backdrop # v] of [_stage_ v]) = [40]>> then\n        hide\n    end\n    if <([backdrop # v] of [_stage_ v]) = [40]> then\n        show\n    end\nend\n\nwhen backdrop switches to [backdrop40 v]\nset [level v] to [40]\nrepeat until <([backdrop # v] of [_stage_ v]) > [40]>\n    go to x: (pick random (-200) to (0)) y: (200)\n    point towards (avatar v)\n    glide (1) secs to (avatar v)\nend\n\n@Boss2b\n\nwhen flag clicked\npoint in direction (90)\nhide\nforever\n    if <not <(Level) = [40]>> then\n        hide\n    end\n    if <(Level) = [40]> then\n        show\n    end\nend\n\nwhen backdrop switches to [backdrop40 v]\nforever\n    turn right (2) degrees\n    wait (0.06) seconds\nend\n\n@Boss3a\n\nwhen flag clicked\nforever\n    if <not <<([backdrop # v] of [_stage_ v]) = [60]> and <(Level) = [60]>>> then\n        hide\n    end\n    if <<([backdrop # v] of [_stage_ v]) = [60]> and <(Level) = [60]>> then\n        show\n    end\nend\n\nwhen backdrop switches to [backdrop60 v]\nrepeat until <([backdrop # v] of [_stage_ v]) > [60]>\n    go to x: (pick random (-200) to (200)) y: (200)\n    point towards (avatar v)\n    glide (1) secs to (avatar v)\nend\n\n@Boss3b\n\nwhen flag clicked\nforever\n    if <not <<([backdrop # v] of [_stage_ v]) = [60]> and <(Level) = [60]>>> then\n        hide\n    end\n    if <<([backdrop # v] of [_stage_ v]) = [60]> and <(Level) = [60]>> then\n        show\n    end\nend\n\nwhen backdrop switches to [backdrop60 v]\nrepeat until <([backdrop # v] of [_stage_ v]) > [60]>\n    go to x: (pick random (-200) to (200)) y: (200)\n    point towards (avatar v)\n    glide (1) secs to (avatar v)\nend\n\n@Boss3c\n\nwhen flag clicked\nforever\n    if <not <<([backdrop # v] of [_stage_ v]) = [60]> and <(Level) = [60]>>> then\n        hide\n    end\n    if <<([backdrop # v] of [_stage_ v]) = [60]> and <(Level) = [60]>> then\n        show\n    end\nend\n\nwhen backdrop switches to [backdrop60 v]\nrepeat until <([backdrop # v] of [_stage_ v]) > [60]>\n    go to x: (pick random (-200) to (200)) y: (200)\n    point towards (avatar v)\n    glide (1) secs to (avatar v)\nend\n\n@Boss3d\n\nwhen flag clicked\nforever\n    if <not <<([backdrop # v] of [_stage_ v]) = [60]> and <(Level) = [60]>>> then\n        hide\n    end\n    if <<([backdrop # v] of [_stage_ v]) = [60]> and <(Level) = [60]>> then\n        show\n    end\nend\n\nwhen backdrop switches to [backdrop60 v]\nset [level v] to [60]\nrepeat until <([backdrop # v] of [_stage_ v]) > [60]>\n    go to x: (pick random (-200) to (200)) y: (200)\n    point towards (avatar v)\n    glide (1) secs to (avatar v)\nend\n\n@Boss4\n\nwhen flag clicked\ngo to x: (0) y: (0)\nhide\nforever\n    wait until <(backdrop [number v]) = [80]>\n    repeat until <(backdrop [number v]) > [80]>\n        show\n        point towards (avatar v)\n        glide (.6) secs to (avatar v)\n    end\n    hide\nend\n\n