Neon Platformer v1.0 #games #all

Instructions: - Arrow keys or WASD to move\n- Also mobile\n- Try to get the the end (every level is possible)\n- Please like, fave and follow me for more fun games\n\n\n  Please report any bugs or glitches you find to me (:\n\n\n\n\n  Music - Candyland by Tobu\n  All code and art by me\n\n\nTags\n#games #platformer #all #art #game #platform #effects #fun #play #physics #neon #rgb #level\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nIf for some reason you are reading this go check out this platformer: https://scratch.mit.edu/projects/713694001/

@Stage\n\nwhen flag clicked\nforever\n    play sound [Tobu - Candyland \[NCS Release\] v] until done\nend\n\nwhen flag clicked\nforever\n    switch backdrop to (LVL)\nend\n\n@player\n\nwhen flag clicked\nswitch costume to (1 v)\ngo to [front v] layer\nset [id v] to [Walk]\nset [lvl v] to [1]\ngo to x: (-215) y: (Spawn Y)\nset [y velocity v] to [0]\nset [x velocity v] to [0]\nforever\n    Move Left/Right [1.5] [3]\n    Move Up/Down With Jump Height: [15] <key (w v) pressed?> or <key (up arrow v) pressed?>\n    Check Die [-170]\n    Check Next LVL [235]\n    Make Trail\nend\n\ndefine Move Left/Right (spd) (slope steepness)\nif <<<key (left arrow v) pressed?> or <key (a v) pressed?>> or <<mouse down?> and <((x position) - (20)) > (mouse x)>>> then\n    change [x velocity v] by ((spd) * (-1))\nend\nif <<<key (right arrow v) pressed?> or <key (d v) pressed?>> or <<mouse down?> and <(mouse x) > ((x position) + (20))>>> then\n    change [x velocity v] by (spd)\nend\nset [x velocity v] to ((X Velocity) * (0.85))\nchange x by (X Velocity)\nset [player x v] to (x position)\nrepeat (slope steepness)\n    if <touching (ground v)?> then\n        change y by (1)\n    end\nend\nif <touching (ground v)?> then\n    change y by ((slope steepness) * (-1))\n    change x by ((X Velocity) * (-1))\n    set [player x v] to (x position)\n    set [x velocity v] to [0]\nend\n\ndefine Move Up/Down With Jump Height: (jump height) <jump button 1 pressed> or <jump button 2 pressed>\nchange [y velocity v] by (-1)\nchange y by (Y Velocity)\nset [player y v] to (y position)\nif <touching (ground v)?> then\n    repeat (7)\n        if <touching (ground v)?> then\n            change y by (((Y Velocity) * (-1)) / (7))\n        end\n    end\n    set [y velocity v] to [0]\nend\nchange y by (-1)\nif <<<<jump button 1 pressed> or <jump button 2 pressed>> or <<mouse down?> and <(mouse y) > ((y position) + (50))>>> and <touching (ground v)?>> then\n    change [y velocity v] by (jump height)\nend\nchange y by (1)\n\ndefine Check Die (fall height)\nif <<touching (spikes v)?> or <(y position) < (fall height)>> then\n    set [dx v] to (x position)\n    set [dy v] to (y position)\n    broadcast (Dead v)\nend\n\nwhen I receive [dead v]\nReset\n\ndefine Check Next LVL (x pos)\nif <(x pos) < (x position)> then\n    broadcast (Next Lvl v)\n    set x to (0)\n    change [lvl v] by (1)\nend\n\ndefine Make Trail\nset [id v] to [Trail]\ncreate clone of (_myself_ v)\n\nwhen I start as a clone\nforever\n    if <(ID) = [Trail]> then\n        repeat (10)\n            change [ghost v] effect by (11)\n        end\n        delete this clone\n    end\nend\n\nwhen I receive [next lvl v]\nReset\n\ndefine Reset\ngo to x: (-215) y: (Spawn Y)\nset [y velocity v] to [0]\nset [x velocity v] to [0]\ndelete this clone\n\n@ground\n\nwhen flag clicked\ngo to x: (0) y: (0)\nforever\n    switch costume to (LVL)\nend\n\nwhen I receive [dead v]\nset [brightness v] effect to (100)\nrepeat (10)\n    change [brightness v] effect by (-10)\nend\n\n@spikes\n\nwhen flag clicked\nset rotation style [left-right v]\ngo to x: (0) y: (0)\npoint in direction (90)\ngo to [front v] layer\nset [clone # v] to [-1]\nrepeat (2)\n    create clone of (_myself_ v)\n    change [clone # v] by (2)\nend\nforever\n    switch costume to (LVL)\nend\n\nwhen I receive [dead v]\nset [brightness v] effect to (100)\nrepeat (10)\n    change [brightness v] effect by (-10)\nend\n\nwhen I start as a clone\nset rotation style [all around v]\nswitch costume to (clone v)\nforever\n    turn left (3) degrees\n    if <(LVL) = [6]> then\n        go to x: ((Clone #) * (90)) y: (-20)\n        show\n    else\n        hide\n    end\nend\n\n@BG\n\nwhen flag clicked\nset rotation style [left-right v]\ncreate clone of (_myself_ v)\nforever\n    switch costume to ((LVL) * (2))\n    go to [back v] layer\n    go [forward v] (1) layers\n    go to x: ((([x position v] of [player v]) * (-1)) / (5)) y: ((([y position v] of [player v]) * (-1)) / (5))\nend\n\nwhen I start as a clone\nforever\n    switch costume to (((LVL) * (2)) - (1))\n    go to [back v] layer\n    go to x: ((([x position v] of [player v]) * (-1)) / (10)) y: ((([y position v] of [player v]) * (-1)) / (10))\nend\n\nwhen I receive [next lvl v]\nif <(pick random (1) to (2)) = [2]> then\n    point in direction (90)\nelse\n    point in direction (-90)\nend\n\nwhen I receive [dead v]\nset [brightness v] effect to (90)\nrepeat (9)\n    change [brightness v] effect by (-10)\nend\n\n@Pixels\n\nwhen flag clicked\nset size to (50) %\nhide\nforever\n    set [id v] to [0]\nend\n\nwhen I receive [dead v]\nif <(ID) = [0]> then\n    go to x: (DX) y: (DY)\n    set [id v] to [Death]\n    Make Clones [7]\nend\n\nwhen I start as a clone\nif <(ID) = [Death]> then\n    Make Dead Animation\nend\n\ndefine Make Dead Animation\ngo to [front v] layer\nset [y velocity v] to (pick random (10) to (15))\nset [x velocity v] to (pick random (-10) to (10))\nset [ghost v] effect to (5)\nshow\nrepeat (70)\n    Move Left/Right [1.5] [3]\n    Move Up/Down With Jump Height:\n    if <(y position) < [-175]> then\n        hide\n    end\nend\nrepeat (5)\n    change [ghost v] effect by (20)\nend\ndelete this clone\n\ndefine Make Clones (amount)\nrepeat (amount)\n    create clone of (_myself_ v)\nend\n\ndefine Move Left/Right (spd) (slope steepness)\nset [x velocity v] to ((X Velocity) * (0.95))\nchange x by (X Velocity)\nrepeat (slope steepness)\n    if <touching (ground v)?> then\n        change y by (1)\n    end\nend\nif <touching (ground v)?> then\n    change y by ((slope steepness) * (-1))\n    set [x velocity v] to ((X Velocity) * (-1))\n    change x by (X Velocity)\n    set [x velocity v] to [0]\nend\n\ndefine Move Up/Down With Jump Height:\nchange [y velocity v] by (-1)\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\n\n@Secrets\n\nwhen flag clicked\ngo to x: (0) y: (0)\npoint in direction (90)\nset size to (100) %\nforever\n    if <(LVL) = [9]> then\n        show\n        switch costume to (costume1 v)\n    else\n        if <(LVL) = [10]> then\n            show\n            switch costume to (costume2 v)\n        else\n            hide\n        end\n    end\n    go to [back v] layer\n    go [forward v] (2) layers\nend\n\nwhen I receive [dead v]\nset [brightness v] effect to (100)\nrepeat (10)\n    change [brightness v] effect by (-10)\nend\n\n