Platformer Engine! #Games #All
@Stage\n\nwhen flag clicked\nforever\n    play sound [Vexento-Pollen v] until done\nend\n\n@Blank\n\n@player\n\ndefine Player Script\ngo to x: (-206) y: (-95)\nshow\ngo [forward v] (1) layers\nset [level v] to [1]\nset [dead v] to [0]\nset size to (16) %\nforever\n    go to [front v] layer\n    if <<<key (right arrow v) pressed?> or <key (d v) pressed?>> or <<mouse down?> and <(mouse x) > (x position)>>> then\n        switch costume to (3 v)\n        change [xv v] by (.8)\n    end\n    if <<<<key (left arrow v) pressed?> or <key (a v) pressed?>> or <<mouse down?> and <(mouse x) < (x position)>>> and <(dead) = [0]>> then\n        switch costume to (4 v)\n        change [xv v] by (-0.8)\n    end\n    set [xv v] to ((Xv) * (.9))\n    change x by (Xv)\n    if <<touching (platform v)?> or <touching (locked v)?>> then\n        change y by (2)\n        if <<touching (platform v)?> or <touching (locked v)?>> then\n            change y by (2)\n            if <<touching (platform v)?> or <touching (locked v)?>> then\n                change y by (2)\n                if <<touching (platform v)?> or <touching (locked v)?>> then\n                    change y by (2)\n                    if <<touching (platform v)?> or <touching (locked v)?>> then\n                        change y by (2)\n                        if <<touching (platform v)?> or <touching (locked v)?>> then\n                            change x by ((Xv) * (-2))\n                            change y by (-5)\n                            if <<key (up arrow v) pressed?> or <<key (w v) pressed?> or <<mouse down?> and <(mouse y) > ((y position) + (10))>>>> 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 [13]\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 (-0.8)\n    change y by (Yv)\n    if <<touching (platform v)?> or <touching (platform v)?>> then\n        change y by ((Yv) * (-1))\n        set [yv v] to [0]\n    end\n    change y by (-1)\n    if <<touching (platform v)?> or <touching (platform v)?>> then\n        if <<key (up arrow v) pressed?> or <<key (w v) pressed?> or <<mouse down?> and <(y position) < (mouse y)>>>> then\n            set [yv v] to [11]\n        end\n    end\n    change y by (1)\n    if <<touching (spike v)?> or <<touching (saws v)?> or <<touching (lava v)?> or <touching (enemies v)?>>>> then\n        repeat (10)\n            change [ghost v] effect by (10)\n        end\n        wait (.1) seconds\n        broadcast (Restart v)\n    end\n    if <(y position) < [-180]> then\n        broadcast (Restart v)\n    end\n    if <<touching (tramps v)?> or <touching (tramps2 v)?>> then\n        set [yv v] to [17]\n    end\nend\n\nwhen I receive [start v]\nforever\n    if <[230] < (x position)> then\n        broadcast (Restart v)\n        change [level v] by (1)\n        Setup\n    end\nend\n\ndefine Setup\nclear graphic effects\npoint in direction (90)\ngo to x: (-220) y: (-16)\nswitch costume to (1 v)\nset [dead v] to [0]\nset [xv v] to [0]\nset [yv v] to [0]\nset size to (16) %\nshow\n\nwhen I receive [end v]\nforever\n    hide\nend\n\nwhen I receive [restart v]\ngo to x: (-212) y: (-81)\nset [ghost v] effect to (0)\n\nwhen I receive [start v]\nPlayer Script\n\nwhen flag clicked\nbroadcast (Start v)\nhide\n\n@Tramps\n\nwhen I receive [start v]\nhide\ngo to [front v] layer\nswitch costume to (costume1 v)\n\nwhen flag clicked\nhide\ngo to x: (0) y: (0)\n\nwhen I receive [end v]\nhide\n\nwhen I receive [start v]\nforever\n    if <touching (player v)?> then\n        switch costume to (costume1 v)\n        repeat (6)\n            wait (.05) seconds\n            next costume\n        end\n    end\n    if <(Level) = [1]> then\n        go to [front v] layer\n        show\n        go to x: (-40) y: (-19)\n    end\n    if <(Level) = [2]> then\n        show\n        go to x: (187) y: (-20)\n    end\n    if <(Level) = [3]> then\n        hide\n    end\n    if <(Level) = [4]> then\n        hide\n    end\n    if <(Level) = [5]> then\n        show\n        go to x: (-110) y: (-22)\n    end\n    if <(Level) = [6]> then\n        show\n        go to x: (140) y: (-22)\n    end\n    if <(Level) = [7]> then\n        show\n        go to x: (-70) y: (-22)\n    end\n    if <(Level) = [8]> then\n        hide\n    end\n    if <(Level) = [9]> then\n        hide\n    end\n    if <(Level) = [10]> then\n        hide\n    end\n    if <(Level) = [11]> then\n        hide\n    end\n    if <(Level) = [12]> then\n        hide\n    end\n    if <(Level) = [13]> then\n        hide\n    end\n    if <(Level) = [14]> then\n        hide\n    end\nend\n\n@Saws\n\nwhen I receive [start v]\ngo to [back v] layer\nhide\nswitch costume to (1 v)\n\nwhen flag clicked\ngo to x: (0) y: (0)\nhide\n\nwhen flag clicked\nforever\n    if <(Level) = [1]> then\n        show\n        go to x: (52) y: (-110)\n        set size to (85) %\n    end\nend\n\nwhen I receive [end v]\nhide\n\nwhen flag clicked\nforever\n    turn right (10) degrees\nend\n\n@platform\n\nwhen I receive [start v]\ngo to x: (0) y: (0)\nshow\n\nwhen flag clicked\nforever\n    switch costume to (Level)\nend\n\nwhen I receive [end v]\nhide\n\nwhen flag clicked\nhide\n\n@spike\n\nwhen I receive [start v]\ngo to [back v] layer\nshow\n\nwhen flag clicked\ngo to x: (0) y: (0)\nhide\n\nwhen flag clicked\nforever\n    switch costume to (Level)\nend\n\n@Lava\n\nwhen flag clicked\ngo [backward v] (3) layers\ngo to x: (0) y: (0)\nshow\nforever\n    switch costume to (Level)\n    set y to (([sin v] of ((timer) * (100)) ) * (5))\nend\n\nwhen flag clicked\nforever\n    switch costume to (Level)\nend\n\n@TB\n\nwhen flag clicked\nhide\n\n
GO FOLLOW MY NEW ACCOUNT PLZ. I AM UNDERRATED, THX!\n@-Zytixon-