Lava - A Platformer
@Stage\n\n@Thumbnail\n\nwhen flag clicked\nhide\ngo to x: (0) y: (0)\ngo to [front v] layer\nclear graphic effects\n\nshow\ngo to [front v] layer\n\n@Cubey\n\nwhen I start as a clone\nset size to (60) %\nrepeat (7)\n    change [ghost v] effect by (14)\n    change size by (-3)\nend\ndelete this clone\n\nwhen flag clicked\ngo to x: (-185) y: (0)\npoint in direction (90)\nset rotation style [left-right v]\nset size to (60) %\nswitch backdrop to (1 v)\nswitch costume to (costume1 v)\nshow\nset [x velocity v] to [0]\nset [y velocity v] to [0]\nforever\n    change [y velocity v] by (-0.5)\n    if <<<key (d v) pressed?> or <key (right arrow v) pressed?>> or <<mouse down?> and <(mouse x) > (x position)>>> then\n        change [x velocity v] by (.75)\n        point in direction (90)\n    end\n    if <<<key (a v) pressed?> or <key (left arrow v) pressed?>> or <<mouse down?> and <(mouse x) < (x position)>>> then\n        change [x velocity v] by (-.75)\n        point in direction (-90)\n    end\n    set [x velocity v] to ((X Velocity) * (0.9))\n    change x by (X Velocity)\n    if <touching (ground v)?> then\n        change y by (1)\n        if <touching (ground v)?> then\n            change y by (1)\n            if <touching (ground v)?> then\n                change y by (1)\n                if <touching (ground v)?> then\n                    change y by (1)\n                    if <touching (ground v)?> then\n                        change y by (1)\n                        if <touching (ground v)?> then\n                            change x by ((X Velocity) * (-1))\n                            change x by (-.8)\n                            change y by (-5)\n                            change x by (.8)\n                            if <<<<key (up arrow v) pressed?> or <<mouse down?> and <(mouse y) > (y position)>>> or <key (w v) pressed?>> or <key (space v) pressed?>> then\n                                if <(X Velocity) > [0]> then\n                                    set [x velocity v] to [-2]\n                                else\n                                    set [x velocity v] to [2]\n                                end\n                                set [y velocity v] to [8]\n                            else\n                                set [x velocity v] to [0]\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\n    change y by (Y Velocity)\n    if <touching (ground v)?> then\n        change y by ((Y Velocity) * (-1))\n        set [y velocity v] to [0]\n    end\n    change y by (-1)\n    if <touching (ground v)?> then\n        if <<<key (up arrow v) pressed?> or <key (w v) pressed?>> or <<mouse down?> and <(mouse y) > (y position)>>> then\n            set [y velocity v] to [8]\n        end\n    end\n    change y by (1)\nend\n\nwhen flag clicked\nforever\n    if <[230] < (x position)> then\n        if <(Level) < [30]> then\n            change [level v] by (1)\n            broadcast (next lvl v)\n            set x to (-220)\n        end\n    end\nend\n\nwhen flag clicked\nset [trail v] to [Yes]\nset size to (60) %\nforever\n    if <(Trail) = [Yes]> then\n        create clone of (_myself_ v)\n    end\nend\n\nset [trail v] to [Yes]\n\nset [trail v] to [No]\n\nwhen flag clicked\nswitch costume to (costume1 v)\nforever\n    if <touching (sprite1 v)?> then\n        go to x: (-185) y: (-25)\n    end\nend\n\nwhen I receive [message1 v]\nswitch costume to (costume2 v)\n\n@Ground\n\nwhen flag clicked\nshow\nset [level v] to [1]\nforever\n    switch costume to (Level)\nend\n\nwhen I receive [next lvl v]\nnext costume\n\n@Sprite1\n\nwhen flag clicked\nset [level v] to [1]\nforever\n    switch costume to (Level)\n    go to [back v] layer\nend\n\nwhen I receive [next lvl v]\nnext costume\n\n@Sprite2\n\nwhen flag clicked\nforever\n    play sound [TheFatRat - Origin v] until done\nend\n\n@text\n\nwhen flag clicked\ngo to [back v] layer\nshow\nforever\n    switch costume to (Level)\n    go to x: (0) y: (0)\nend\n\n@detector\n\nwhen flag clicked\nshow\nset [ghost v] effect to (100)\nset [actions \(love/fave\) v] to [0]\nforever\n    set [touching v] to [none]\n    Detect [love] at [-201] [-220]\n    Detect [fave] at [-201] [-220]\nend\n\ndefine Detect (thing) at (x) (y)\nswitch costume to (empty v)\nset size to (27000) %\ngo to x: (x) y: (y)\nset size to (100) %\nswitch costume to (thing)\nif <touching (mouse-pointer v)?> then\n    set [touching v] to (costume [name v])\nend\n\nwhen flag clicked\nforever\n    wait until <(touching) = [love]>\n    wait (0.2) seconds\n    if <(touching) = [love]> then\n        change [actions \(love/fave\) v] by (1)\n        stop [this script v]\n    end\nend\n\nwhen flag clicked\nforever\n    wait until <(touching) = [fave]>\n    wait (0.2) seconds\n    if <(touching) = [fave]> then\n        change [actions \(love/fave\) v] by (1)\n        stop [this script v]\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Actions \(love/fave\)) = [2]> then\n        broadcast (message1 v)\n    end\nend\n\n@Love fave2\n\nwhen flag clicked\nhide\ngo to x: (-240) y: (130)\nshow\ngo to [front v] layer\nrepeat (9)\n    change y by (-4)\nend\nrepeat (5)\n    change y by (3)\nend\nrepeat (5)\n    change y by (-1)\nend\nwait (2.7) seconds\nrepeat (15)\n    change y by (7)\nend\nhide\n\ngo to x: (-240) y: (50)\n\n
Lava - A Platformer\n-------------------------------------------------------------------------\n\nControls:\nW A S D, Mobile Controls (touch), Arrow keys\n