Mountain Climber - A Scrolling Platformer
@Stage\n\nwhen I receive [play game v]\nswitch backdrop to (lost v)\n\nwhen [e v] key pressed\n\nwhen flag clicked\nswitch backdrop to (lost v)\nset [position tool v] to [1]\n\nif <(position tool) = [1]> then\n    set [mouse v] to (join ((mouse x) + (scroll x)) (join [, ] ((mouse y) + (scroll y))))\n    show variable [mouse v]\n    set [position tool v] to [0]\nelse\n    hide variable [mouse v]\n    set [position tool v] to [1]\nend\n\n@blank\n\n@man\n\nwhen I receive [green flag v]\nhide\ngo to [front v] layer\n\nwhen I receive [play game v]\nset [scroll x checkpoint v] to [0]\nset [scroll y checkpoint v] to [0]\nset [progress v] to [1]\nbroadcast (reset v) and wait\nbroadcast (setup v) and wait\nstart\nforever\n    tick\n    broadcast (tick v)\n    go to [front v] layer\n    set [machete x v] to (x position)\n    set [machete y v] to (y position)\n    set [machete direction v] to (direction)\n    if <(EXIT) = [die]> then\n        game over\n    end\nend\n\ndefine game on\nset [x v] to (scroll x checkpoint)\nset [y v] to (scroll y checkpoint)\nset [scroll x v] to (scroll x checkpoint)\nset [scroll y v] to (scroll y checkpoint)\nswitch costume to (costume1 v)\nset size to (100) %\npoint in direction (90)\nshow\n\ndefine tick\nif <<<key (a v) pressed?> or <key (left arrow v) pressed?>> or <<mouse down?> and <(mouse x) < [0]>>> then\n    change [sx v] by (-2)\n    point in direction (-90)\nend\nif <<<key (d v) pressed?> or <key (right arrow v) pressed?>> or <<mouse down?> and <(mouse x) > [0]>>> then\n    change [sx v] by (2)\n    point in direction (90)\nend\nif <<<key (w v) pressed?> or <key (up arrow v) pressed?>> or <<mouse down?> and <(mouse y) > [0]>>> then\n    if <(in air) < [5]> then\n        set [sy v] to [15]\n    end\nend\nset [sx v] to ((sx) * (0.8))\nif <([abs v] of (sx) ) > [0.9]> then\n    change player x by (round (sx))\nend\nif <(sy) > [-20]> then\n    change [sy v] by (-2)\nend\nchange player y by (sy)\nTest - die\nchange [scroll x v] by (round (((x) - (scroll x)) / (8)))\nif <(scroll x) < [0]> then\n    set [scroll x v] to [0]\nend\nif <(scroll x) > [9367]> then\n    set [scroll x v] to [9367]\nend\nchange [scroll y v] by (round (((y) - (scroll y)) / (8)))\nif <(scroll y) < [0]> then\n    set [scroll y v] to [0]\nend\nposition\n\ndefine change player y by (sy)\nchange [y v] by (sy)\nchange [in air v] by (1)\nposition\nrepeat until <not <touching (platform v)?>>\n    if <(sy) > [0]> then\n        change [y v] by (-1)\n    else\n        change [y v] by (1)\n        set [in air v] to [0]\n    end\n    position\n    set [sy v] to [0]\nend\n\ndefine position\ngo to x: ((x) - (scroll x)) y: ((y) - (scroll y))\n\ndefine change player x by (sx)\nchange [x v] by (sx)\nposition\nif <touching (platform v)?> then\n    repeat (12)\n        change [y v] by (1)\n        position\n        if <not <touching (platform v)?>> then\n            stop [this script v]\n        end\n    end\n    change [y v] by (-12)\n    repeat until <not <touching (platform v)?>>\n        if <(sx) > [0]> then\n            change [x v] by (-1)\n        else\n            change [x v] by (1)\n        end\n        position\n    end\nend\n\ndefine game over\nset [exit v] to []\nbroadcast (machete hide v)\nstart sound [Basketball Bounce v]\nstart sound [Crunch v]\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nhide\ngame on\n\ndefine Test - die\nif <<(y position) < [-179]> or <touching (spike v)?>> then\n    set [exit v] to [DIE]\nelse\n    clear graphic effects\nend\n\nwhen I receive [setup v]\nset size to (100) %\n\nwhen I receive [hide v]\nhide\n\nwhen flag clicked\nhide\n\ndefine start\nset [x v] to [0]\nset [y v] to [0]\nset [scroll x v] to [0]\nset [scroll y v] to [0]\nset [sy v] to [0]\nset [in air v] to [0]\nset [exit v] to []\nset [progress v] to [0]\nswitch costume to (costume1 v)\nset size to (100) %\npoint in direction (90)\nshow\n\nwhen I receive [game on v]\ngame on\nbroadcast (reset v)\nbroadcast (setup v)\n\nwhen flag clicked\n\nbroadcast (green flag v)\nbroadcast (Play game v)\n\nwhen I receive [green flag v]\nforever\n    if <not <<(EXIT) = [win]> or <(EXIT) = [die]>>> then\n        if <key (r v) pressed?> then\n            wait until <not <key (r v) pressed?>>\n            game on\n            broadcast (reset v)\n            broadcast (setup v)\n        end\n    end\nend\n\n@Machete\n\nwhen I receive [green flag v]\nset [on/off v] to [0]\ngo to [front v] layer\nhide\n\nwhen I receive [tick v]\nposition\nwhen attack?\n\ndefine position\ngo to x: (machete x) y: (machete y)\n\ndefine when attack?\nif <<key (space v) pressed?> or <mouse down?>> then\n    if <(ON/OFF) = [0]> then\n        broadcast (machete animation v) and wait\n    end\nend\n\nwhen I receive [machete animation v]\nset [on/off v] to [1]\nif <(machete direction) = [90]> then\n    set [direction v] to [-10]\n    switch costume to (costume1 v)\n    point in direction (120)\nelse\n    set [direction v] to [10]\n    switch costume to (costume2 v)\n    point in direction (60)\nend\nshow\nset [ghost v] effect to (100)\nrepeat (3)\n    change [ghost v] effect by (-33)\nend\nrepeat (28)\n    turn right (direction) degrees\n    if <(machete direction) = [90]> then\n        switch costume to (costume1 v)\n        change [direction v] by (1)\n    else\n        switch costume to (costume2 v)\n        change [direction v] by (-1)\n    end\nend\nrepeat (3)\n    change [ghost v] effect by (33)\nend\nhide\nclear graphic effects\nwait until <not <<key (space v) pressed?> or <mouse down?>>>\nset [on/off v] to [0]\n\nwhen I receive [machete hide v]\nrepeat (5)\n    change [ghost v] effect by (20)\nend\nhide\nclear graphic effects\ngo to [front v] layer\n\n@platform\n\nwhen I receive [green flag v]\nhide\n\nwhen I receive [tick v]\nposition ((x) - (scroll x)) ((y) - (scroll y))\n\nwhen I receive [setup v]\nset size to (100) %\nhide\nset [x v] to [0]\nset [y v] to [0]\nswitch costume to (level 1 1 v)\nclone at x: [470] y: [0]\nclone at x: [470] y: [0]\nclone at x: [340] y: [340]\nclone at x: [470] y: [0]\nclone at x: [470] y: [0]\nclone at x: [470] y: [-100]\nclone at x: [470] y: [0]\nclone at x: [470] y: [0]\nclone at x: [470] y: [30]\nclone at x: [440] y: [90]\nclone at x: [480] y: [0]\nclone at x: [480] y: [60]\nclone at x: [480] y: [-20]\nclone at x: [475] y: [20]\nclone at x: [340] y: [290]\nclone at x: [470] y: [0]\nclone at x: [480] y: [30]\nclone at x: [340] y: [320]\nclone at x: [340] y: [290]\nclone at x: [470] y: [0]\nclone at x: [470] y: [0]\n\ndefine position (x) (y)\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\nelse\n    hide\nend\n\nwhen I receive [reset v]\ngo to [front v] layer\n\ndefine clone at x: (x) y: (y)\ngo to [front v] layer\ncreate clone of (_myself_ v)\nchange [x v] by (x)\nchange [y v] by (y)\nnext costume\n\nwhen I receive [hide v]\nhide\n\nwhen I receive [reset v]\ndelete this clone\n\nwhen I receive [the eend v]\nstop [other scripts in sprite v]\nswitch costume to (level 1 2 v)\ngo to x: (0) y: (0)\n\n@spike\n\nwhen I receive [green flag v]\ngo to [back v] layer\nhide\n\nwhen I receive [tick v]\nposition ((x) - (scroll x)) ((y) - (scroll y))\n\nwhen I receive [setup v]\nset size to (100) %\nhide\nset [x v] to [0]\nset [y v] to [0]\nswitch costume to (level 1 1 v)\nclone at x: [650] y: [-40]\nclone at x: [120] y: [50]\nclone at x: [100] y: [95]\nclone at x: [290] y: [190]\nclone at x: [340] y: [0]\nclone at x: [130] y: [0]\nclone at x: [585] y: [0]\nclone at x: [250] y: [0]\nclone at x: [250] y: [0]\nclone at x: [250] y: [0]\nclone at x: [340] y: [0]\nclone at x: [340] y: [0]\nclone at x: [550] y: [0]\nclone at x: [270] y: [100]\nclone at x: [340] y: [0]\nclone at x: [340] y: [0]\nclone at x: [480] y: [0]\nclone at x: [480] y: [0]\nclone at x: [380] y: [200]\nclone at x: [420] y: [100]\nclone at x: [480] y: [100]\nclone at x: [420] y: [100]\nclone at x: [260] y: [200]\nclone at x: [300] y: [200]\nclone at x: [480] y: [0]\n\ndefine position (x) (y)\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\nelse\n    hide\nend\n\nwhen I receive [reset v]\ndelete this clone\n\ndefine clone at x: (x) y: (y)\ncreate clone of (_myself_ v)\nchange [x v] by (x)\nchange [y v] by (y)\nnext costume\n\nwhen I receive [hide v]\nhide\n\n@sign\n\nwhen I receive [green flag v]\ngo to [back v] layer\nhide\n\nwhen I receive [tick v]\nposition ((x) - (scroll x)) ((y) - (scroll y))\nif <(costume [number v]) = [1]> then\n    if <touching (man v)?> then\n        say [Move with arrow keys or WASD] for (0) seconds\n    end\nelse\n    if <(costume [number v]) = [2]> then\n        if <touching (man v)?> then\n            say [Use your machete by clicking or pressing space] for (0) seconds\n        end\n    else\n        if <(costume [number v]) = [3]> then\n            if <touching (man v)?> then\n                say [The flag is a checkpoint] for (0) seconds\n            end\n        else\n            if <(costume [number v]) = [4]> then\n                if <touching (man v)?> then\n                    say [The spikes are dangerous!] for (0) seconds\n                end\n            end\n        end\n    end\nend\n\nwhen I receive [setup v]\nset size to (100) %\nhide\nset [x v] to [0]\nset [y v] to [0]\nswitch costume to (level 1 1 v)\nclone at x: [300] y: [0]\nclone at x: [100] y: [0]\nclone at x: [140] y: [0]\n\ndefine position (x) (y)\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\nelse\n    hide\nend\n\nwhen I receive [reset v]\ndelete this clone\n\ndefine clone at x: (x) y: (y)\ncreate clone of (_myself_ v)\nchange [x v] by (x)\nchange [y v] by (y)\nnext costume\n\nwhen I receive [hide v]\nhide\n\n@decoration\n\nwhen I receive [green flag v]\ngo to [front v] layer\nhide\n\nwhen I receive [tick v]\nposition ((x) - (scroll x)) ((y) - (scroll y))\n\nwhen I receive [setup v]\nset size to (100) %\nhide\nset [x v] to [0]\nset [y v] to [0]\nswitch costume to (grass v)\nclone at x: [485] y: [0]\nclone at x: [445] y: [0]\nclone at x: [350] y: [340]\nclone at x: [470] y: [0]\nclone at x: [470] y: [0]\nclone at x: [470] y: [-100]\nclone at x: [470] y: [0]\nclone at x: [470] y: [0]\nclone at x: [2020] y: [150]\nclone at x: [330] y: [0]\nclone at x: [370] y: [100]\nclone at x: [450] y: [250]\nclone at x: [470] y: [0]\nclone at x: [390] y: [120]\nclone at x: [370] y: [320]\nclone at x: [370] y: [200]\nclone at x: [500] y: [0]\nclone at x: [470] y: [0]\n\ndefine position (x) (y)\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\nelse\n    hide\nend\n\nwhen I receive [reset v]\ndelete this clone\n\ndefine clone at x: (x) y: (y)\ncreate clone of (_myself_ v)\nchange [x v] by (x)\nchange [y v] by (y)\nnext costume\n\nwhen I receive [hide v]\nhide\n\n@background\n\nwhen I receive [green flag v]\ngo to [back v] layer\ngo to x: (0) y: (50)\nswitch costume to (costume1 v)\nshow\n\nwhen I receive [tick v]\nset y to (round (((scroll y) - ((scroll y) * (2))) / (5)))\nset x to (round (((scroll x) - ((scroll x) * (2))) / (15)))\ngo to [back v] layer\n\nwhen I receive [play game v]\ngo to [back v] layer\n\nwhen flag clicked\ngo to x: (0) y: (-70)\n\n@menu\n\nwhen I receive [reset v]\npoint in direction (90)\ngo to x: (-220) y: (160)\nswitch costume to (menu button v)\ngo to [front v] layer\nset size to (70) %\nset [menu buttons v] to [0]\nshow\n\nwhen I receive [tick v]\nif <not <(EXIT) > []>> then\n    if <touching (mouse-pointer v)?> then\n        set [brightness v] effect to (5)\n        wait until <mouse down?>\n        set [menu buttons v] to [1]\n        broadcast (menu buttons v)\n        wait until <not <mouse down?>>\n    else\n        set [brightness v] effect to (0)\n        if <(mouse y) < [145]> then\n            set [menu buttons v] to [0]\n        end\n    end\nend\ngo to [front v] layer\n\nwhen flag clicked\nhide\n\n@volum\n\nwhen I receive [menu buttons v]\nshow\nclear graphic effects\nglide (0.2) secs to x: (-190) y: (160)\ngo to [front v] layer\nrepeat until <<(mouse y) < [145]> or <(mouse x) > [-145]>>\n    if <(menu buttons) = [1]> then\n        if <<touching (mouse-pointer v)?> and <mouse down?>> then\n            next costume\n            if <(costume [number v]) = [1]> then\n                set volume to (50) %\n            else\n                set volume to (0) %\n            end\n            wait until <not <mouse down?>>\n        end\n    end\nend\nglide (0.4) secs to x: (-220) y: (160)\nhide\n\nwhen I receive [green flag v]\ngo to [front v] layer\ngo to x: (-220) y: (160)\nset size to (70) %\nhide\nforever\n    if <touching (mouse-pointer v)?> then\n        set [brightness v] effect to (5)\n    else\n        set [brightness v] effect to (0)\n    end\nend\n\nwhen I receive [reset v]\nif <(x position) > [-220]> then\n    glide (0.2) secs to x: (-220) y: (160)\n    hide\nend\n\nwhen I receive [play game v]\nset volume to (50) %\nswitch costume to (on v)\nwait (1) seconds\nforever\n    play sound [Distant_Lands v] until done\n    wait (1) seconds\nend\n\n@skip\n\nwhen I receive [menu buttons v]\nshow\nclear graphic effects\nglide (0.2) secs to x: (-160) y: (160)\ngo to [front v] layer\nrepeat until <<(mouse y) < [145]> or <(mouse x) > [-145]>>\n    if <(menu buttons) = [1]> then\n        if <<touching (mouse-pointer v)?> and <mouse down?>> then\n            broadcast (skip v) and wait\n            broadcast (Game on v) and wait\n            wait until <not <mouse down?>>\n        end\n    end\nend\nglide (0.4) secs to x: (-220) y: (160)\nhide\n\nwhen I receive [green flag v]\ngo to [front v] layer\ngo to x: (-220) y: (160)\nset size to (70) %\nhide\nforever\n    if <touching (mouse-pointer v)?> then\n        set [brightness v] effect to (5)\n    else\n        set [brightness v] effect to (0)\n    end\nend\n\nwhen I receive [reset v]\nif <(x position) > [-220]> then\n    glide (0.2) secs to x: (-220) y: (160)\n    hide\nend\n\n@Thumbnail\n\nwhen flag clicked\nswitch costume to (png v)\npoint in direction (90)\ngo to x: (0) y: (0)\nset size to (100) %\nhide\nforever\n    set [timer v] to (timer)\nend\n\nwhen [timer v] > (timer)\nif <(endy) = [0]> then\n    switch costume to (thumbnail v)\n    show\n    set [ghost v] effect to (100)\n    go to [front v] layer\n    start sound [Manea_2 v]\n    repeat (20)\n        change [ghost v] effect by (-5)\n        go to [front v] layer\n    end\nelse\n    switch costume to (thumbnail2 v)\n    show\n    set [ghost v] effect to (100)\n    go to [front v] layer\n    start sound [TheFatRat+-+Time+Lapse v]\n    repeat (20)\n        change [ghost v] effect by (-5)\n        go to [front v] layer\n    end\nend\n\nclear graphic effects\ngo to [front v] layer\nswitch costume to (thumbnail3 v)\n\n@Checkpoint 1\n\nwhen I receive [green flag v]\nswitch costume to (checkpoint 1 v)\nset size to (100) %\ngo to [back v] layer\nhide\nforever\n    if <touching (man v)?> then\n        set [scroll x checkpoint v] to [499]\n        set [scroll y checkpoint v] to [-10]\n        change [progress v] by (1)\n        switch costume to (animation f1 v)\n        start sound [Connect v]\n        repeat (10)\n            next costume\n        end\n        switch costume to (checkpoint achieved v)\n        stop [this script v]\n    end\nend\n\nwhen I receive [tick v]\nposition ((x) - (scroll x)) ((y) - (scroll y))\n\nwhen I receive [setup v]\npoint in direction (90)\nclear graphic effects\nset size to (80) %\nhide\nset [on/off v] to [0]\nset [x v] to [0]\nset [y v] to [0]\nclone at x: [499] y: [-70]\n\ndefine position (x) (y)\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\nelse\n    hide\nend\n\ndefine clone at x: (x) y: (y)\nset [x v] to (x)\nset [y v] to (y)\n\nwhen I receive [hide v]\nhide\n\nwhen I receive [skip v]\n\nchange [progress v] by (1)\n\nwhen I receive [skip v]\nif <(PROGRESS) = [0]> then\n    set [scroll x checkpoint v] to [499]\n    set [scroll y checkpoint v] to [-10]\nend\n\n@Checkpoint 2\n\nwhen I receive [green flag v]\nswitch costume to (checkpoint 1 v)\nset size to (100) %\ngo to [back v] layer\nhide\nforever\n    if <touching (man v)?> then\n        set [scroll x checkpoint v] to [1323]\n        set [scroll y checkpoint v] to [332]\n        change [progress v] by (1)\n        switch costume to (animation f1 v)\n        start sound [Connect v]\n        repeat (10)\n            next costume\n        end\n        switch costume to (checkpoint achieved v)\n        stop [this script v]\n    end\nend\n\nwhen I receive [tick v]\nposition ((x) - (scroll x)) ((y) - (scroll y))\n\nwhen I receive [setup v]\npoint in direction (90)\nclear graphic effects\nset size to (80) %\nhide\nset [on/off v] to [0]\nset [x v] to [0]\nset [y v] to [0]\nclone at x: [1323] y: [272]\n\ndefine position (x) (y)\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\nelse\n    hide\nend\n\ndefine clone at x: (x) y: (y)\nset [x v] to (x)\nset [y v] to (y)\n\nwhen I receive [hide v]\nhide\n\nwhen I receive [skip v]\nif <(PROGRESS) = [1]> then\n    set [scroll x checkpoint v] to [1323]\n    set [scroll y checkpoint v] to [332]\nend\n\n@Checkpoint 3\n\nwhen I receive [green flag v]\nswitch costume to (checkpoint 1 v)\nset size to (100) %\ngo to [back v] layer\nhide\nforever\n    if <touching (man v)?> then\n        set [scroll x checkpoint v] to [2330]\n        set [scroll y checkpoint v] to [329]\n        change [progress v] by (1)\n        switch costume to (animation f1 v)\n        start sound [Connect v]\n        repeat (10)\n            next costume\n        end\n        switch costume to (checkpoint achieved v)\n        stop [this script v]\n    end\nend\n\nwhen I receive [tick v]\nposition ((x) - (scroll x)) ((y) - (scroll y))\n\nwhen I receive [setup v]\npoint in direction (90)\nclear graphic effects\nset size to (80) %\nhide\nset [on/off v] to [0]\nset [x v] to [0]\nset [y v] to [0]\nclone at x: [2330] y: [269]\n\ndefine position (x) (y)\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\nelse\n    hide\nend\n\ndefine clone at x: (x) y: (y)\nset [x v] to (x)\nset [y v] to (y)\n\nwhen I receive [hide v]\nhide\n\nwhen I receive [skip v]\nif <(PROGRESS) = [2]> then\n    set [scroll x checkpoint v] to [2330]\n    set [scroll y checkpoint v] to [329]\nend\n\n@Checkpoint 4\n\nwhen I receive [green flag v]\nswitch costume to (checkpoint 1 v)\nset size to (100) %\ngo to [back v] layer\nhide\nforever\n    if <touching (man v)?> then\n        set [scroll x checkpoint v] to [3242]\n        set [scroll y checkpoint v] to [291]\n        change [progress v] by (1)\n        switch costume to (animation f1 v)\n        start sound [Connect v]\n        repeat (10)\n            next costume\n        end\n        switch costume to (checkpoint achieved v)\n        stop [this script v]\n    end\nend\n\nwhen I receive [tick v]\nposition ((x) - (scroll x)) ((y) - (scroll y))\n\nwhen I receive [setup v]\npoint in direction (90)\nclear graphic effects\nset size to (80) %\nhide\nset [on/off v] to [0]\nset [x v] to [0]\nset [y v] to [0]\nclone at x: [3242] y: [231]\n\ndefine position (x) (y)\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\nelse\n    hide\nend\n\ndefine clone at x: (x) y: (y)\nset [x v] to (x)\nset [y v] to (y)\n\nwhen I receive [hide v]\nhide\n\nwhen I receive [skip v]\nif <(PROGRESS) = [3]> then\n    set [scroll x checkpoint v] to [3242]\n    set [scroll y checkpoint v] to [291]\nend\n\n@Checkpoint 5\n\nwhen I receive [green flag v]\nswitch costume to (checkpoint 1 v)\nset size to (100) %\ngo to [back v] layer\nhide\nforever\n    if <touching (man v)?> then\n        set [scroll x checkpoint v] to [4306]\n        set [scroll y checkpoint v] to [427]\n        change [progress v] by (1)\n        switch costume to (animation f1 v)\n        start sound [Connect v]\n        repeat (10)\n            next costume\n        end\n        switch costume to (checkpoint achieved v)\n        stop [this script v]\n    end\nend\n\nwhen I receive [tick v]\nposition ((x) - (scroll x)) ((y) - (scroll y))\n\nwhen I receive [setup v]\npoint in direction (90)\nclear graphic effects\nset size to (80) %\nhide\nset [on/off v] to [0]\nset [x v] to [0]\nset [y v] to [0]\nclone at x: [4306] y: [367]\n\ndefine position (x) (y)\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\nelse\n    hide\nend\n\ndefine clone at x: (x) y: (y)\nset [x v] to (x)\nset [y v] to (y)\n\nwhen I receive [hide v]\nhide\n\nwhen I receive [skip v]\nif <(PROGRESS) = [4]> then\n    set [scroll x checkpoint v] to [4306]\n    set [scroll y checkpoint v] to [427]\nend\n\n@Checkpoint 6\n\nwhen I receive [green flag v]\nswitch costume to (checkpoint 1 v)\nset size to (100) %\ngo to [back v] layer\nhide\nforever\n    if <touching (man v)?> then\n        set [scroll x checkpoint v] to [5274]\n        set [scroll y checkpoint v] to [438]\n        change [progress v] by (1)\n        switch costume to (animation f1 v)\n        start sound [Connect v]\n        repeat (10)\n            next costume\n        end\n        switch costume to (checkpoint achieved v)\n        stop [this script v]\n    end\nend\n\nwhen I receive [tick v]\nposition ((x) - (scroll x)) ((y) - (scroll y))\n\nwhen I receive [setup v]\npoint in direction (90)\nclear graphic effects\nset size to (80) %\nhide\nset [on/off v] to [0]\nset [x v] to [0]\nset [y v] to [0]\nclone at x: [5274] y: [378]\n\ndefine position (x) (y)\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\nelse\n    hide\nend\n\ndefine clone at x: (x) y: (y)\nset [x v] to (x)\nset [y v] to (y)\n\nwhen I receive [hide v]\nhide\n\nwhen I receive [skip v]\nif <(PROGRESS) = [5]> then\n    set [scroll x checkpoint v] to [5274]\n    set [scroll y checkpoint v] to [438]\nend\n\n@Checkpoint 7\n\nwhen I receive [green flag v]\nswitch costume to (checkpoint 1 v)\nset size to (100) %\ngo to [back v] layer\nhide\nforever\n    if <touching (man v)?> then\n        set [scroll x checkpoint v] to [6178]\n        set [scroll y checkpoint v] to [437]\n        change [progress v] by (1)\n        switch costume to (animation f1 v)\n        start sound [Connect v]\n        repeat (10)\n            next costume\n        end\n        switch costume to (checkpoint achieved v)\n        stop [this script v]\n    end\nend\n\nwhen I receive [tick v]\nposition ((x) - (scroll x)) ((y) - (scroll y))\n\nwhen I receive [setup v]\npoint in direction (90)\nclear graphic effects\nset size to (80) %\nhide\nset [on/off v] to [0]\nset [x v] to [0]\nset [y v] to [0]\nclone at x: [6178] y: [377]\n\ndefine position (x) (y)\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\nelse\n    hide\nend\n\ndefine clone at x: (x) y: (y)\nset [x v] to (x)\nset [y v] to (y)\n\nwhen I receive [hide v]\nhide\n\nwhen I receive [skip v]\nif <(PROGRESS) = [6]> then\n    set [scroll x checkpoint v] to [6178]\n    set [scroll y checkpoint v] to [437]\nend\n\n@Checkpoint 8\n\nwhen I receive [green flag v]\nswitch costume to (checkpoint 1 v)\nset size to (100) %\ngo to [back v] layer\nhide\nforever\n    if <touching (man v)?> then\n        set [scroll x checkpoint v] to [7003]\n        set [scroll y checkpoint v] to [747]\n        change [progress v] by (1)\n        switch costume to (animation f1 v)\n        start sound [Connect v]\n        repeat (10)\n            next costume\n        end\n        switch costume to (checkpoint achieved v)\n        stop [this script v]\n    end\nend\n\nwhen I receive [tick v]\nposition ((x) - (scroll x)) ((y) - (scroll y))\n\nwhen I receive [setup v]\npoint in direction (90)\nclear graphic effects\nset size to (80) %\nhide\nset [on/off v] to [0]\nset [x v] to [0]\nset [y v] to [0]\nclone at x: [7003] y: [687]\n\ndefine position (x) (y)\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\nelse\n    hide\nend\n\ndefine clone at x: (x) y: (y)\nset [x v] to (x)\nset [y v] to (y)\n\nwhen I receive [hide v]\nhide\n\nwhen I receive [skip v]\nif <(PROGRESS) = [7]> then\n    set [scroll x checkpoint v] to [7003]\n    set [scroll y checkpoint v] to [747]\nend\n\n@Checkpoint 9\n\nwhen I receive [green flag v]\nswitch costume to (checkpoint 1 v)\nset size to (100) %\ngo to [back v] layer\nhide\nforever\n    if <touching (man v)?> then\n        set [scroll x checkpoint v] to [8241]\n        set [scroll y checkpoint v] to [1373]\n        change [progress v] by (1)\n        switch costume to (animation f1 v)\n        start sound [Connect v]\n        repeat (10)\n            next costume\n        end\n        switch costume to (checkpoint achieved v)\n        stop [this script v]\n    end\nend\n\nwhen I receive [tick v]\nposition ((x) - (scroll x)) ((y) - (scroll y))\n\nwhen I receive [setup v]\npoint in direction (90)\nclear graphic effects\nset size to (80) %\nhide\nset [on/off v] to [0]\nset [x v] to [0]\nset [y v] to [0]\nclone at x: [8241] y: [1313]\n\ndefine position (x) (y)\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\nelse\n    hide\nend\n\ndefine clone at x: (x) y: (y)\nset [x v] to (x)\nset [y v] to (y)\n\nwhen I receive [hide v]\nhide\n\nwhen I receive [skip v]\nif <(PROGRESS) = [8]> then\n    set [scroll x checkpoint v] to [8241]\n    set [scroll y checkpoint v] to [1373]\nend\n\n@Checkpoint 10\n\nwhen I receive [green flag v]\nset [endy v] to [0]\nswitch costume to (checkpoint 1 v)\nset size to (100) %\ngo to [back v] layer\nhide\nforever\n    if <touching (man v)?> then\n        set [endy v] to [1]\n        stop [all v]\n    end\nend\n\nwhen I receive [tick v]\nposition ((x) - (scroll x)) ((y) - (scroll y))\n\nwhen I receive [setup v]\npoint in direction (90)\nclear graphic effects\nset size to (80) %\nhide\nset [on/off v] to [0]\nset [x v] to [0]\nset [y v] to [0]\nclone at x: [9545] y: [1309]\n\ndefine position (x) (y)\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\nelse\n    hide\nend\n\ndefine clone at x: (x) y: (y)\nset [x v] to (x)\nset [y v] to (y)\n\nwhen I receive [hide v]\nhide\n\nwhen I receive [skip v]\nif <(PROGRESS) = [9]> then\n    set [scroll x checkpoint v] to [9445]\n    set [scroll y checkpoint v] to [1369]\nend\n\n@new intro\n\nwhen flag clicked\nbroadcast (green flag v)\nreset timer\nhide\nstart game\n\nset size to (100) %\nshow\nswitch costume to (bg v)\ngo to x: (0) y: (0)\nset [clone id v] to [1]\nrepeat (length of [kikoko])\n    create clone of (_myself_ v)\n    change [clone id v] by (1)\n    wait (0.2) seconds\nend\nwait until <(timer) > [4.1]>\ncreate clone of (_myself_ v)\nwait until <(timer) > [5.5]>\nstart game\nrepeat (5)\n    change [ghost v] effect by (10)\n    go to [front v] layer\nend\nrepeat (5)\n    change [ghost v] effect by (10)\n    go to [front v] layer\nend\nhide\n\nwhen I start as a clone\nif <(clone id) = [1]> then\n    switch costume to (k v)\n    intro start [240] glide to x [-105] wait [3.5] when timer > [5.5] delete clone\nelse\n    if <(clone id) = [2]> then\n        switch costume to (i v)\n        intro start [240] glide to x [-74] wait [3.6] when timer > [5.5] delete clone\n    else\n        if <(clone id) = [3]> then\n            switch costume to (k v)\n            intro start [240] glide to x [-39] wait [3.7] when timer > [5.5] delete clone\n        else\n            if <(clone id) = [4]> then\n                switch costume to (o v)\n                intro start [240] glide to x [6] wait [3.8] when timer > [5.5] delete clone\n            else\n                if <(clone id) = [5]> then\n                    switch costume to (k v)\n                    intro start [240] glide to x [55] wait [3.9] when timer > [5.5] delete clone\n                else\n                    if <(clone id) = [6]> then\n                        switch costume to (o v)\n                        intro start [240] glide to x [100] wait [4] when timer > [5.5] delete clone\n                    else\n                        if <(clone id) = [7]> then\n                            show\n                            go to [front v] layer\n                            switch costume to (productions v)\n                            go to x: (0) y: (-40)\n                            set size to (170) %\n                            start sound [low end2 v]\n                            repeat until <(size) = [100]>\n                                change size by (((100) - (size)) / (2))\n                                set [ghost v] effect to ((size) - (100))\n                            end\n                            wait until <(timer) > [5.5]>\n                            repeat (5)\n                                change [ghost v] effect by (20)\n                                go to [front v] layer\n                                change size by (5)\n                            end\n                            delete this clone\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\n\ndefine intro start (x) glide to x (destination) wait (timer) when timer > (#) delete clone\nshow\ngo to [front v] layer\nset size to (100) %\ngo to x: (x) y: (0)\nrepeat until <(timer) > (timer)>\n    set x to (((x position) + ((destination) / (10))) / (1.1))\n    set [ghost v] effect to ((x position) - (destination))\nend\nset size to (150) %\nstart sound [low end v]\nrepeat until <(size) = [100]>\n    change size by (((100) - (size)) / (2))\nend\nwait until <(timer) > (#)>\nrepeat (5)\n    change [ghost v] effect by (20)\n    go to [front v] layer\n    change size by (5)\nend\ndelete this clone\n\ndefine start game\nbroadcast (green flag v)\nbroadcast (Play game v)\n\n
v1.4.1\nThis should be obvious, but NO ADVERTISING\n\nYou are lost in the jungle searching for Scratchu Picchu. But there are spikes from the old ruins that slows you down...\n\nDifficulty rating: Medium to Hard\nPart 2: https://scratch.mit.edu/projects/388702554/\nThere is one level with 10 checkpoints\n\nMay lag on slow computers*\nNo advertising!\n■-■-■-■-■-■-■-■-■-■-■-■-■-■-■-■-■-■-■-■-■-■-■-■-■-■\nControls:\n• -->Controls instruction in-game<--\n• "R" to restart the current checkpoint. \n• Mute the music or skip with the icon top left.\n• No wall jumps\n• You don't actually need the machete for anything yet\n■-■-■-■-■-■-■-■-■-■-■-■-■-■-■-■-■-■-■-■-■-■-■-■-■-■\nEnjoy!\nIf you like this game, make sure to ❤️ , ⭐️ and follow!\nAnd check out my other projects :D\n■-■-■-■-■-■-■-■-■-■-■-■-■-■-■-■-■-■-■-■-■-■-■-■-■-■\nCredits:\n• Inspired by Hiram Bingham's adventure to Machu Picchu\n• Thanks to @griffpatch for scrolling engine (modified by me) \n• Big thank you to @Thepugmen for grass sprite\n• Tree art inspired from @--Dove-- , made by me\n• Sound effects from scratch sound library\n• Title from cooltext.com\n• Background music is from YouTube audiolibrary\n• Thanks to TheFatRat for music at the end\n\n\n#platformer #game #mountain #fun #mountainplatformer #scrollingplatformer #mobile #mobile_compatible #mobile_friendly #love #favorite #follow #kikoko