Platformer Made Easy (Tutorial)
@Stage\n\nwhen I receive [message1 v]\nclear graphic effects\nstop [other scripts in stage v]\n\nwhen flag clicked\nswitch backdrop to (backdrop11 v)\nforever\n    if <key (right arrow v) pressed?> then\n        repeat (10)\n            change [ghost v] effect by (10)\n        end\n        next backdrop\n        repeat (10)\n            change [ghost v] effect by (-10)\n        end\n        wait until <not <key (right arrow v) pressed?>>\n        clear graphic effects\n    end\n    if <key (left arrow v) pressed?> then\n        repeat (10)\n            change [ghost v] effect by (10)\n        end\n        switch backdrop to ((backdrop [number v]) - (1))\n        repeat (10)\n            change [ghost v] effect by (-10)\n        end\n        wait until <not <key (right arrow v) pressed?>>\n        clear graphic effects\n    end\nend\n\n@Sprite1\n\nwhen backdrop switches to [backdrop12 v]\ngo to x: (-186) y: (-99)\nshow\n\nwhen flag clicked\nhide\n\nwhen backdrop switches to [backdrop12 v]\nbroadcast (message1 v)\nset [xv v] to [0]\nset [yv v] to [0]\nforever\n    if <key (right arrow v) pressed?> then\n        change [xv v] by (1)\n    end\n    if <key (left arrow v) pressed?> then\n        change [xv v] by (-1)\n    end\n    set [xv v] to ((Xv) * (0.9))\n    change x by (Xv)\n    if <touching color (#666666)?> then\n        change y by (1)\n        if <touching color (#666666)?> then\n            change y by (1)\n            if <touching color (#666666)?> then\n                change y by (1)\n                if <touching color (#666666)?> then\n                    change y by (1)\n                    if <touching color (#666666)?> then\n                        change y by (1)\n                        if <touching color (#666666)?> then\n                            change x by ((Xv) * (-1))\n                            change y by (-5)\n                            if <key (up arrow v) pressed?> then\n                                if <(Xv) > [0]> then\n                                    set [xv v] to [-5]\n                                else\n                                    set [xv v] to [5]\n                                end\n                                set [yv v] to [10]\n                            else\n                                set [xv v] to [0]\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\n    change [yv v] by (-1)\n    change y by (Yv)\n    if <touching color (#666666)?> then\n        change y by ((Yv) * (-1))\n        set [yv v] to [0]\n    end\n    change y by (-1)\n    if <touching color (#666666)?> then\n        if <key (up arrow v) pressed?> then\n            set [yv v] to [15]\n        end\n    end\n    change y by (1)\nend\n\n
Use the arrow keys to navigate slides