Avatar Escape (A Platformer Maker tutorial/game)
@Stage\n\nwhen flag clicked\nswitch backdrop to (backdrop1 v)\n\nwhen I receive [end v]\nerase all\nswitch backdrop to (escape v)\nbroadcast (Coins hide v)\n\n@Creator\n\nwhen I receive [next costume v]\nnext costume\n\nwhen I receive [last costume v]\nswitch costume to ((costume [number v]) - (1))\n\nwhen this sprite clicked\nbroadcast (Backdrop switch v)\nset [costume v] to (costume [number v])\nbroadcast (When green flag clicked v)\nhide\n\nwhen flag clicked\nswitch costume to (costume1 v)\nshow\n\n@Next\n\nwhen flag clicked\nshow\n\nwhen this sprite clicked\nbroadcast (Next costume v)\n\nwhen I receive [when green flag clicked v]\nhide\n\n@Back\n\nwhen flag clicked\nshow\n\nwhen this sprite clicked\nbroadcast (Last costume v)\n\nwhen I receive [when green flag clicked v]\nhide\n\n@Pen\n\nwhen I receive [when green flag clicked v]\nset pen size to (4)\nset pen color to (#000000)\nset size to (330) %\nerase all\ngo to x: (0) y: (0)\nerase all\nshow\nerase all\nwait (0.1) seconds\nerase all\nchange [pen v] by (1)\nerase all\nforever\n    if <(Pen) = [1]> then\n        if <mouse down?> then\n            pen down\n        else\n            pen up\n        end\n    end\nend\n\nwhen flag clicked\nhide\nerase all\n\nwhen [space v] key pressed\nchange [pen v] by (1)\npen up\nhide\nbroadcast (Done v)\n\nwhen I receive [when green flag clicked v]\nerase all\nforever\n    go to (mouse-pointer v)\nend\n\nwhen flag clicked\nset [pen v] to [0]\n\nwhen backdrop switches to [backdrop2 v]\nerase all\nhide\n\n@Instuction\n\nwhen flag clicked\nset [pressing of space key v] to [0]\nset [numbering v] to [0]\ngo to x: (-1) y: (-11)\nhide\nswitch costume to (costume1 v)\n\nwhen backdrop switches to [backdrop2 v]\nhide\n\nwhen I receive [its end v]\nswitch costume to (costume2 v)\nshow\nwait (2) seconds\nhide\nif <(Pressing of space key) = [0]> then\n    broadcast (Ending point v)\nend\nset [pressing of space key v] to [1]\n\nwhen I receive [done v]\nswitch costume to (costume1 v)\nshow\nwait (2) seconds\nhide\nif <(Pressing of space key) = [0]> then\n    broadcast (Starting point v)\nend\n\nwhen I receive [collectibles instruction v]\nswitch costume to (costume3 v)\nshow\nwait (2) seconds\nhide\nbroadcast (Collectibles v)\n\n@Avatar\n\nwhen flag clicked\nhide\nset size to (138) %\nset [yv v] to [0]\nset [xv v] to [0]\n\nwhen I receive [all positions are confirmed v]\nforever\n    if <touching (end v)?> then\n        broadcast (End v)\n    end\nend\n\nwhen backdrop switches to [backdrop2 v]\nhide\n\nwhen I receive [all positions are confirmed v]\nswitch costume to (Costume)\ngo to (start v)\nchange y by (20)\nshow\nforever\n    change [yv v] by (-0.5)\n    if <key (right arrow v) pressed?> then\n        change [xv v] by (0.7)\n        point in direction (90)\n    end\n    if <key (left arrow v) pressed?> then\n        change [xv v] by (-0.7)\n        point in direction (90)\n    end\n    set [xv v] to ((Xv) * (0.9))\n    change x by (Xv)\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 ((Xv) * (-1))\n                            change x by (-1)\n                            change y by (-5)\n                            change x by (1)\n                            if <key (up arrow v) pressed?> then\n                                set [xv v] to [-8]\n                                if <(Xv) > [0]> then\n                                    set [xv v] to [8]\n                                else\n                                    set [yv v] to [10]\n                                end\n                            else\n                                set [xv v] to [0]\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\n    change y by (Yv)\n    if <touching color (#000000)?> then\n        change y by ((Yv) * (-1))\n        set [yv v] to [0]\n    end\n    change y by (-1)\n    if <touching color (#000000)?> then\n        if <key (up arrow v) pressed?> then\n            set [yv v] to [10]\n        end\n    end\n    change y by (1)\nend\n\nwhen flag clicked\nforever\n    if <(y position) < [-165]> then\n        go to (start v)\n        change y by (20)\n        broadcast (Restart v)\n    end\nend\n\nwhen flag clicked\nforever\n    if <touching (collectible v)?> then\n        broadcast (Collectible 1 is found v)\n    end\n    if <touching (collectible2 v)?> then\n        broadcast (Collectible 2 is found v)\n    end\n    if <touching (collectible3 v)?> then\n        broadcast (Collectible 3 is found v)\n    end\nend\n\nwhen I receive [end v]\nhide\n\n@Start\n\nwhen flag clicked\nhide\n\nwhen backdrop switches to [backdrop2 v]\nhide\n\nwhen I receive [starting point v]\nset [starting point v] to [Nothing]\nshow\nchange [ghost v] effect by (50)\nrepeat until <not <(Starting point) = [Nothing]>>\n    go to (mouse-pointer v)\n    if <mouse down?> then\n        set [starting point v] to [0]\n        clear graphic effects\n        show\n        set [mouse y v] to (mouse y)\n        set [mouse x v] to (mouse x)\n        broadcast (Its end v)\n    end\nend\n\nwhen I receive [end v]\nhide\n\n@End\n\nwhen flag clicked\nhide\n\nwhen I receive [confirmation ending point v]\nshow\ngo to x: (mex) y: (Mey)\nbroadcast (Collectibles v)\n\nwhen backdrop switches to [backdrop2 v]\nhide\n\nwhen I receive [ending point v]\nset [ending point v] to [Nothing]\nshow\nchange [ghost v] effect by (50)\nrepeat until <not <(Ending point) = [Nothing]>>\n    go to (mouse-pointer v)\n    if <mouse down?> then\n        set [ending point v] to [0]\n        clear graphic effects\n        show\n        set [mey v] to (mouse y)\n        set [mex v] to (mouse x)\n        broadcast (Collectibles instruction v)\n    end\nend\n\nwhen I receive [end v]\nhide\n\n@Modes\n\nwhen flag clicked\nswitch costume to (costume1 v)\nshow\n\nwhen I receive [when green flag clicked v]\nswitch costume to (costume2 v)\n\nwhen [space v] key pressed\nswitch costume to (costume3 v)\n\nwhen backdrop switches to [backdrop2 v]\nhide\n\nwhen I receive [end v]\nhide\n\n@Thumbnail\n\nwhen flag clicked\nhide\n\ngo to [front v] layer\nshow\n\n@Collectible\n\nwhen flag clicked\nhide\nset [collectibles v] to [Nothing]\nset size to (190) %\n\nwhen I receive [collectibles v]\nwait (1.5) seconds\nshow\nchange [ghost v] effect by (50)\nrepeat until <not <(Collectibles) = [Nothing]>>\n    go to (mouse-pointer v)\n    if <mouse down?> then\n        set [collectibles v] to [0]\n        clear graphic effects\n        show\n        broadcast (Collectible2 v)\n    end\nend\n\nwhen I receive [collectible 1 is found v]\nstart sound [pop v]\nhide\n\nwhen I receive [restart v]\nshow\n\nwhen I receive [coins hide v]\nhide\n\nwhen I receive [end v]\nhide\n\n@Collectible2\n\nwhen flag clicked\nhide\nset [collectible2 v] to [Nothing]\nset size to (190) %\n\nwhen I receive [collectible2 v]\nwait (1.5) seconds\nshow\nchange [ghost v] effect by (50)\nrepeat until <not <(Collectible2) = [Nothing]>>\n    go to (mouse-pointer v)\n    if <mouse down?> then\n        set [collectible2 v] to [0]\n        clear graphic effects\n        show\n        broadcast (Collectible 3 v)\n    end\nend\n\nwhen I receive [collectible 2 is found v]\nstart sound [pop v]\nhide\n\nwhen I receive [restart v]\nshow\n\nwhen I receive [coins hide v]\nhide\n\nwhen I receive [end v]\nhide\n\n@Collectible3\n\nwhen flag clicked\nhide\nset [collectible3 v] to [Nothing]\nset size to (190) %\n\nwhen I receive [collectible 3 v]\nwait (1.5) seconds\nshow\nchange [ghost v] effect by (50)\nrepeat until <not <(Collectible3) = [Nothing]>>\n    go to (mouse-pointer v)\n    if <mouse down?> then\n        set [collectible3 v] to [0]\n        clear graphic effects\n        show\n        broadcast (All positions are confirmed v)\n    end\nend\n\nwhen I receive [collectible 3 is found v]\nstart sound [pop v]\nhide\n\nwhen I receive [restart v]\nshow\n\nwhen I receive [coins hide v]\nhide\n\nwhen I receive [end v]\nhide\n\n
Escape! The navigator bar used to see which mode you are on is on top of your screen.\nAVATAR MODE: Choose an avatar and click on it.\nPLATFORM MODE: This is the imaginary ground that your Avatar moves on. Draw it out and press the space bar when you are done.\nPLAY MODE: Click where your starting and ending point should be.  WAIT for a coin to show up and click where it should be placed. Place 3 coins.\nPLAY: Collect the coins and reach the end.\n\n\n\n