Life | #games #Platformer #All

Instructions: Feel free to take the code in your backpack but you have to at least give me some credit this is a work in progress.\nPlease love and fav if you like it so far or if you used the code, I will appreciate it and continue making this. I really need every single view to become a love and fav. By the way I need Ideas for a boss\n\nPlease tell me if the game needs any adjustments tell me that in the comments.

@Stage\n\nwhen flag clicked\nset [level v] to [1]\n\n@Player\n\ndefine Platformer (jump height) (gravity) (firction) (running speed)\nswitch costume to (hitbox v)\nif <<key (right arrow v) pressed?> or <key (d v) pressed?>> then\n    point in direction (90)\n    switch costume to (idle v)\n    change [xv v] by (running speed)\nend\nif <<key (left arrow v) pressed?> or <key (a v) pressed?>> then\n    point in direction (-90)\n    switch costume to (idle v)\n    change [xv v] by ((running speed) * (-1))\nend\nset [xv v] to ((xv) * (firction))\nchange x by (xv)\nif <touching (level v)?> then\n    set [slope v] to [0]\n    repeat (8)\n        change [slope v] by (1)\n        change y by (1)\n    end\n    if <touching (level v)?> then\n        change y by ((slope) * (-1))\n        repeat ([ceiling v] of ([abs v] of (xv) ) )\n            if <touching (level v)?> then\n                change x by ((([abs v] of (xv) ) / (xv)) * (-1))\n            end\n        end\n        set [xv v] to [0]\n    end\nend\nchange y by (yv)\nif <touching (level v)?> then\n    repeat ([ceiling v] of ([abs v] of (yv) ) )\n        if <touching (level v)?> then\n            change y by ((([abs v] of (yv) ) / (yv)) * (-1))\n        end\n    end\n    if <<(([abs v] of (yv) ) / (yv)) = [-1]> and <<key (up arrow v) pressed?> or <key (w v) pressed?>>> then\n        set [yv v] to (jump height)\n    else\n        set [yv v] to [0]\n    end\nelse\n    change [yv v] by (-1)\nend\nswitch costume to (idle v)\nif <(yv) < [-3]> then\n    switch costume to (fall v)\nend\nif <(yv) > [2]> then\n    switch costume to (jump v)\nend\nif <<<key (left arrow v) pressed?> or <key (a v) pressed?>> or <<key (right arrow v) pressed?> or <key (d v) pressed?>>> then\n    switch costume to (walk)\nend\nif <<(level) = [12]> and <touching (flag v)?>> then\n    broadcast (hide all v)\n    broadcast (show v)\nend\n\nwhen flag clicked\nhide\nforever\n    play sound [TheFatRat - Unity  v] until done\nend\n\nwhen I receive [play v]\nshow variable [level v]\ngo to x: (-147) y: (-123)\nshow\nset [xv v] to [0]\nset [yv v] to [0]\nforever\n    Platformer [14] [-1] [0.7] [2]\n    if <touching (flag v)?> then\n        change [level v] by (1)\n        go to x: (-152) y: (-123)\n        set [xv v] to [0]\n        set [yv v] to [0]\n        broadcast (byebye clones v) and wait\n    end\n    if <touching (spikes v)?> then\n        go to x: (-152) y: (-123)\n    end\nend\n\nwhen flag clicked\nset rotation style [left-right v]\nset [walk v] to [5]\nforever\n    change [walk v] by (1)\n    wait (0.10) seconds\n    if <(walk) = [7]> then\n        set [walk v] to [5]\n    end\nend\n\nwhen I receive [hide all v]\nhide\n\n@level\n\nwhen I receive [play v]\nshow\ngo to x: (0) y: (0)\nforever\n    if <(level) = [1]> then\n        switch costume to (costume1 v)\n    end\n    if <(level) = [2]> then\n        switch costume to (costume2 v)\n    end\n    if <(level) = [3]> then\n        switch costume to (costume3 v)\n    end\n    if <(level) = [4]> then\n        switch costume to (costume4 v)\n    end\n    if <(level) = [5]> then\n        switch costume to (costume5 v)\n    end\n    if <(level) = [6]> then\n        switch costume to (costume6 v)\n    end\n    if <(level) = [7]> then\n        switch costume to (costume7 v)\n    end\n    if <(level) = [8]> then\n        switch costume to (costume8 v)\n    end\n    if <(level) = [9]> then\n        switch costume to (costume9 v)\n    end\n    if <(level) = [10]> then\n        switch costume to (costume10 v)\n    end\n    if <(level) = [11]> then\n        switch costume to (costume11 v)\n    end\n    if <(level) = [12]> then\n        switch costume to (costume12 v)\n    end\nend\n\nwhen flag clicked\nhide variable [level v]\nhide\n\nwhen I receive [hide all v]\nhide\n\n@flag\n\nwhen flag clicked\nforever\n    next costume\n    wait (0.05) seconds\nend\n\nwhen flag clicked\nhide\n\nwhen I receive [play v]\nshow\nforever\n    if <(level) = [1]> then\n        go to x: (-4) y: (-82)\n    end\n    if <(level) = [2]> then\n        go to x: (-52) y: (81)\n    end\n    if <(level) = [3]> then\n        go to x: (-176) y: (137)\n    end\n    if <(level) = [4]> then\n        go to x: (-205) y: (20)\n    end\n    if <(level) = [5]> then\n        go to x: (168) y: (-20)\n    end\n    if <(level) = [6]> then\n        go to x: (81) y: (-23)\n    end\n    if <(level) = [7]> then\n        go to x: (-44) y: (-78)\n    end\n    if <(level) = [8]> then\n        go to x: (-5) y: (124)\n    end\n    if <(level) = [9]> then\n        go to x: (95) y: (-10)\n    end\n    if <(level) = [10]> then\n        go to x: (-121) y: (5)\n    end\n    if <(level) = [11]> then\n        go to x: (165) y: (-151)\n    end\n    if <(level) = [12]> then\n        go to x: (13) y: (-47)\n    end\nend\n\nwhen I receive [hide all v]\nhide\n\n@spikes\n\nwhen flag clicked\nhide\n\nwhen I receive [play v]\nshow\nforever\n    if <(level) = [1]> then\n        switch costume to (costume1 v)\n        go to x: (41) y: (30)\n    end\n    if <(level) = [2]> then\n        switch costume to (costume2 v)\n        go to x: (39) y: (-70)\n    end\n    if <(level) = [3]> then\n        switch costume to (costume3 v)\n        go to x: (39) y: (-73)\n    end\n    if <(level) = [4]> then\n        switch costume to (costume4 v)\n        go to x: (39) y: (-73)\n    end\n    if <(level) = [5]> then\n        switch costume to (costume5 v)\n        go to x: (39) y: (-73)\n    end\n    if <(level) = [5]> then\n        switch costume to (costume5 v)\n        go to x: (39) y: (-73)\n    end\n    if <(level) = [6]> then\n        switch costume to (costume6 v)\n        go to x: (3) y: (-47)\n    end\n    if <(level) = [7]> then\n        switch costume to (costume7 v)\n        go to x: (3) y: (-47)\n    end\n    if <(level) = [8]> then\n        switch costume to (costume8 v)\n        go to x: (3) y: (-47)\n    end\n    if <(level) = [9]> then\n        switch costume to (costume9 v)\n        go to x: (3) y: (-47)\n    end\n    if <(level) = [10]> then\n        switch costume to (costume10 v)\n        go to x: (3) y: (-47)\n    end\n    if <(level) = [11]> then\n        switch costume to (costume11 v)\n        go to x: (3) y: (-47)\n    end\n    if <(level) = [12]> then\n        switch costume to (costume12 v)\n        go to x: (3) y: (-47)\n    end\nend\n\nwhen I receive [hide all v]\nhide\n\n@thumbnail\n\nwhen flag clicked\nswitch costume to (button v)\nshow\nforever\n    if <<mouse down?> and <touching (mouse-pointer v)?>> then\n        broadcast (play v)\n        hide\n    end\nend\n\nwhen flag clicked\nforever\n    glide (1) secs to x: (169) y: (-20)\n    glide (1) secs to x: (-229) y: (-17)\nend\n\n@trail\n\nwhen flag clicked\nhide\nforever\n    go to [back v] layer\n    go to (player v)\nend\n\nwhen flag clicked\nhide\nforever\n    wait (0.10) seconds\n    next costume\n    create clone of (_myself_ v)\nend\n\nwhen I start as a clone\nshow\nwait (0.80) seconds\nrepeat (25)\n    change [ghost v] effect by (4)\nend\n\nwhen I receive [byebye clones v]\ndelete this clone\n\nwhen I receive [hide all v]\nhide\n\n