Northern Lights Platformer! || Mobile Friendly
@Stage\n\nwhen flag clicked\nset [pitch v] effect to (-30)\nswitch backdrop to (backdrop1 v)\nforever\n    play sound [Vexento - Pixel Party v] until done\nend\n\nwhen I receive [next level v]\nnext backdrop\n\n@player\n\nwhen flag clicked\nshow\npoint in direction (90)\nset size to (100) %\ngo to x: (-200) y: (100)\nforever\n    Platform engine\nend\n\nwhen I start as a clone\ngo to [back v] layer\nswitch costume to (trail v)\nrepeat (20)\n    change [ghost v] effect by (15)\n    change size by (-5)\nend\ndelete this clone\n\nwhen I receive [next level v]\ngo to x: (-200) y: (-80)\n\ndefine Timer\nrepeat until <(backdrop [number v]) = [10]>\n    change [timer v] by (0.1)\n    wait (0.1) seconds\nend\n\nwhen flag clicked\nset [timer v] to [0]\nforever\n    Timer\nend\n\ndefine Platform engine\nif <<<key (right arrow v) pressed?> or <key (d v) pressed?>> or <<mouse down?> and <(mouse x) > (x position)>>> then\n    change [x velocity v] by (2)\nelse\n    if <<<key (left arrow v) pressed?> or <key (a v) pressed?>> or <<mouse down?> and <(x position) > (mouse x)>>> then\n        change [x velocity v] by (-2)\n    end\nend\nset [x velocity v] to ((X velocity) * ((0.78) - (friction)))\nchange x by (X velocity)\nchange [y velocity v] by (-1.2)\nif <touching (ground v)?> then\n    change y by (1)\nend\nif <touching (ground v)?> then\n    change y by (1)\nend\nif <touching (ground v)?> then\n    change y by (1)\nend\nif <touching (ground v)?> then\n    change y by (1)\nend\nif <touching (ground v)?> then\n    change x by ((X velocity) * (-1))\n    if <<<key (space v) pressed?> or <<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 [15]\n        if <(X velocity) > [0]> then\n            set [x velocity v] to [-7]\n        else\n            set [x velocity v] to [7]\n        end\n    else\n        set [x velocity v] to [0]\n    end\nend\nchange y by (Y velocity)\nif <touching (ground v)?> then\n    change y by ((Y velocity) - ((Y velocity) * (2)))\n    set [y velocity v] to [0]\nend\nchange y by (-1)\nif <<<<key (space v) pressed?> or <<key (up arrow v) pressed?> or <key (w v) pressed?>>> or <<mouse down?> and <(mouse y) > (y position)>>> and <touching (ground v)?>> then\n    set [y velocity v] to [15]\nend\nif <(x position) > [237]> then\n    broadcast (next level v)\nend\nif <<touching (danger v)?> or <<touching (danger2 v)?> or <<touching (danger3 v)?> or <touching (danger4 v)?>>>> then\n    go to x: (-200) y: (-80)\nend\n\nwhen flag clicked\nforever\n    if <not <<<<<<<<key (right arrow v) pressed?> or <key (left arrow v) pressed?>> or <key (a v) pressed?>> or <key (d v) pressed?>> or <key (w v) pressed?>> or <key (space v) pressed?>> or <key (up arrow v) pressed?>> or <mouse down?>>> then\n        switch costume to (idle v)\n    end\n    if <<<<key (up arrow v) pressed?> or <<key (w v) pressed?> or <key (space v) pressed?>>> or <<mouse down?> and <<(mouse y) > (y position)> and <(X velocity) < [0]>>>> and <not <<<key (right arrow v) pressed?> or <key (d v) pressed?>> or <<key (left arrow v) pressed?> or <key (a v) pressed?>>>>> then\n        switch costume to (up v)\n    end\n    if <<<<<key (right arrow v) pressed?> or <key (d v) pressed?>> or <<mouse down?> and <(mouse x) > (x position)>>> and <<<key (up arrow v) pressed?> or <<key (w v) pressed?> or <key (space v) pressed?>>> or <(mouse y) > (y position)>>> and <[-40] < (y position)>> then\n        switch costume to (up right v)\n    end\n    if <<<<<key (left arrow v) pressed?> or <key (a v) pressed?>> or <<mouse down?> and <(x position) > (mouse x)>>> and <<<key (up arrow v) pressed?> or <<key (w v) pressed?> or <key (space v) pressed?>>> or <(mouse y) > (y position)>>> and <[-40] < (y position)>> then\n        switch costume to (up left v)\n    end\n    if <<<<key (left arrow v) pressed?> or <key (a v) pressed?>> or <<mouse down?> and <(x position) > (mouse x)>>> and <not <<<key (up arrow v) pressed?> or <<key (w v) pressed?> or <key (space v) pressed?>>> or <<mouse down?> and <(mouse y) > (y position)>>>>> then\n        switch costume to (left v)\n    end\n    if <<<<key (right arrow v) pressed?> or <key (d v) pressed?>> or <<mouse down?> and <(mouse x) > (x position)>>> and <not <<<key (up arrow v) pressed?> or <<key (w v) pressed?> or <key (space v) pressed?>>> or <<mouse down?> and <(mouse y) > (y position)>>>>> then\n        switch costume to (right v)\n    end\nend\n\nwhen [timer v] > (0.1)\nhide\n\nwhen flag clicked\nforever\n    if <<key (right arrow v) pressed?> or <<key (d v) pressed?> or <<mouse down?> and <(mouse x) > [20]>>>> then\n        switch costume to (2a v)\n        if <<<mouse down?> and <(mouse y) > ((y position) + (20))>> or <<key (up arrow v) pressed?> or <key (w v) pressed?>>> then\n            switch costume to (4a v)\n        end\n    else\n        if <<key (left arrow v) pressed?> or <<key (a v) pressed?> or <<mouse down?> and <(mouse x) < [-20]>>>> then\n            switch costume to (1a v)\n            if <<<(mouse y) > ((y position) + (20))> and <mouse down?>> or <<key (up arrow v) pressed?> or <key (w v) pressed?>>> then\n                switch costume to (5a v)\n            end\n        else\n            switch costume to (3a v)\n            if <<<(mouse y) > ((y position) + (20))> and <mouse down?>> or <<key (up arrow v) pressed?> or <key (w v) pressed?>>> then\n                switch costume to (6a v)\n            end\n        end\n    end\n    if <<<(YV) < [-1.5]> and <<(PARACHUTE) = [1]> and <(water) < [3]>>> and <<key (space v) pressed?> or <mouse down?>>> then\n        switch costume to (join (letter (1) of (costume [name v])) [b])\n    end\nend\n\n@ground\n\nwhen flag clicked\nshow\nswitch costume to (costume1 v)\nforever\n    go to x: (0) y: (0)\n    go to [front v] layer\n    if <(costume [number v]) = [1]> then\n        set [level v] to [1]\n    end\n    if <(costume [number v]) = [2]> then\n        set [level v] to [2]\n    end\n    if <(costume [number v]) = [3]> then\n        set [level v] to [3]\n    end\n    if <(costume [number v]) = [4]> then\n        set [level v] to [4]\n    end\n    if <(costume [number v]) = [5]> then\n        set [level v] to [5]\n    end\n    if <(costume [number v]) = [6]> then\n        set [level v] to [6]\n    end\n    if <(costume [number v]) = [7]> then\n        set [level v] to [7]\n    end\n    if <(costume [number v]) = [8]> then\n        set [level v] to [8]\n    end\n    if <(costume [number v]) = [9]> then\n        set [level v] to [9]\n    end\n    if <(costume [number v]) = [10]> then\n        set [level v] to [10]\n    end\nend\n\nwhen I receive [next level v]\npoint in direction (90)\nnext costume\n\nwhen [timer v] > (0.1)\nhide\n\n@Danger\n\nwhen flag clicked\npoint in direction (90)\nswitch costume to (costume1 v)\ngo to x: (0) y: (0)\ngo to [back v] layer\nforever\n    show\n    if <(costume [number v]) = [2]> then\n        glide (0.75) secs to x: (0) y: (-3)\n        glide (0.75) secs to x: (0) y: (3)\n    end\n    if <(costume [number v]) = [3]> then\n        glide (0.75) secs to x: (0) y: (-3)\n        glide (0.75) secs to x: (0) y: (3)\n    end\n    if <(costume [number v]) = [4]> then\n        point in direction (90)\n    end\n    if <(costume [number v]) = [6]> then\n        glide (0.75) secs to x: (0) y: (-3)\n        glide (0.75) secs to x: (0) y: (3)\n    end\n    if <(costume [number v]) = [9]> then\n        glide (0.75) secs to x: (0) y: (-3)\n        glide (0.75) secs to x: (0) y: (3)\n    end\nend\n\nwhen I receive [next level v]\npoint in direction (90)\nnext costume\n\nwhen [timer v] > (0.1)\nhide\n\n@Danger2\n\nwhen flag clicked\npoint in direction (90)\nswitch costume to (costume1 v)\ngo to x: (0) y: (0)\ngo to [back v] layer\nforever\n    show\n    if <(costume [number v]) = [4]> then\n        go to x: (-100) y: (-120)\n        repeat until <not <(costume [number v]) = [4]>>\n            turn right (15) degrees\n        end\n    end\n    if <(costume [number v]) = [4]> then\n        point in direction (90)\n    end\nend\n\nwhen I receive [next level v]\npoint in direction (90)\nnext costume\nif <not <(costume [number v]) = [4]>> then\n    go to x: (0) y: (0)\nend\n\nwhen [timer v] > (0.1)\nhide\n\n@Danger3\n\nwhen flag clicked\npoint in direction (90)\nswitch costume to (costume1 v)\ngo to x: (0) y: (0)\ngo to [back v] layer\nforever\n    show\n    if <(costume [number v]) = [4]> then\n        go to x: (160) y: (-120)\n        repeat until <not <(costume [number v]) = [4]>>\n            turn right (15) degrees\n        end\n    end\n    if <(costume [number v]) = [4]> then\n        point in direction (90)\n    end\nend\n\nwhen I receive [next level v]\npoint in direction (90)\nnext costume\nif <not <(costume [number v]) = [4]>> then\n    go to x: (0) y: (0)\nend\n\nwhen [timer v] > (0.1)\nhide\n\n@Danger4\n\nwhen flag clicked\npoint in direction (90)\nswitch costume to (costume1 v)\ngo to x: (0) y: (0)\ngo to [back v] layer\nforever\n    show\n    if <(costume [number v]) = [4]> then\n        go to x: (30) y: (-120)\n        repeat until <not <(costume [number v]) = [4]>>\n            turn right (15) degrees\n        end\n    end\n    if <(costume [number v]) = [4]> then\n        point in direction (90)\n    end\nend\n\nwhen I receive [next level v]\npoint in direction (90)\nnext costume\nif <not <(costume [number v]) = [4]>> then\n    go to x: (0) y: (0)\nend\n\nwhen [timer v] > (0.1)\nhide\n\n@heart, star, follow\n\nwhen flag clicked\nswitch costume to (costume1 v)\nforever\n    show\n    go to x: (0) y: (0)\nend\n\nwhen I receive [next level v]\nnext costume\n\nwhen [timer v] > (0.1)\nhide\n\n@thumbnail ground\n\nwhen flag clicked\ngo to [front v] layer\nforever\n    hide\nend\n\nwhen flag clicked\nforever\n    reset timer\nend\n\nwhen [timer v] > (0.1)\nshow\n\n@Danger thumbnail\n\nwhen flag clicked\nforever\n    go to [front v] layer\n    hide\nend\n\nwhen [timer v] > (0.1)\nshow\n\n@Sprite2\n\nwhen flag clicked\nhide\nset [wind v] to [1]\nset [# v] to [0]\nrepeat (20)\n    change [# v] by (1)\n    go to x: (pick random (-240) to (240)) y: (pick random (75) to (180))\n    create clone of (_myself_ v)\nend\n\nwhen I start as a clone\nshow\ngo to [front v] layer\nset size to (150) %\nset [ghost v] effect to (pick random (20) to (40))\nif <(#) < [10]> then\n    go [backward v] (99) layers\nend\nforever\n    repeat until <<touching (_edge_ v)?> and <<(x position) < [-239]> or <(x position) > [239]>>>\n        change x by ((((Wind) - (50)) / ((9) - ((#) / (4)))) * (0.5))\n        set [brightness v] effect to ((#) / (2))\n    end\n    if <(x position) < [-239]> then\n        set x to (238)\n    else\n        set x to (-238)\n    end\nend\n\n
Northern Lights Platformer! || Mobile Friendly\n✯  ✯  ✯  ✯  ✯  ✯  ✯  ✯  ✯  ✯  ✯  ✯  ✯  ✯  ✯  ✯  ✯  ✯ \n\n ✯ WASD to Move\n\n ✯ Dodge Spikes \n\n ✯ Dodge lava