Mega Man X Scrolling Platformer Test

Instructions: This is a test using my new Mega Man X game \nengine, it is a small part of Storm Eagle's stage from the original game. There are some platforms you can ride into the air. You also have the ability to wall jump.\n\n------------------------Instructions------------------------\n\n- Arrow keys or WASD to move\n\n- Space bar to shoot or charge your shot\n\n- Press C to dash\n\n-------------------------------------------------------------\n\nAll credit goes to Capcom, the creators of Mega Man.\n\nMusic is Shadow Man stage and Storm Eagle Stage.\n\n

@Stage\n\nwhen flag clicked\nset [scroll x min v] to [0]\nset [scroll y min v] to [0]\nset [scroll x max v] to [965]\nset [scroll y max v] to [1500]\nplay sound [Shadow Man Stage \(Mega Man 3\) - Super Smash Bros Wii U v] until done\n\nwhen I receive [game start v]\nbroadcast (Teleportin v)\nstop all sounds\nforever\n    play sound [Mega Man X - Storm Eagles Theme \(remix\) v] until done\nend\n\n@Level_Art\n\nwhen I receive [setup v]\nshow\nclear graphic effects\ngo to x: (0) y: (0)\nset [level_x v] to [0]\nswitch costume to (str1 v)\nCreate\nhide\n\ndefine Create\nset size to (200) %\nset [level_y v] to [0]\nset [level_x v] to [0]\nrepeat (3)\n    create clone of (_myself_ v)\n    change [level_x v] by (480)\n    next costume\nend\nwait (.02) seconds\nset [level_y v] to [416]\nset [level_x v] to [0]\nrepeat (3)\n    create clone of (_myself_ v)\n    change [level_x v] by (480)\n    next costume\nend\nwait (.02) seconds\nset [level_y v] to [832]\nset [level_x v] to [0]\nrepeat (3)\n    create clone of (_myself_ v)\n    change [level_x v] by (480)\n    next costume\nend\nset [level_y v] to [1248]\nset [level_x v] to [0]\nrepeat (3)\n    create clone of (_myself_ v)\n    change [level_x v] by (480)\n    next costume\nend\nwait (1) seconds\nset [level_y v] to [2000]\nset [level_x v] to [2000]\n\ndefine Find Costume Number\nset [level costumes v] to [1]\nswitch costume to ((1) / (1))\nnext costume\nrepeat until <(costume [number v]) = [1]>\n    change [level costumes v] by (1)\n    next costume\nend\n\nwhen I receive [level loop v]\nforever\n    set x to ((Level_X) - (Scroll X))\n    set y to ((Level_Y) - (Scroll Y))\n    if <<([abs v] of ((Level_X) - (Scroll X)) ) > [480]> or <([abs v] of ((Level_Y) - (Scroll Y)) ) > [400]>> then\n        hide\n    else\n        show\n    end\nend\n\nwhen I receive [setup v]\nwait (4) seconds\n\n@Level_Hit\n\nwhen I receive [setup v]\nshow\nclear graphic effects\ngo to x: (0) y: (0)\nset [level_x v] to [0]\nswitch costume to (vc_1 v)\nCreate\nhide\n\nwhen flag clicked\nbroadcast (SetUp v)\nforever\n    broadcast (Level Loop v)\nend\n\nwhen I receive [level loop v]\nforever\n    set [ghost v] effect to (100)\n    set x to ((Level_X) - (Scroll X))\n    set y to ((Level_Y) - (Scroll Y))\n    if <<([abs v] of ((Level_X) - (Scroll X)) ) > [480]> or <([abs v] of ((Level_Y) - (Scroll Y)) ) > [475]>> then\n        hide\n    else\n        show\n    end\nend\n\ndefine Create\nset size to (100) %\nset [level_y v] to [0]\nset [level_x v] to [0]\nrepeat (3)\n    create clone of (_myself_ v)\n    change [level_x v] by (480)\n    next costume\nend\nwait (.02) seconds\nset [level_y v] to [416]\nset [level_x v] to [0]\nrepeat (3)\n    create clone of (_myself_ v)\n    change [level_x v] by (480)\n    next costume\nend\nwait (.02) seconds\nset [level_y v] to [832]\nset [level_x v] to [0]\nrepeat (3)\n    create clone of (_myself_ v)\n    change [level_x v] by (480)\n    next costume\nend\nwait (.02) seconds\nset [level_y v] to [1248]\nset [level_x v] to [0]\nrepeat (3)\n    create clone of (_myself_ v)\n    change [level_x v] by (480)\n    next costume\nend\n\ndefine Create\n\n@storm eagle sky\n\nwhen flag clicked\nset size to (150) %\ngo to x: (0) y: (-999)\nhide\nforever\n    create clone of (_myself_ v)\n    wait (.85) seconds\nend\n\nwhen I start as a clone\ngo to [back v] layer\nshow\nrepeat (55)\n    change y by (15)\nend\ndelete this clone\n\n@border\n\nwhen flag clicked\ngo to x: (0) y: (0)\nshow\nforever\n    go to [front v] layer\nend\n\nset [brightness v] effect to (150)\n\n@storm eagle platform\n\nwhen flag clicked\n\nwhen I start as a clone\nif <(Level_X) = [650]> then\n    forever\n        set x to ((Level_X) - (Scroll X))\n        set y to ((Level_Y) - (Scroll Y))\n        if <<([abs v] of ((Level_X) - (Scroll X)) ) > [270]> or <([abs v] of ((Level_Y) - (Scroll Y)) ) > [205]>> then\n            hide\n        else\n            show\n        end\n    end\nend\nif <(Level_X) = [975]> then\n    forever\n        set x to ((Level_X) - (Scroll X))\n        set y to ((Level_Y) - (Scroll Y))\n        if <<([abs v] of ((Level_X) - (Scroll X)) ) > [270]> or <([abs v] of ((Level_Y) - (Scroll Y)) ) > [205]>> then\n            hide\n        else\n            show\n        end\n    end\nend\n\nwhen I start as a clone\nwait (1) seconds\nwait until <(distance to [player v]) < [80]>\nif <(Level_X) = [650]> then\n    start sound [message v]\n    wait (.5) seconds\n    repeat (63)\n        change [level_x v] by (4)\n        change [level_y v] by (4)\n    end\n    repeat (60)\n        change [level_x v] by (2)\n    end\n    repeat (100)\n        change [level_y v] by (-4)\n    end\n    set [level_y v] to [0]\n    set [level_x v] to [650]\n    create clone of (_myself_ v)\n    delete this clone\nend\nif <(Level_X) = [975]> then\n    start sound [message v]\n    wait (.5) seconds\n    forever\n        repeat (235)\n            change [level_y v] by (4)\n        end\n        repeat (35)\n            change [level_x v] by (-4)\n        end\n        repeat (52)\n            change [level_y v] by (-20)\n        end\n        repeat (35)\n            change [level_x v] by (4)\n        end\n        repeat (26)\n            change [level_y v] by (4)\n        end\n    end\nend\n\nwhen I start as a clone\nforever\n    wait (.02) seconds\n    next costume\nend\n\nwhen I receive [teleportin v]\nhide\nset [scroll y v] to [0]\nwait (.3) seconds\nset [level_y v] to [0]\nset [level_x v] to [650]\ncreate clone of (_myself_ v)\nwait (.02) seconds\nset [level_y v] to [400]\nset [level_x v] to [975]\ncreate clone of (_myself_ v)\n\nwhen I receive [teleportin v]\ndelete this clone\n\n@toenail\n\nwhen flag clicked\nset [ghost v] effect to (0)\ngo to x: (0) y: (0)\nswitch costume to (costume1 v)\nwait (.5) seconds\nshow\nrepeat (20)\n    change [ghost v] effect by (5)\nend\nrepeat (3)\n    start sound [Mega Man 6 SRX \(6\) v]\n    clear graphic effects\n    change [brightness v] effect by (100)\n    wait (.05) seconds\n    change [ghost v] effect by (100)\n    wait (.05) seconds\nend\nclear graphic effects\nchange [brightness v] effect by (100)\nwait (.5) seconds\nclear graphic effects\nforever\n    switch costume to (mega-man-x v)\n    wait (.4) seconds\n    next costume\n    wait (.4) seconds\nend\n\nwhen flag clicked\nwait (2) seconds\nwait until <key (any v) pressed?>\nstart sound [Mega Man 5 SFX \(19\) v]\nset [ghost v] effect to (0)\ngo to x: (0) y: (0)\ngo to [front v] layer\nstop [other scripts in sprite v]\nswitch costume to (costume1 v)\nchange [ghost v] effect by (100)\nshow\nrepeat (20)\n    change [ghost v] effect by (-5)\nend\nbroadcast (GAME START v)\nrepeat (20)\n    change [ghost v] effect by (5)\nend\nhide\nset [ghost v] effect to (100)\nswitch costume to (costume3 v)\nforever\n    go to [front v] layer\n    show\nend\n\n@storm eagle\n\nwhen flag clicked\nset size to (150) %\ngo to x: (263) y: (208)\nhide\nwait (1) seconds\nstart sound [eagle v]\nshow\nglide (1) secs to x: (-256) y: (-208)\nhide\n\n@Player\n\ndefine Set Costume (#costume)\nif <not <(#costume) = (costume [number v])>> then\n    switch costume to (#costume)\nend\n\nwhen flag clicked\nhide\n\nwhen I receive [setup v]\nReset Player\n\ndefine Reset Player\nshow\nset size to (200) %\nset rotation style [left-right v]\npoint in direction (90)\nbroadcast (Teleportin v)\ngo to x: (0) y: (0)\nset [speed y v] to [0]\nset [falling? v] to [10]\nset [scroll x v] to [0]\nset [scroll y v] to [0]\nset [wall slide v] to [0]\nset [wall jump v] to [0]\nset [gravity toggle v] to [1]\nset [moving left v] to [0]\nset [moving right v] to [0]\nset [costume no. v] to [1]\nset [wall jump animation v] to [0]\nset [animation state v] to [0]\nset [dashing v] to [0]\nset [firing v] to [0]\nset [fire duration v] to [0]\nset [charging v] to [0]\nset [@fall v] to [0]\nset [@idle v] to [0]\nset [@idle_fire v] to [0]\nset [@jump v] to [0]\nset [@walk v] to [0]\nset [@wall cling v] to [0]\nset [@wall jump v] to [0]\nset [@dash v] to [0]\nset [brightness v] effect to (0)\nhide\n\nwhen I receive [play v]\nshow\nforever\n    Platforming Engine [8]\nend\n\ndefine Platforming Engine (speed)\nswitch costume to (hitbox v)\nif <(Firing) = [1]> then\n    if <(Fire Duration) < [1]> then\n        set [fire duration v] to [0]\n        set [firing v] to [0]\n        set [@idle_fire v] to [0]\n    else\n        change [fire duration v] by (-1)\n    end\nend\nif <(fire key) = [1]> then\n    change [charging v] by (1)\n    if <(Charging) > [15]> then\n        change [brightness v] effect by (1)\n    end\n    if <(Charging) = [15]> then\n        start sound [MMX1_SE_00011 v]\n    end\n    if <(Charging) = [58]> then\n        start sound [MMX1_SE_00011_Loop v]\n    end\n    if <(Charging) = [63]> then\n        set [charging v] to [57]\n        change [brightness v] effect by (-6)\n    end\nend\nif <(Gravity Toggle) = [1]> then\n    if <<(speed y) < [4]> or <<key (up arrow v) pressed?> or <key (w v) pressed?>>> then\n        change [speed y v] by (-1)\n    else\n        change [speed y v] by (-2)\n    end\n    if <(speed y) < [-15]> then\n        set [speed y v] to [-15]\n    end\nend\nchange y by (speed y)\nTouch Ground <(speed y) > [0]>\nif <(Wall Jump) > [0]> then\n    change [wall jump v] by (-1)\n    if <<(Moving Left) = [1]> and <not <(Moving Right) = [1]>>> then\n        if <(Dashing) = [2]> then\n            Walk [-90] ((speed) * (-2))\n        else\n            Walk [-90] ((speed) * (-1))\n        end\n    else\n        if <<(Moving Right) = [1]> and <not <(Moving Left) = [1]>>> then\n            if <(Dashing) = [2]> then\n                Walk [90] ((speed) * (2))\n            else\n                Walk [90] (speed)\n            end\n        end\n    end\nelse\n    if <(Dashing) = [1]> then\n        if <<(Moving Left) = [1]> and <not <(Moving Right) = [1]>>> then\n            Walk [-90] ((speed) * (-2))\n        else\n            if <<(Moving Right) = [1]> and <not <(Moving Left) = [1]>>> then\n                Walk [90] ((speed) * (2))\n            end\n        end\n    else\n        set [moving left v] to [0]\n        set [moving right v] to [0]\n        if <<key (left arrow v) pressed?> or <key (a v) pressed?>> then\n            if <<(Wall Slide) = [1]> and <(direction) = [90]>> then\n                set [wall slide v] to [0]\n                set [gravity toggle v] to [1]\n                set [falling? v] to [6]\n            end\n            if <(Dashing) = [2]> then\n                Walk [-90] ((speed) * (-2))\n            else\n                Walk [-90] ((speed) * (-1))\n            end\n        else\n            if <<key (right arrow v) pressed?> or <key (d v) pressed?>> then\n                if <<(Wall Slide) = [1]> and <(direction) = [-90]>> then\n                    set [wall slide v] to [0]\n                    set [gravity toggle v] to [1]\n                    set [falling? v] to [6]\n                end\n                if <(Dashing) = [2]> then\n                    Walk [90] ((speed) * (2))\n                else\n                    Walk [90] (speed)\n                end\n            else\n                if <(Wall Slide) = [1]> then\n                    set [wall slide v] to [0]\n                    set [gravity toggle v] to [1]\n                    set [falling? v] to [6]\n                end\n                set [animation state v] to [0]\n            end\n        end\n    end\nend\nif <<key (up arrow v) pressed?> or <key (w v) pressed?>> then\n    if <<(jump key) = [0]> and <(falling?) < [3]>> then\n        start sound [MMX1_SE_00014 v]\n        set [speed y v] to [20]\n        set [falling? v] to [6]\n        set [jump key v] to [1]\n        if <(Dashing) = [1]> then\n            set [dashing v] to [2]\n        end\n    end\nelse\n    set [jump key v] to [0]\nend\nif <key (c v) pressed?> then\n    if <<(dash key) = [0]> and <<(falling?) = [0]> and <<(Dashing) = [0]> and <(Wall Slide) = [0]>>>> then\n        start sound [MMX1_SE_00016 v]\n        if <(direction) = [-90]> then\n            set [moving left v] to [1]\n            set [moving right v] to [0]\n        else\n            if <(direction) = [90]> then\n                set [moving right v] to [1]\n                set [moving left v] to [0]\n            end\n        end\n        set [dashing v] to [1]\n        set [dash key v] to [1]\n    end\nelse\n    set [dash key v] to [0]\nend\nif <key (space v) pressed?> then\n    if <(fire key) = [0]> then\n        start sound [MMX1_SE_00009 v]\n        set [@idle_fire v] to [0]\n        set [firing v] to [1]\n        set [fire duration v] to [10]\n        set [fire key v] to [1]\n        set [shot type v] to [1]\n        create clone of (player projectile v)\n    end\nelse\n    set [fire key v] to [0]\n    if <(Charging) > [50]> then\n        start sound [MMX1_SE_00010 v]\n        set [@idle_fire v] to [0]\n        set [firing v] to [1]\n        set [fire duration v] to [10]\n        set [shot type v] to [3]\n        create clone of (player projectile v)\n        set [charging v] to [0]\n        set [brightness v] effect to (0)\n    else\n        if <(Charging) > [15]> then\n            start sound [MMX1_SE_00012 v]\n            set [@idle_fire v] to [0]\n            set [firing v] to [1]\n            set [fire duration v] to [10]\n            set [shot type v] to [2]\n            create clone of (player projectile v)\n            set [charging v] to [0]\n            set [brightness v] effect to (0)\n        else\n            set [charging v] to [0]\n            set [brightness v] effect to (0)\n        end\n    end\nend\nif <(y position) < [-180]> then\n    start sound [MMX1_SE_00018 v]\n    go to x: (0) y: (-60)\n    point in direction (90)\n    set [scroll x v] to [0]\n    set [scroll y v] to [0]\n    set [speed y v] to [0]\n    set [charging v] to [0]\n    set [brightness v] effect to (0)\nend\nAnimation\nSet Costume (Costume NO.)\nScrolling Blocks\n\ndefine Touch Ground <up?>\nif <(Gravity Toggle) = [1]> then\n    change [falling? v] by (1)\nend\nrepeat until <not <<touching (level_hit v)?> or <touching (storm eagle platform v)?>>>\n    if <up?> then\n        change y by (-1)\n    else\n        change y by (1)\n        if <(Wall Slide) = [1]> then\n            set [wall slide v] to [0]\n            set [gravity toggle v] to [1]\n        end\n        if <(Dashing) > [1]> then\n            set [dashing v] to [0]\n        end\n        if <(speed y) < [-6]> then\n            start sound [MMX1_SE_00015 v]\n        end\n        set [falling? v] to [0]\n        set [wall jump animation v] to [0]\n    end\n    set [speed y v] to [0]\nend\n\ndefine Walk (direction) (speed)\npoint in direction (direction)\nchange x by (speed)\nset [slope v] to [0]\nrepeat until <<(slope) = [8]> or <not <<touching (level_hit v)?> or <touching (storm eagle platform v)?>>>>\n    change y by (1)\n    change [slope v] by (1)\nend\nif <(slope) = [8]> then\n    change x by ((0) - (speed))\n    change y by ((0) - (slope))\n    if <<<(falling?) > [10]> and <(Wall Jump) = [0]>> and <<not <(Moving Right) = [1]>> and <not <(Moving Left) = [1]>>>> then\n        set [wall slide v] to [1]\n        set [speed y v] to [0]\n        set [gravity toggle v] to [0]\n        set [falling? v] to [0]\n        set [wall jump animation v] to [0]\n        set [dashing v] to [0]\n        start sound [MMX1_SE_00015 v]\n    end\n    if <<(Wall Slide) = [1]> and <(Wall Jump) = [0]>> then\n        if <(@Wall Cling) > [3]> then\n            set [speed y v] to [-2]\n        end\n        if <<<key (up arrow v) pressed?> or <key (w v) pressed?>> and <<(Wall Jump) = [0]> and <<(Moving Left) = [0]> and <(Moving Right) = [0]>>>> then\n            if <(direction) = [90]> then\n                point in direction (-90)\n                set [moving left v] to [1]\n                set [moving right v] to [0]\n            else\n                if <(direction) = [-90]> then\n                    point in direction (90)\n                    set [moving right v] to [1]\n                    set [moving left v] to [0]\n                end\n            end\n            if <key (c v) pressed?> then\n                set [dashing v] to [2]\n            end\n            set [speed y v] to [13]\n            set [wall slide v] to [0]\n            set [gravity toggle v] to [1]\n            set [falling? v] to [6]\n            set [wall jump v] to [8]\n            set [wall jump animation v] to [1]\n            set [@wall jump v] to [0]\n            start sound [MMX1_SE_00014 v]\n        end\n    end\n    if <(Dashing) = [1]> then\n        set [dashing v] to [0]\n        set [@dash v] to [0]\n    end\nend\nif <<(Wall Slide) = [1]> and <(slope) = [0]>> then\n    set [wall slide v] to [0]\n    set [gravity toggle v] to [1]\n    set [falling? v] to [6]\nend\nif <(Wall Slide) = [1]> then\n    set [animation state v] to [9]\nelse\n    if <(Dashing) = [1]> then\n        set [animation state v] to [2]\n        if <(falling?) > [5]> then\n            set [dashing v] to [2]\n        end\n    else\n        set [animation state v] to [1]\n    end\nend\nset [@idle_fire v] to [0]\n\ndefine Scrolling Blocks\nchange [scroll x v] by (x position)\nif <(Scroll X) < (Scroll X Min)> then\n    set [scroll x v] to (Scroll X Min)\nelse\n    if <(Scroll X) > (Scroll X Max)> then\n        set [scroll x v] to (Scroll X Max)\n    else\n        set x to (0)\n    end\nend\nchange [scroll y v] by (y position)\nif <(Scroll Y) < (Scroll Y Min)> then\n    set [scroll y v] to (Scroll Y Min)\nelse\n    if <(Scroll Y) > (Scroll Y Max)> then\n        set [scroll y v] to (Scroll Y Max)\n    else\n        set y to (0)\n    end\nend\n\ndefine Animation\nif <(falling?) < [6]> then\n    if <<(Animation State) = [1]> and <(Wall Slide) = [0]>> then\n        set [@idle v] to [0]\n        set [@jump v] to [0]\n        set [@fall v] to [0]\n        set [@wall cling v] to [0]\n        set [@wall jump v] to [0]\n        set [@dash v] to [0]\n        set [@idle_fire v] to [0]\n        change [@walk v] by (1)\n        if <(Firing) = [1]> then\n            if <(@Walk) > [0]> then\n                set [costume no. v] to [31]\n            end\n            if <(@Walk) > [2]> then\n                set [costume no. v] to [31]\n            end\n            if <(@Walk) > [4]> then\n                set [costume no. v] to [32]\n            end\n            if <(@Walk) > [6]> then\n                set [costume no. v] to [33]\n            end\n            if <(@Walk) > [8]> then\n                set [costume no. v] to [34]\n            end\n            if <(@Walk) > [10]> then\n                set [costume no. v] to [35]\n            end\n            if <(@Walk) > [12]> then\n                set [costume no. v] to [36]\n            end\n            if <(@Walk) > [14]> then\n                set [costume no. v] to [37]\n            end\n            if <(@Walk) > [16]> then\n                set [costume no. v] to [38]\n            end\n            if <(@Walk) > [18]> then\n                set [costume no. v] to [39]\n            end\n            if <(@Walk) > [20]> then\n                set [costume no. v] to [40]\n            end\n            if <(@Walk) > [22]> then\n                set [costume no. v] to [31]\n                set [@walk v] to [3]\n            end\n        else\n            if <(@Walk) = [1]> then\n                set [costume no. v] to [4]\n            end\n            if <(@Walk) = [3]> then\n                set [costume no. v] to [5]\n            end\n            if <(@Walk) = [5]> then\n                set [costume no. v] to [6]\n            end\n            if <(@Walk) = [7]> then\n                set [costume no. v] to [7]\n            end\n            if <(@Walk) = [9]> then\n                set [costume no. v] to [8]\n            end\n            if <(@Walk) = [11]> then\n                set [costume no. v] to [9]\n            end\n            if <(@Walk) = [13]> then\n                set [costume no. v] to [10]\n            end\n            if <(@Walk) = [15]> then\n                set [costume no. v] to [11]\n            end\n            if <(@Walk) = [17]> then\n                set [costume no. v] to [12]\n            end\n            if <(@Walk) = [19]> then\n                set [costume no. v] to [13]\n            end\n            if <(@Walk) = [21]> then\n                set [costume no. v] to [14]\n            end\n            if <(@Walk) = [23]> then\n                set [costume no. v] to [5]\n                set [@walk v] to [3]\n            end\n        end\n    else\n        if <(Animation State) = [2]> then\n            set [@fall v] to [0]\n            set [@idle v] to [0]\n            set [@jump v] to [0]\n            set [@walk v] to [0]\n            set [@wall cling v] to [0]\n            set [@wall jump v] to [0]\n            set [@idle_fire v] to [0]\n            change [@dash v] by (1)\n            if <(Firing) = [1]> then\n                if <(@Dash) > [0]> then\n                    set [costume no. v] to [41]\n                end\n                if <(@Dash) > [3]> then\n                    set [costume no. v] to [42]\n                end\n                if <(@Dash) > [15]> then\n                    set [costume no. v] to [41]\n                end\n                if <(@Dash) > [17]> then\n                    set [costume no. v] to [29]\n                    set [dashing v] to [0]\n                end\n            else\n                if <(@Dash) = [1]> then\n                    set [costume no. v] to [15]\n                end\n                if <(@Dash) = [4]> then\n                    set [costume no. v] to [16]\n                end\n                if <(@Dash) = [16]> then\n                    set [costume no. v] to [15]\n                end\n                if <(@Dash) = [18]> then\n                    set [costume no. v] to [1]\n                    set [dashing v] to [0]\n                end\n            end\n        else\n            if <<(Animation State) = [9]> and <(Wall Slide) = [1]>> then\n                set [@fall v] to [0]\n                set [@idle v] to [0]\n                set [@jump v] to [0]\n                set [@walk v] to [0]\n                set [@wall jump v] to [0]\n                set [@dash v] to [0]\n                set [@idle_fire v] to [0]\n                change [@wall cling v] by (1)\n                if <(Firing) = [1]> then\n                    if <(@Wall Cling) > [0]> then\n                        set [costume no. v] to [50]\n                    end\n                    if <(@Wall Cling) > [3]> then\n                        set [costume no. v] to [51]\n                    end\n                    if <(@Wall Cling) > [6]> then\n                        set [costume no. v] to [52]\n                    end\n                else\n                    if <(@Wall Cling) = [1]> then\n                        set [costume no. v] to [24]\n                    end\n                    if <(@Wall Cling) = [4]> then\n                        set [costume no. v] to [25]\n                    end\n                    if <(@Wall Cling) > [6]> then\n                        set [costume no. v] to [26]\n                    end\n                end\n            else\n                if <(Firing) = [1]> then\n                    set [@dash v] to [0]\n                    set [@fall v] to [0]\n                    set [@idle v] to [0]\n                    set [@jump v] to [0]\n                    set [@walk v] to [0]\n                    set [@wall cling v] to [0]\n                    set [@wall jump v] to [0]\n                    change [@idle_fire v] by (1)\n                    if <(@Idle_Fire) = [1]> then\n                        set [costume no. v] to [29]\n                    end\n                    if <(@Idle_Fire) = [3]> then\n                        set [costume no. v] to [30]\n                    end\n                    if <(@Idle_Fire) = [6]> then\n                        set [costume no. v] to [29]\n                    end\n                else\n                    set [@fall v] to [0]\n                    set [@jump v] to [0]\n                    set [@walk v] to [0]\n                    set [@wall cling v] to [0]\n                    set [@wall jump v] to [0]\n                    set [@dash v] to [0]\n                    set [@idle_fire v] to [0]\n                    change [@idle v] by (1)\n                    if <(@Idle) = [1]> then\n                        set [costume no. v] to [1]\n                    end\n                    if <(@Idle) = [80]> then\n                        set [costume no. v] to [2]\n                    end\n                    if <(@Idle) = [82]> then\n                        set [costume no. v] to [3]\n                    end\n                    if <(@Idle) = [84]> then\n                        set [costume no. v] to [2]\n                    end\n                    if <(@Idle) = [86]> then\n                        set [costume no. v] to [1]\n                        set [@idle v] to [1]\n                    end\n                end\n            end\n        end\n    end\nelse\n    if <(Wall Jump Animation) = [1]> then\n        set [@fall v] to [0]\n        set [@idle v] to [0]\n        set [@jump v] to [0]\n        set [@walk v] to [0]\n        set [@wall cling v] to [0]\n        set [@dash v] to [0]\n        set [@idle_fire v] to [0]\n        change [@wall jump v] by (1)\n        if <(Firing) = [1]> then\n            if <(@Wall Jump) > [0]> then\n                set [costume no. v] to [53]\n            end\n            if <(@Wall Jump) > [3]> then\n                set [costume no. v] to [54]\n            end\n            if <(@Wall Jump) > [9]> then\n                set [@jump v] to [5]\n                set [costume no. v] to [45]\n                set [wall jump animation v] to [0]\n            end\n        else\n            if <(@Wall Jump) = [1]> then\n                set [costume no. v] to [27]\n            end\n            if <(@Wall Jump) = [4]> then\n                set [costume no. v] to [28]\n            end\n            if <(@Wall Jump) = [10]> then\n                set [@jump v] to [5]\n                set [costume no. v] to [19]\n                set [wall jump animation v] to [0]\n            end\n        end\n    else\n        if <(speed y) > [0]> then\n            set [@walk v] to [0]\n            set [@idle v] to [0]\n            set [@fall v] to [0]\n            set [@wall cling v] to [0]\n            set [@wall jump v] to [0]\n            set [@dash v] to [0]\n            set [@idle_fire v] to [0]\n            change [@jump v] by (1)\n            if <(Firing) = [1]> then\n                if <(@Jump) > [0]> then\n                    set [costume no. v] to [43]\n                end\n                if <(@Jump) > [2]> then\n                    set [costume no. v] to [44]\n                end\n                if <(@Jump) > [4]> then\n                    set [costume no. v] to [45]\n                end\n            else\n                if <(@Jump) = [1]> then\n                    set [costume no. v] to [17]\n                end\n                if <(@Jump) = [3]> then\n                    set [costume no. v] to [18]\n                end\n                if <(@Jump) = [5]> then\n                    set [costume no. v] to [19]\n                end\n            end\n        else\n            set [@walk v] to [0]\n            set [@idle v] to [0]\n            set [@jump v] to [0]\n            set [@wall cling v] to [0]\n            set [@wall jump v] to [0]\n            set [@dash v] to [0]\n            set [@idle_fire v] to [0]\n            change [@fall v] by (1)\n            if <(Firing) = [1]> then\n                if <(@Fall) > [0]> then\n                    set [costume no. v] to [46]\n                end\n                if <(@Fall) > [2]> then\n                    set [costume no. v] to [47]\n                end\n            else\n                if <(@Fall) = [1]> then\n                    set [costume no. v] to [20]\n                end\n                if <(@Fall) = [3]> then\n                    set [costume no. v] to [21]\n                end\n            end\n        end\n    end\nend\n\nwhen I receive [game start v]\nbroadcast (Transition In v) and wait\nbroadcast (Level Loop v)\nbroadcast (Play v)\nbroadcast (Transition Out v) and wait\nbroadcast (Play BG Music v)\n\nbroadcast (SetUp v) and wait\n\n@Player Projectile\n\nwhen flag clicked\nset [shot type v] to [0]\nset [type v] to [0]\nset [costume no. v] to [1]\nset rotation style [left-right v]\ngo to x: (0) y: (0)\nswitch costume to (x_buster_lv1 v)\nset size to (200) %\nhide\n\nwhen I start as a clone\nset [type v] to (Shot Type)\npoint in direction ([direction v] of [player v])\nif <([wall slide v] of [player v]) = [1]> then\n    if <([direction v] of [player v]) > [0]> then\n        go to x: (([x position v] of [player v]) - (20)) y: (([y position v] of [player v]) + (35))\n        point in direction (-90)\n    end\n    if <([direction v] of [player v]) < [0]> then\n        go to x: (([x position v] of [player v]) + (20)) y: (([y position v] of [player v]) + (35))\n        point in direction (90)\n    end\nelse\n    if <([wall jump v] of [player v]) > [0]> then\n        if <([direction v] of [player v]) > [0]> then\n            go to x: (([x position v] of [player v]) - (20)) y: (([y position v] of [player v]) + (35))\n            point in direction (-90)\n        end\n        if <([direction v] of [player v]) < [0]> then\n            go to x: (([x position v] of [player v]) + (20)) y: (([y position v] of [player v]) + (35))\n            point in direction (90)\n        end\n    else\n        if <([direction v] of [player v]) > [0]> then\n            go to x: (([x position v] of [player v]) + (20)) y: (([y position v] of [player v]) + (35))\n        end\n        if <([direction v] of [player v]) < [0]> then\n            go to x: (([x position v] of [player v]) - (20)) y: (([y position v] of [player v]) + (35))\n        end\n    end\nend\nshow\nforever\n    if <(type) = [1]> then\n        move (14) steps\n        if <touching (level_hit v)?> then\n            start sound [MMX1_SE_00026 v]\n            delete this clone\n        end\n        if <touching (_edge_ v)?> then\n            delete this clone\n        end\n    end\n    if <(type) = [2]> then\n        move (15) steps\n        if <touching (_edge_ v)?> then\n            delete this clone\n        end\n    end\n    if <(type) = [3]> then\n        move (16) steps\n        if <touching (_edge_ v)?> then\n            delete this clone\n        end\n    end\n    Animation\n    Set Costume (Costume NO.)\nend\n\ndefine Set Costume (#costume)\nif <not <(#costume) = (costume [number v])>> then\n    switch costume to (#costume)\nend\n\ndefine Animation\nif <(type) = [2]> then\n    set [@lv3shot v] to [0]\n    change [@lv2shot v] by (1)\n    if <(@LV2Shot) = [1]> then\n        set [costume no. v] to [5]\n    end\n    if <(@LV2Shot) = [3]> then\n        set [costume no. v] to [6]\n    end\n    if <(@LV2Shot) = [5]> then\n        set [costume no. v] to [7]\n    end\n    if <(@LV2Shot) = [7]> then\n        set [costume no. v] to [8]\n    end\n    if <(@LV2Shot) = [9]> then\n        set [costume no. v] to [9]\n    end\n    if <(@LV2Shot) = [11]> then\n        set [costume no. v] to [5]\n        set [@lv2shot v] to [1]\n    end\nelse\n    if <(type) = [3]> then\n        set [@lv2shot v] to [0]\n        change [@lv3shot v] by (1)\n        if <(@LV3Shot) = [1]> then\n            set [costume no. v] to [14]\n        end\n        if <(@LV3Shot) = [3]> then\n            set [costume no. v] to [15]\n        end\n        if <(@LV3Shot) = [5]> then\n            set [costume no. v] to [16]\n        end\n        if <(@LV3Shot) = [7]> then\n            set [costume no. v] to [14]\n            set [@lv3shot v] to [1]\n        end\n    else\n        set [@lv2shot v] to [0]\n        set [@lv3shot v] to [0]\n        set [costume no. v] to [1]\n    end\nend\n\n