Easy Platformer #platformer #cool
@Stage\n\nwhen flag clicked\nswitch backdrop to (backdrop1 v)\n\nwhen I receive [green flag clicked v]\nforever\n    switch backdrop to ((Level) + (1))\nend\n\nwhen I receive [green flag clicked v]\nwait (0.1) seconds\nforever\n    play sound [Vexento-Pollen.mp3 v] until done\n    play sound [New Life v] until done\n    play sound [Music v] until done\nend\n\nwhen I receive [next level v]\nplay sound [Connect v] until done\n\n@Sprite1\n\ndefine Reset\npoint in direction (90)\nset size to (20) %\nset rotation style [left-right v]\nif <(Level) = [9]> then\n    go to x: (-200) y: (-100)\nelse\n    go to x: (-200) y: (0)\nend\nshow\nset [speed y v] to [0]\nset [falling? v] to [10]\n\nwhen I receive [green flag clicked v]\nReset\nset [level v] to [1]\nforever\n    Platforming Engine\n    if <<touching (moving spikes up/down v)?> or <<touching (spikes v)?> or <touching (right/left v)?>>> then\n        switch costume to (die  v)\n        start sound [whoop v]\n        Go down\n        repeat (11)\n            next costume\n        end\n        repeat (20)\n            change [ghost v] effect by (5)\n        end\n        broadcast (Retry v)\n        set [ghost v] effect to (0)\n        go to x: (-200) y: (0)\n    end\nend\n\ndefine Walk (direction) (speed)\npoint in direction (direction)\nchange x by (speed)\nset [slope v] to [0]\nrepeat until <<(slope) = [8]> or <not <touching (ground v)?>>>\n    change y by (1)\n    change [slope v] by (1)\nend\nif <(slope) = [8]> then\n    change x by ((0) - (speed))\n    change y by ((0) - (slope))\n    if <<<key (w v) pressed?> or <<key (space v) pressed?> or <<key (up arrow v) pressed?> or <<mouse down?> and <(mouse y) > (y position)>>>>> and <([abs v] of (speed) ) > [3]>> then\n        start sound [Jump v]\n        if <(wall jump) = [0]> then\n            set [speed x v] to ((-1.2) * (speed))\n            set [max bounce v] to [11]\n            set [speed y v] to [11]\n            set [falling? v] to [6]\n            set [wall jump v] to [15]\n        end\n    else\n        set [speed x v] to [0]\n    end\nend\nif <(speed) < [0]> then\n    change [frame v] by ((speed) / (-8))\nelse\n    change [frame v] by ((speed) / (8))\nend\n\nwhen I receive [retry v]\nReset\n\nwhen I receive [next level v]\nReset\n\ndefine Set Costume\nif <(falling?) < [6]> then\n    if <(frame) = [0]> then\n        switch costume to ([floor v] of ((13) + ((Idle Frame) mod (15))) )\n        change [idle frame v] by (0.5)\n    else\n        switch costume to ([floor v] of ((29) + ((frame) mod (15))) )\n    end\nelse\n    if <touching (ladder v)?> then\n        switch costume to ([floor v] of ((61) + (((timer) * (10)) mod (3))) )\n    else\n        switch costume to ([floor v] of ((((15) / ((Max Bounce) * (2))) * ((speed y) + (Max Bounce))) + (45)) )\n    end\nend\n\ndefine Touch Ground <up?>\nchange [falling? v] by (1)\nrepeat until <not <touching (ground v)?>>\n    if <up?> then\n        change y by (-1)\n    else\n        change y by (1)\n        set [falling? v] to [0]\n    end\n    set [speed y v] to [0]\nend\n\nwhen flag clicked\nhide\n\ndefine Go down\nrepeat until <touching (ground v)?>\n    change y by (-2)\nend\n\nwhen flag clicked\nset [level v] to [1]\n\ndefine Platforming Engine\nswitch costume to (hitbox v)\nif <<(speed y) < [4]> or <<key (w v) pressed?> or <<key (space v) pressed?> or <<key (up arrow v) pressed?> or <<mouse down?> and <(mouse y) > (y position)>>>>>> then\n    change [speed y v] by (-1)\nelse\n    change [speed y v] by (-2)\nend\nchange y by (speed y)\nTouch Ground <(speed y) > [0]>\nif <(wall jump) > [0]> then\n    change [wall jump v] by (-1)\nelse\n    set [speed x v] to ((speed x) * (0.7))\n    if <<key (left arrow v) pressed?> or <<key (a v) pressed?> or <<mouse down?> and <(x position) > (mouse x)>>>> then\n        change [speed x v] by (-1.5)\n    end\n    if <<key (right arrow v) pressed?> or <<key (d v) pressed?> or <<mouse down?> and <(mouse x) > (x position)>>>> then\n        change [speed x v] by (1.5)\n    end\nend\nif <(speed x) < [-0.5]> then\n    Walk (-90) (speed x)\nelse\n    if <(speed x) > [0.5]> then\n        Walk (90) (speed x)\n    else\n        set [frame v] to [0]\n    end\nend\nif <<key (w v) pressed?> or <<key (space v) pressed?> or <<key (up arrow v) pressed?> or <<mouse down?> and <(mouse y) > (y position)>>>>> then\n    if <<(jump key) = [0]> and <(falling?) < [3]>> then\n        start sound [Jump v]\n        set [max bounce v] to [14]\n        set [speed y v] to [14]\n        set [falling? v] to [6]\n        set [jump key v] to [1]\n    end\nelse\n    set [jump key v] to [0]\nend\nif <(y position) < [-180]> then\n    go to x: (-200) y: (0)\n    broadcast (Retry v)\n    set [speed y v] to [0]\nend\nif <touching (portal v)?> then\n    start sound [Connect v]\n    go to x: (-200) y: (0)\n    change [level v] by (1)\n    Reset\n    if <not <(Level) = [9]>> then\n    end\nend\nif <touching (bounce v)?> then\n    start sound [Jump v]\n    set [max bounce v] to [25]\n    set [speed y v] to [25]\nend\nif <(x position) < [-190]> then\n    set x to (-190)\nend\nif <<<key (w v) pressed?> or <<key (space v) pressed?> or <<key (up arrow v) pressed?> or <<mouse down?> and <(mouse y) > (y position)>>>>> and <touching (ladder v)?>> then\n    set [speed y v] to [5]\nend\nSet Costume\n\n@Ground\n\nwhen flag clicked\nhide\n\nwhen I receive [green flag clicked v]\nswitch costume to (costume1 v)\nshow\nforever\n    switch costume to (Level)\nend\n\nwhen I receive [next level v]\nnext costume\n\n@Spikes\n\nwhen I receive [green flag clicked v]\nswitch costume to (costume1 v)\nshow\nforever\n    switch costume to (Level)\nend\n\nwhen flag clicked\nhide\n\n@Bounce\n\nwhen flag clicked\nhide\n\nwhen I receive [green flag clicked v]\nhide\nforever\n    set [my level v] to (Level)\n    Spawn Level (My Level)\n    wait until <not <(My Level) = (Level)>>\nend\n\nwhen I start as a clone\nswitch costume to (1 v)\nshow\nset [my level v] to (Level)\nrepeat until <not <(My Level) = (Level)>>\n    if <touching (sprite1 v)?> then\n        if <not < ([costume name v] of [sprite1 v]) contains [Die ]?>> then\n            switch costume to (1 v)\n            repeat (6)\n                next costume\n            end\n        end\n    end\nend\ndelete this clone\n\ndefine Spawn Level (level)\nif <(level) = [1]> then\n    go to x: (16) y: (-101)\n    create clone of (_myself_ v)\nend\nif <(level) = [3]> then\n    go to x: (-162) y: (-101)\n    create clone of (_myself_ v)\nend\nif <(level) = [4]> then\n    go to x: (-162) y: (-101)\n    create clone of (_myself_ v)\n    go to x: (0) y: (-101)\n    create clone of (_myself_ v)\n    go to x: (162) y: (-101)\n    create clone of (_myself_ v)\nend\nif <(level) = [6]> then\n    go to x: (-140) y: (-101)\n    create clone of (_myself_ v)\n    go to x: (0) y: (-101)\n    create clone of (_myself_ v)\n    go to x: (140) y: (-101)\n    create clone of (_myself_ v)\nend\nif <(level) = [8]> then\n    go to x: (-150) y: (-101)\n    create clone of (_myself_ v)\nend\nif <(level) = [9]> then\n    go to x: (134) y: (-101)\n    create clone of (_myself_ v)\nend\nif <(level) = [10]> then\n    go to x: (-140) y: (-101)\n    create clone of (_myself_ v)\nend\n\n@Background stuff\n\nwhen I start as a clone\nshow\ngo to [front v] layer\nrepeat until <(x position) < [-220]>\n    move (15) steps\nend\ndelete this clone\n\nwhen I receive [green flag clicked v]\nStart\ngo to [front v] layer\nforever\n    Clone [2]\nend\n\ndefine Start\nrepeat (100)\n    hide\n    go to [back v] layer\n    point in direction (pick random (-70) to (-100))\n    go to x: (pick random (-240) to (240)) y: (pick random (-180) to (180))\n    set size to (pick random (20) to (50)) %\n    set [ghost v] effect to (pick random (90) to (95))\n    go to [back v] layer\n    create clone of (_myself_ v)\nend\n\ndefine Clone (clones)\nrepeat (clones)\n    hide\n    go to [back v] layer\n    point in direction (pick random (-70) to (-100))\n    go to x: (300) y: (pick random (-180) to (180))\n    set size to (pick random (20) to (50)) %\n    set [ghost v] effect to (pick random (90) to (95))\n    go to [back v] layer\n    create clone of (_myself_ v)\nend\n\n@Sprite2\n\nwhen flag clicked\nforever\n    show\n    go to [front v] layer\n    set [ghost v] effect to (100)\nend\n\n@Portal\n\nwhen flag clicked\nhide\n\nwhen I receive [green flag clicked v]\nshow\ncreate clone of (_myself_ v)\nforever\n    broadcast (Level)\n    turn left (5) degrees\n    if <(Level) = [13]> then\n        hide\n    else\n        show\n    end\nend\n\nwhen I receive [next level v]\nnext costume\n\nwhen I start as a clone\nshow\nset [my level v] to (Level)\nforever\n    turn right (5) degrees\n    if <(Level) = [13]> then\n        hide\n    else\n        show\n    end\nend\n\ndelete this clone\n\nwhen I receive [1 v]\ngo to x: (200) y: (-70)\n\nwhen I receive [2 v]\ngo to x: (180) y: (-70)\n\nwhen I receive [4 v]\ngo to x: (200) y: (-70)\n\nwhen I receive [9 v]\ngo to x: (-150) y: (50)\n\nwhen I receive [10 v]\ngo to x: (180) y: (-70)\n\n@Moving Spikes Up/Down\n\nwhen I receive [green flag clicked v]\nswitch costume to (costume1 v)\nshow\ngo to [back v] layer\nforever\n    go to x: (0) y: ((([sin v] of ((timer) * (100)) ) * (30)) + (-30))\n    switch costume to (Level)\nend\n\nwhen flag clicked\nhide\n\n@Right/left\n\nwhen I receive [green flag clicked v]\nswitch costume to (costume1 v)\nshow\ngo to [back v] layer\nforever\n    go to x: ((([sin v] of ((timer) * (100)) ) * (30)) + (-30)) y: (3)\n    switch costume to (Level)\nend\n\nwhen flag clicked\nhide\n\n@Skip\n\nwhen flag clicked\nforever\n    if <touching (mouse-pointer v)?> then\n        point in direction ((([sin v] of ((timer) * (600)) ) * (5)) + (90))\n        set [ghost v] effect to (30)\n    else\n        point in direction (90)\n        set [ghost v] effect to (50)\n    end\nend\n\nwhen this sprite clicked\nif <not <(Level) = [13]>> then\n    change [level v] by (1)\n    broadcast (Retry v)\n    wait (0.01) seconds\n    broadcast (Retry v)\nend\n\nwhen I receive [green flag clicked v]\nshow\n\nwhen flag clicked\nhide\n\n@Sprite4\n\nwhen flag clicked\nforever\n    if <touching (mouse-pointer v)?> then\n        point in direction ((([sin v] of ((timer) * (600)) ) * (5)) + (90))\n        set [ghost v] effect to (30)\n    else\n        point in direction (90)\n        set [ghost v] effect to (50)\n    end\nend\n\nwhen this sprite clicked\nbroadcast (Retry v)\n\nwhen I receive [green flag clicked v]\nshow\n\nwhen flag clicked\nhide\n\n@Sprite5\n\nwhen I receive [shake v]\nchange y by (Shake)\nwait (0.01) seconds\nchange x by ((Shake) * (-1))\nwait (0.01) seconds\nchange y by ((Shake) * (-1))\nwait (0.01) seconds\nchange x by (Shake)\nwait (0.01) seconds\nchange y by ((Shake) * (-1))\nwait (0.01) seconds\nchange x by (Shake)\nwait (0.01) seconds\nchange y by (Shake)\nwait (0.01) seconds\nchange x by ((Shake) * (-1))\nwait (0.01) seconds\n\ndefine Clone\nrepeat (63)\n    create clone of (_myself_ v)\n    next costume\nend\n\nwhen I start as a clone\nPosition\nglide (pick random (0.5) to (1)) secs to x: (0) y: (0)\n\ndefine Position\ngo to (random position v)\npoint in direction (pick random (-180) to (180))\nrepeat until <touching (_edge_ v)?>\n    move (-5) steps\nend\nset [direction v] to (pick random (-180) to (180))\n\nwhen I receive [message1 v]\nset [rotation v] to (pick random (-30) to (30))\ngo to [back v] layer\nset [xs v] to (pick random (-10) to (10))\nset [yv v] to (pick random (5) to (10))\nrepeat until <touching (_edge_ v)?>\n    turn right (Rotation) degrees\n    change x by (Xs)\n    change y by (Yv)\n    change [yv v] by (-0.5)\nend\nhide\ndelete this clone\n\nwhen I start as a clone\nforever\n    set [direction v] to ((Direction) * (0.8))\n    point in direction ((Direction) + (90))\nend\n\ngo to x: (0) y: (0)\n\nwhen I receive [start v]\nrepeat (1)\n    delete this clone\nend\nshow\nset [shake v] to [3]\nswitch costume to (costume 1 v)\nClone\ngo to (random position v)\nglide (pick random (0.5) to (1)) secs to x: (0) y: (0)\ngo to [front v] layer\nwait until <(timer) > [1.2]>\nset [ghost v] effect to (100)\nswitch costume to (e-hex v)\nrepeat (10)\n    change [ghost v] effect by (-10)\nend\npoint in direction (90)\nrepeat (6)\n    broadcast (Shake v) and wait\n    change [shake v] by (2)\nend\nhide\nstart sound [Firework Explode 3 v]\nbroadcast (Intro Done v)\nbroadcast (message1 v)\nwait until <(timer) > [14]>\nswitch costume to (costume46 v)\ngo to [front v] layer\nset [ghost v] effect to (100)\nrepeat (10)\n    change [ghost v] effect by (-10)\nend\nwait (5) seconds\nrepeat (10)\n    change [ghost v] effect by (10)\nend\n\nwhen I receive [start v]\nset [direction v] to (pick random (-180) to (180))\nforever\n    set [direction v] to ((Direction) * (0.8))\n    point in direction ((Direction) + (90))\nend\n\nwhen flag clicked\nbroadcast (Start v)\n\nrepeat (3)\n\nwhen I receive [green flag clicked v]\nhide\ndelete this clone\n\n@Explosion\n\nwhen I receive [intro done v]\nshow\npoint in direction (90)\ngo to x: (-500) y: (0)\nswitch costume to (coollogo_com-32476158 v)\nclear graphic effects\nrepeat (50)\n    change x by (((0) - (x position)) / (5))\nend\nwait (1) seconds\nclear graphic effects\nshow\nwait (1) seconds\nerase all\nset [rotation v] to (pick random (-15) to (15))\ngo to [back v] layer\nset [xs v] to (pick random (-10) to (10))\nset [yv v] to (pick random (5) to (10))\nrepeat until <<([abs v] of (x position) ) > [240]> or <([abs v] of (y position) ) > [360]>>\n    turn right (Rotation) degrees\n    change x by (Xs)\n    change y by (Yv)\n    change [yv v] by (-1)\nend\nhide\nbroadcast (Green Flag clicked v)\n\nwhen I receive [message1 v]\n\nwhen I receive [start v]\nerase all\nhide\n\nwhen I receive [start v]\nstop all sounds\nstart sound [sound1 v]\n\nwhen I receive [green flag clicked v]\nhide\ndelete this clone\n\nwhen I receive [green flag clicked v]\nstop all sounds\n\n
MORE:\n15 more levels to challenge your skills!\nTell me if there are any bugs.\nCONTROLS:\nArrow Keys/WASD/Mobile to move around.\nAvoid spikes, liquid fire, saws and turrets.\nThe arrows force you until you reach another arrow (opposite)\nBounce on trampolines to get to high places.\nGet to the flag to advance.\nGo into the red and green portals to become a different size.