Platformer Test Demo

Instructions: MOVE - Arrow Keys\nJUMP - Z\nDASH - X (No animations or sounds yet)

@Stage\n\n@Rin\n\nwhen flag clicked\nset [gravity v] to [-5]\nforever\n    if <key (left arrow v) pressed?> then\n        set [x velocity v] to [-8]\n        point in direction (-90)\n    else\n        if <key (right arrow v) pressed?> then\n            point in direction (90)\n            set [x velocity v] to [8]\n        else\n            set [x velocity v] to [0]\n        end\n    end\n    if <not <touching (ground v)?>> then\n        change y by (Gravity)\n    end\n    change x by (X Velocity)\nend\n\nwhen flag clicked\nset rotation style [left-right v]\nforever\n    if <not <key (any v) pressed?>> then\n        set [state v] to [idle]\n    else\n        if <key (right arrow v) pressed?> then\n            set [state v] to [run]\n        end\n    end\n    if <not <key (any v) pressed?>> then\n        set [state v] to [idle]\n    else\n        if <key (left arrow v) pressed?> then\n            set [state v] to [run]\n        end\n    end\n    if <not <key (any v) pressed?>> then\n        set [state v] to [idle]\n    else\n        if <key (z v) pressed?> then\n            set [state v] to [jump]\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <key (z v) pressed?> then\n        repeat (10)\n            set [state v] to [jump]\n            change y by (15)\n        end\n        repeat until <touching (ground v)?>\n            set [state v] to [fall]\n            change y by (-5)\n        end\n    end\n    wait until <not <(State) = [jump]>>\nend\n\nwhen flag clicked\nforever\n    if <key (x v) pressed?> then\n        repeat (10)\n            move (10) steps\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <(State) = [idle]> then\n        if <(costume [number v]) > [1]> then\n            switch costume to (idle01 v)\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <(State) = [run]> then\n        if <<(costume [number v]) < [2]> or <(costume [number v]) > [5]>> then\n            switch costume to (run01 v)\n        else\n            next costume\n            wait (0.2) seconds\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <(State) = [jump]> then\n        switch costume to (jump01 v)\n    end\nend\n\nwhen flag clicked\nforever\n    if <touching (ground v)?> then\n        change y by (5)\n    end\nend\n\nwhen flag clicked\nforever\n    if <(State) = [fall]> then\n        switch costume to (fall01 v)\n        wait until <<(State) = [idle]> or <(State) = [run]>>\n    end\nend\n\nwhen [z v] key pressed\nstart sound [Jump 2 v]\nwait until <not <key (z v) pressed?>>\n\n@Ground\n\n@Rin2\n\nwhen flag clicked\nset [gravity v] to [-5]\nforever\n    if <key (left arrow v) pressed?> then\n        set [x velocity v] to [-8]\n        point in direction (-90)\n    else\n        if <key (right arrow v) pressed?> then\n            point in direction (90)\n            set [x velocity v] to [8]\n        else\n            set [x velocity v] to [0]\n        end\n    end\n    if <not <touching (ground v)?>> then\n        change y by (Gravity)\n    end\n    change x by (X Velocity)\nend\n\nwhen flag clicked\nset rotation style [left-right v]\nforever\n    if <not <key (any v) pressed?>> then\n        set [state v] to [idle]\n    else\n        if <key (right arrow v) pressed?> then\n            set [state v] to [run]\n        end\n    end\n    if <not <key (any v) pressed?>> then\n        set [state v] to [idle]\n    else\n        if <key (left arrow v) pressed?> then\n            set [state v] to [run]\n        end\n    end\n    if <not <key (any v) pressed?>> then\n        set [state v] to [idle]\n    else\n        if <key (z v) pressed?> then\n            set [state v] to [jump]\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <key (z v) pressed?> then\n        repeat (10)\n            set [state v] to [jump]\n            change y by (15)\n        end\n        repeat until <touching (ground v)?>\n            set [state v] to [fall]\n            change y by (-5)\n        end\n    end\n    wait until <not <(State) = [jump]>>\nend\n\nwhen flag clicked\nforever\n    if <key (x v) pressed?> then\n        repeat (10)\n            move (10) steps\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <(State) = [idle]> then\n        if <(costume [number v]) > [5]> then\n            switch costume to (idle01 v)\n        else\n            next costume\n            wait (0.1) seconds\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <(State) = [run]> then\n        if <<(costume [number v]) < [7]> or <(costume [number v]) > [12]>> then\n            switch costume to (run01burner v)\n        else\n            next costume\n            wait (0.01) seconds\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <(State) = [jump]> then\n        switch costume to (jump01 v)\n    end\nend\n\nwhen flag clicked\nforever\n    if <touching (ground v)?> then\n        change y by (5)\n    end\nend\n\nwhen flag clicked\nforever\n    if <(State) = [fall]> then\n        switch costume to (fall02 v)\n        wait (0.1) seconds\n        switch costume to (fall03 v)\n        wait until <<(State) = [idle]> or <(State) = [run]>>\n    end\nend\n\nwhen [z v] key pressed\nstart sound [Jump 2 v]\nwait until <not <key (z v) pressed?>>\n\nwhen flag clicked\nhide\nstop [other scripts in sprite v]\n\n