[entry] Natural || a platformer        #games

Instructions: \narrow keys to move. F for invisibility!\n\nThe reason it might not be too good is that I thought that I was going to be able to make a boss fight, but that took way too long and there were bugs that I could not fix, so I had to remove it. Anyway, hope you enjoy!

@Stage\n\nwhen flag clicked\nswitch backdrop to (intro v)\nforever\n    if <(Play-Game) = [yes]> then\n        switch backdrop to ((Level) + (1))\n    end\nend\n\n@person\n\nwhen flag clicked\nswitch costume to (costume1 v)\nset size to (500) %\ngo to x: (-150) y: (0)\nset [level v] to [intro]\nset [jump v] to [no]\nset [x velocity v] to [0]\nset [y velocity v] to [0]\nforever\n    if <(Play-Game) = [yes]> then\n        show\n        if <key (right arrow v) pressed?> then\n            switch costume to (costume1 v)\n            change [x velocity v] by (2)\n        end\n        if <key (left arrow v) pressed?> then\n            switch costume to (costume3 v)\n            change [x velocity v] by (-2)\n        end\n        change x by (X Velocity)\n        if <touching (platform v)?> then\n            change x by ((X Velocity) * (-1))\n            set [x velocity v] to [0]\n        else\n            set [x velocity v] to ((X Velocity) * (0.8))\n        end\n        change y by (Y Velocity)\n        if <touching (platform v)?> then\n            change y by ((Y Velocity) * (-1))\n            set [y velocity v] to [0]\n            if <(Jump) = [yes]> then\n                if <key (up arrow v) pressed?> then\n                    switch costume to (costume2 v)\n                    set [y velocity v] to [15]\n                    set [jump v] to [no]\n                end\n            end\n        else\n            set [jump v] to [yes]\n            change [y velocity v] by (-1)\n        end\n        if <(x position) > [230]> then\n            start sound [neat v]\n            broadcast (Screen v)\n            wait (1) seconds\n            go to x: (-200) y: (-42)\n            set [x velocity v] to [0]\n            set [x velocity v] to [0]\n        end\n        if <touching (oof v)?> then\n            hide\n            create clone of (_myself_ v)\n            wait (0.5) seconds\n            go to x: (-200) y: (-42)\n            set [x velocity v] to [0]\n            set [y velocity v] to [0]\n        end\n        if <(y position) = [-181]> then\n            go to x: (-200) y: (-118)\n            set [x velocity v] to [0]\n            set [y velocity v] to [0]\n        end\n        set [xpos v] to (x position)\n        set [ypos v] to (y position)\n        if <<<key (f v) pressed?> and <not <(invisibily) = [yes]>>> and <(cooldown) = [0]>> then\n            broadcast (inv v)\n            set [cooldown v] to [4]\n        end\n    else\n        hide\n    end\nend\n\nset [level v] to ((Level) + (1))\n\nwhen I start as a clone\ngo to [front v] layer\nturn right (15) degrees\nshow\nturn right (15) degrees\nglide (0.2) secs to x: (x position) y: ((y position) + (12))\nturn right (15) degrees\nrepeat (distance to [platform v])\n    turn right (15) degrees\n    change y by (-10)\n    if <touching (_edge_ v)?> then\n        repeat (3)\n            turn right (10) degrees\n            change y by (-10)\n        end\n        delete this clone\n    end\nend\ndelete this clone\n\nwhen I receive [reset v]\ngo to x: (-150) y: (0)\n\nwhen flag clicked\n\nif <(invisibily) = [yes]> then\n\nwhen I receive [inv v]\nset [invisibily v] to [yes]\nset [ghost v] effect to (10)\nwait (1) seconds\nset [ghost v] effect to (0)\nset [invisibily v] to [no]\nwait (5) seconds\nset [cooldown v] to [0]\n\nwhen I receive [g v]\nstop [other scripts in sprite v]\nhide\n\n@intro\n\nwhen flag clicked\nerase all\nstart sound [blep v]\nset size to (100) %\nset [clone? v] to [0]\nhide\nclear graphic effects\nswitch costume to (costume1 v)\ngo to x: (-283) y: (0)\nshow\nglide (0.5) secs to x: (283) y: (0)\nhide\ncreate clone of (_myself_ v)\nwait (.5) seconds\nchange [clone? v] by (1)\ncreate clone of (_myself_ v)\nwait (3) seconds\nforever\n    play sound [bensound-hey v] until done\nend\n\nwhen I start as a clone\nif <(clone?) = [0]> then\n    show\n    switch costume to (screen v)\n    set size to (200) %\n    go to x: (500) y: (0)\n    glide (0.5) secs to x: (0) y: (0)\n    stamp\nend\nif <(clone?) = [1]> then\n    clear graphic effects\n    start sound [Win v]\n    show\n    set size to (100) %\n    switch costume to (costume1 v)\n    go to x: (0) y: (435)\n    glide (0.5) secs to x: (0) y: (0)\n    wait (2) seconds\n    repeat (4)\n        next costume\n    end\n    repeat (10)\n        change size by (-10)\n        change [ghost v] effect by (10)\n        change x by (5)\n        change y by (-5)\n    end\n    start sound [Crunch v]\n    hide\n    erase all\n    set [level v] to [1]\n    set [play-game v] to [yes]\nend\n\nwhen flag clicked\nwait (10) seconds\nforever\n    if <(Level) = [9]> then\n        stop [other scripts in sprite v]\n        broadcast (g v)\n        stop [this script v]\n    end\nend\n\n@platform\n\nwhen flag clicked\nset [play-game v] to [no]\nset [level v] to [1]\nforever\n    if <(Play-Game) = [yes]> then\n        switch costume to (Level)\n        show\n        go to x: (0) y: (0)\n    else\n        hide\n    end\nend\n\nwhen I receive [g v]\nstop [other scripts in sprite v]\nswitch costume to (1 v)\n\n@screen effect\n\nwhen flag clicked\nhide\n\nwhen I receive [screen v]\ngo to [front v] layer\nset [clone id v] to [0]\npoint in direction (90)\nshow\nswitch costume to (costume1 v)\ngo to x: (-200) y: (0)\ncreate clone of (_myself_ v)\nrepeat (20)\n    change x by (10)\nend\nchange [clone id v] by (1)\ncreate clone of (_myself_ v)\nhide\nwait (0.3) seconds\nchange [clone id v] by (1)\nturn right (90) degrees\ncreate clone of (_myself_ v)\nshow\nswitch costume to (costume1 v)\ngo to x: (0) y: (0)\nset [level v] to ((Level) + (1))\nrepeat (20)\n    change y by (10)\nend\nhide\n\nwhen I start as a clone\nif <(clone ID) = [0]> then\n    switch costume to (costume2 v)\n    go to x: (200) y: (0)\n    repeat (20)\n        change x by (-10)\n    end\n    hide\n    delete this clone\nend\nif <(clone ID) = [1]> then\n    show\n    switch costume to (costume3 v)\n    go to x: (0) y: (0)\n    repeat (12)\n        turn right (7.5) degrees\n    end\n    delete this clone\nend\nif <(clone ID) = [2]> then\n    show\n    switch costume to (costume2 v)\n    go to x: (0) y: (0)\n    repeat (20)\n        change y by (-10)\n    end\n    delete this clone\nend\n\n@effects\n\nwhen flag clicked\nhide\nforever\n    if <(Play-Game) = [yes]> then\n        wait (3) seconds\n        if <<(Level) = [1]> or <<(Level) = [2]> or <(Level) = [3]>>> then\n            go to x: (0) y: (300)\n            point in direction (pick random (1) to (350))\n            switch costume to (join [natural] (pick random (1) to (3)))\n            create clone of (_myself_ v)\n        end\n        if <<(Level) = [4]> or <<(Level) = [5]> or <(Level) = [6]>>> then\n            go to x: (0) y: (300)\n            point in direction (pick random (1) to (350))\n            switch costume to (join [notnatural] (pick random (1) to (3)))\n            create clone of (_myself_ v)\n        end\n        if <(Level) > [6]> then\n            go to x: (0) y: (300)\n            point in direction (pick random (1) to (350))\n            switch costume to (yikes v)\n            create clone of (_myself_ v)\n        end\n        if <(Level) = [9]> then\n            stop [this script v]\n        end\n    end\nend\n\nwhen I start as a clone\ngo to [front v] layer\ngo to x: (pick random (-200) to (200)) y: (150)\nshow\nphysics\n\ndefine physics\nrepeat until <touching (platform v)?>\n    change x by (5)\n    change y by (3)\n    change y by (-10)\n    repeat (2)\n        go to [front v] layer\n        change x by (10)\n        change y by (-4)\n        change x by (-10)\n        change x by (3)\n    end\n    if <touching (_edge_ v)?> then\n        repeat (10)\n            change x by (1)\n        end\n        delete this clone\n    end\nend\nwait (1) seconds\nrepeat (10)\n    change [ghost v] effect by (10)\nend\ndelete this clone\n\nwhen flag clicked\nforever\n    if <(Level) = [9]> then\n        go to [front v] layer\n        wait (0.5) seconds\n        go to x: (0) y: (300)\n        point in direction (pick random (-50) to (350))\n        switch costume to (yikes v)\n        create clone of (_myself_ v)\n    end\nend\n\nwhen I receive [g v]\nstop [other scripts in sprite v]\nhide\n\n@OOF\n\nwhen flag clicked\ngo to x: (0) y: (0)\nhide\nforever\n    if <(Play-Game) = [yes]> then\n        point in direction (90)\n        show\n        switch costume to (Level)\n        if <(Level) = [2]> then\n            go to x: (9) y: (-115)\n            go to [back v] layer\n            repeat (10)\n                turn right (15) degrees\n            end\n        end\n        if <(Level) = [3]> then\n            go to x: (-20) y: (-115)\n            go to [back v] layer\n            repeat (10)\n                turn right (15) degrees\n            end\n        end\n        if <(Level) = [6]> then\n            go to x: (-85) y: (-111)\n            go to [back v] layer\n            repeat (10)\n                turn right (15) degrees\n            end\n        end\n    end\n    if <(Level) = [9]> then\n        broadcast (fight v)\n        stop [other scripts in sprite v]\n        hide\n        stop [this script v]\n    end\nend\n\nwhen I receive [screen v]\nset [hurt# v] to [0]\nwait (1) seconds\nif <(Level) = [3]> then\n    create clone of (_myself_ v)\nend\nif <(Level) = [6]> then\n    create clone of (_myself_ v)\nend\nif <(Level) = [7]> then\n    repeat (3)\n        create clone of (_myself_ v)\n        change [hurt# v] by (1)\n    end\nend\n\nwhen I start as a clone\nforever\n    if <(Level) = [3]> then\n        show\n        switch costume to (2 v)\n        go to x: (150) y: (-115)\n        repeat (10)\n            turn right (15) degrees\n        end\n    end\n    if <(Level) = [6]> then\n        go to [back v] layer\n        go to x: (-85) y: (-111)\n        point in direction (90)\n        switch costume to (cool v)\n    end\n    if <(Level) = [7]> then\n        if <(hurt#) = [0]> then\n            go to x: (0) y: (-111)\n            switch costume to (7 v)\n        end\n        if <(hurt#) = [1]> then\n            go to x: (85) y: (-111)\n            switch costume to (7 v)\n        end\n        if <(hurt#) = [2]> then\n            go to x: (170) y: (-111)\n            switch costume to (7 v)\n        end\n        repeat (10)\n            turn right (15) degrees\n        end\n    end\n    if <not <<(Level) = [7]> or <<(Level) = [6]> or <(Level) = [3]>>>> then\n        delete this clone\n    end\nend\n\nwhen I receive [g v]\nstop [other scripts in sprite v]\nhide\n\n@bad\n\nwhen flag clicked\nhide\ngo to x: (67) y: (-89)\nforever\n    if <(Play-Game) = [yes]> then\n        if <<(Level) = [5]> and <not <(invisibily) = [yes]>>> then\n            show\n            if <(Jump) = [no]> then\n                switch costume to (costume2 v)\n                repeat (15)\n                    change y by (10)\n                end\n                repeat (15)\n                    change y by (-10)\n                end\n            end\n            if <(xpos) < (x position)> then\n                switch costume to (costume1 v)\n                change x by (-5)\n            end\n            if <(x position) < (xpos)> then\n                switch costume to (costume3 v)\n                change x by (5)\n            end\n            if <touching color (#2b6b2b)?> then\n                go to x: (67) y: (-89)\n            end\n        else\n            if <not <(Level) = [5]>> then\n                hide\n            else\n                show\n            end\n        end\n    end\nend\n\nwhen I receive [reset v]\nwait (0.1) seconds\nrepeat (15)\n    go to x: (67) y: (-89)\nend\n\nwhen flag clicked\nforever\n    if <<touching (person v)?> and <not <(invisibily) = [yes]>>> then\n        broadcast (reset v)\n    end\n    if <(invisibily) = [yes]> then\n        switch costume to (costume4 v)\n    end\nend\n\nwhen I receive [g v]\nstop [other scripts in sprite v]\nhide\n\n@like and fave\n\nwhen I receive [g v]\ngo to x: (0) y: (0)\nshow\nforever\n    point in direction (([sin v] of ((timer) * (400)) ) + (90))\nend\n\nwhen flag clicked\nhide\n\nwhen I receive [g v]\ngo to x: (0) y: (0)\nshow\nforever\n    play sound [bensound-littleidea v] until done\nend\n\n@thumbail\n\nwhen flag clicked\ngo to [front v] layer\nset [ghost v] effect to (100)\ngo to x: (0) y: (0)\n\n