Super MarioFormer 2 - a platformer #games
@Stage\n\nwhen I receive [update level v]\nswitch backdrop to (level)\n\n@player\n\ndefine platformer engine | player speed: (player speed) player friction: (player friction) | jump hight: (jump hight) gravity: (gravity) | wall jumping?: (wall jumping?) wall jumping x speed: (wall jumping x speed) wall jumping y speed: (wall jumping y speed)\nset rotation style [don't rotate v]\nswitch costume to (hitbox \(don't change\) v)\nif <<key (right arrow v) pressed?> or <key (d v) pressed?>> then\n    change [xvel v] by (player speed)\n    point in direction (90)\nend\nif <<key (left arrow v) pressed?> or <key (a v) pressed?>> then\n    change [xvel v] by ((player speed) * (-1))\n    point in direction (-90)\nend\nset [xvel v] to ((xvel) * (player friction))\nchange x by (xvel)\nif <touching (level \(add platforms here\) v)?> then\n    set [slope v] to [0]\n    repeat until <<(slope) = [4]> or <not <touching (level \(add platforms here\) v)?>>>\n        change y by (1)\n        change [slope v] by (1)\n    end\n    if <touching (level \(add platforms here\) v)?> then\n        change y by (-4)\n        repeat until <not <touching (level \(add platforms here\) v)?>>\n            if <(xvel) > [0]> then\n                change x by (-1)\n            else\n                change x by (1)\n            end\n        end\n        if <<<key (up arrow v) pressed?> or <key (w v) pressed?>> and <(wall jumping?) = [1]>> then\n            if <(xvel) > [0]> then\n                set [xvel v] to ((wall jumping x speed) * (-1))\n                set [yvel v] to (wall jumping y speed)\n            else\n                set [xvel v] to (wall jumping x speed)\n                set [yvel v] to (wall jumping y speed)\n            end\n        else\n            set [xvel v] to [0]\n        end\n    end\nend\nif <<<key (up arrow v) pressed?> or <key (w v) pressed?>> and <(on ground?) = [1]>> then\n    set [yvel v] to (jump hight)\nend\nchange [yvel v] by (gravity)\nset [on ground? v] to [0]\nchange y by (yvel)\nif <touching (level \(add platforms here\) v)?> then\n    repeat until <not <touching (level \(add platforms here\) v)?>>\n        if <(yvel) > [0]> then\n            change y by (-1)\n        else\n            change y by (1)\n            set [on ground? v] to [1]\n        end\n    end\n    set [yvel v] to [0]\nend\nif <(x position) > [235]> then\n    change [level v] by (1)\n    broadcast (update level v)\nend\nif <touching (danger \(add danger here\) v)?> then\n    broadcast (update level v)\nend\nif <[-179] > (y position)> then\n    broadcast (update level v)\nend\nif <touching (jump pads \(add jump pads here\) v)?> then\n    set [yvel v] to ((jump hight) * (1.7))\nend\nif <(level) = [12]> then\n    switch costume to (imagenes-png-2 v)\nelse\n    switch costume to (hitbox \(don't change\)2 v)\nend\nset rotation style [left-right v]\n\nwhen I receive [update level v]\ngo to x: (-180) y: (-100)\nset [xvel v] to [0]\nset [yvel v] to [0]\nset [on ground? v] to [0]\n\nplatformer engine | player speed: [20] player friction: [0.5] | jump hight: [14] gravity: [-1] | wall jumping?: [0] wall jumping x speed: [0] wall jumping y speed: [0]\n\nplatformer engine | player speed: [3] player friction: [0.7] | jump hight: [20] gravity: [-1] | wall jumping?: [1] wall jumping x speed: [20] wall jumping y speed: [15]\n\nplatformer engine | player speed: [3] player friction: [0.7] | jump hight: [14] gravity: [-0.5] | wall jumping?: [1] wall jumping x speed: [20] wall jumping y speed: [10]\n\nwhen I receive [start v]\npoint in direction (90)\nset [level v] to [1]\nbroadcast (update level v) and wait\nforever\n    platformer engine | player speed: [4] player friction: [0.65] | jump hight: [15] gravity: [-1.5] | wall jumping?: [1] wall jumping x speed: [20] wall jumping y speed: [13]\nend\n\n@level (add platforms here)\n\nwhen I receive [update level v]\nswitch costume to (level)\n\n@danger (add danger here)\n\nwhen I receive [update level v]\ngo to [back v] layer\nswitch costume to (level)\n\n@jump pads (add jump pads here)\n\nwhen I receive [update level v]\ngo to [back v] layer\nswitch costume to (level)\n\n@thumbnail (delete)\n\nwhen flag clicked\nset [ghost v] effect to (100)\n\ngo to [front v] layer\n\n@intro\n\nwhen flag clicked\nshow\ngo to [front v] layer\nswitch costume to (costume1 v)\nrepeat (3)\n    wait (4) seconds\n    next costume\nend\nwait (4) seconds\nbroadcast (start v)\nhide\n\n
**NOT GENERIC**\nWelcome to Super MarioFormer 2! You need to go on an adventure and get peach back!\n\nControls: \nArrow keys or WASD to move.