♻ Earthly home - A platformer 彡
@Stage\n\n@thumbnail\n\nwhen flag clicked\nshow\nforever\n    go to x: (0) y: (0)\n    go to [front v] layer\n    set [ghost v] effect to (100)\nend\n\n@death\n\nwhen flag clicked\ngo to [back v] layer\nhide\n\nwhen I receive [done intro v]\nshow\ngo to x: (0) y: (0)\nset [level v] to [1]\nforever\n    switch costume to (level)\nend\n\n@earth <3\n\nwhen flag clicked\nhide\n\ndefine Platformer engine\nchange [y v] by (-0.5)\nif <<key (left arrow v) pressed?> or <key (a v) pressed?>> then\n    change [x v] by (-1.5)\nend\nif <<key (right arrow v) pressed?> or <key (d v) pressed?>> then\n    change [x v] by (1.5)\nend\nset [x v] to ((X) * (0.9))\nchange x by (X)\nif <touching (platforms v)?> then\n    change y by (1)\n    if <touching (platforms v)?> then\n        change y by (1)\n        if <touching (platforms v)?> then\n            change y by (1)\n            if <touching (platforms v)?> then\n                change y by (1)\n                if <touching (platforms v)?> then\n                    change y by (1)\n                    if <touching (platforms v)?> then\n                        change y by (-6)\n                        change x by ((X) * (-1))\n                        if <<key (w v) pressed?> or <key (up arrow v) pressed?>> then\n                            set [y v] to [10]\n                            if <(X) > [0]> then\n                                set [x v] to [-10]\n                            else\n                                set [x v] to [10]\n                            end\n                        else\n                            set [x v] to [0]\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\nchange y by (Y)\nif <touching (platforms v)?> then\n    change y by ((Y) * (-1))\n    set [y v] to [0]\nend\nchange y by (-0.5)\nif <<touching (platforms v)?> and <<key (up arrow v) pressed?> or <key (w v) pressed?>>> then\n    set [y v] to [15]\nend\nchange y by (0.5)\nif <(x position) > [240]> then\n    change [level v] by (1)\n    go to x: (X spawn) y: (Y spawn)\n    change [☁ score v] by (1)\nend\nif <touching (trampoline v)?> then\n    set [y v] to [15]\nend\nif <[-195] > (y position)> then\n    go to x: (X spawn) y: (Y spawn)\nend\nif <touching (platforms v)?> then\n    go to x: (X spawn) y: (Y spawn)\nend\nif <touching (death v)?> then\n    go to x: (X spawn) y: (Y spawn)\nend\n\nwhen I receive [done intro v]\nshow\n\nwhen I receive [done intro v]\npoint in direction (90)\nset [☁ score v] to [0]\nset [x spawn v] to [-220]\nset [y spawn v] to [-75]\ngo to x: (X spawn) y: (Y spawn)\nshow\nset size to (43) %\nset [x v] to [0]\nset [y v] to [0]\nforever\n    Platformer engine\nend\n\n@platforms\n\nwhen I receive [done intro v]\ngo to [front v] layer\ngo [backward v] (1) layers\nshow\ngo to x: (0) y: (0)\nset [level v] to [1]\nforever\n    switch costume to (level)\nend\n\nwhen flag clicked\nhide\n\nwhen I receive [next!! v]\nswitch costume to (12 v)\n\n@Trampoline\n\nwhen flag clicked\nhide\n\nwhen I receive [done intro v]\nshow\ngo to x: (0) y: (0)\nset [level v] to [1]\nforever\n    switch costume to (level)\nend\n\n@music :>\n\nwhen flag clicked\nforever\n    play sound [Elektronomia - Sky High \[NCS Release\] v] until done\nend\n\n@skip\n\nwhen I receive [done intro v]\nset [level v] to [1]\n\nwhen [s v] key pressed\nchange [level v] by (1)\n\n@Sprite1\n\nwhen flag clicked\nswitch costume to (costume1 v)\ngo to x: (0) y: (0)\nset size to (100) %\ngo to [front v] layer\nclear graphic effects\nset [direction v] to [0]\nforever\n    point in direction (([cos v] of ((direction) * (2)) ) + (93))\n    change [direction v] by (5)\nend\n\nbroadcast (Done intro v)\n\nwhen flag clicked\nshow\n\nwhen I receive [done intro v]\nhide\n\n@Sprite2\n\nwhen I receive [done intro v]\nhide\n\nwhen flag clicked\nshow\n\n@Sprite3\n\nwhen this sprite clicked\nbroadcast (Done intro v)\nhide\n\nwhen flag clicked\nshow\nset size to (100) %\nforever\n    if <touching (mouse-pointer v)?> then\n        set size to (110) %\n    else\n        set size to (100) %\n    end\nend\n\n@Sprite4\n\nwhen flag clicked\nshow\nset size to (100) %\nforever\n    if <touching (mouse-pointer v)?> then\n        set size to (105) %\n    else\n        set size to (100) %\n    end\nend\n\nwhen this sprite clicked\nbroadcast (? v)\n\nwhen I receive [done intro v]\nhide\n\n@Sprite5\n\nwhen flag clicked\nhide\ngo to x: (0) y: (345)\n\nwhen I receive [? v]\ngo to [front v] layer\nshow\nglide (.7) secs to x: (0) y: (0)\n\nwhen this sprite clicked\nglide (.4) secs to x: (0) y: (345)\nhide\n\n