Adventure 2 - Mobile Friendly / #all #games #trending #platformer #art
@Stage\n\nwhen I receive [play v]\nforever\n    play sound [bensound-creativeminds v] until done\nend\n\n@Blank\n\n@Assets\n\nwhen flag clicked\nhide\ngo to [back v] layer\n\n@Thumbnail\n\nwhen flag clicked\nbroadcast (Intro v)\nwait (2.2) seconds\nbroadcast (Finish Intro v)\n\nwhen flag clicked\nwait (0.001) seconds\nrepeat (20)\n    change [ghost v] effect by (5)\nend\n\nwhen flag clicked\ngo to x: (0) y: (0)\nshow\ngo to [front v] layer\nforever\n    go to [front v] layer\n    set [ghost v] effect to (100)\nend\n\n@Player\n\ndefine Vertical movement\nchange y by (Y Speed)\nVertical Colition\nGravity\n\ndefine Vertical Colition\nif <touching (level v)?> then\n    if <[0] > (Y Speed)> then\n        repeat until <not <touching (level v)?>>\n            change y by (1)\n        end\n    end\n    set [above the platform? v] to [Yes]\n    if <(Y Speed) > [0]> then\n        repeat until <not <touching (level v)?>>\n            change y by (-1)\n        end\n    end\n    set [y speed v] to [0]\nend\n\ndefine Gravity\nchange [y speed v] by (-1)\n\nwhen I receive [finish intro v]\nset x to (-206)\nset y to (-20)\nshow\nrepeat (4)\n    change [ghost v] effect by (-25)\nend\nforever\n    Horizontal Movement\n    Vertical movement\nend\n\nwhen flag clicked\npoint in direction (90)\nreset timer\nhide\nset [ghost v] effect to (100)\n\ndefine Horizontal Movement\nchange x by (X Speed)\nHorizontal Collision\nFriction\n\ndefine Friction\nset [x speed v] to ((X Speed) * (0.8))\n\ndefine Horizontal Collision\nif <touching (level v)?> then\n    repeat (3)\n        change y by (1)\n        if <not <touching (level v)?>> then\n            stop [this script v]\n        end\n    end\n    change y by (-3)\n    if <[0] > (X Speed)> then\n        repeat until <not <touching (level v)?>>\n            change x by (1)\n        end\n    end\n    if <(X Speed) > [0]> then\n        repeat until <not <touching (level v)?>>\n            change x by (-1)\n        end\n    end\n    set [x speed v] to [0]\nend\n\nwhen I receive [next level v]\nset [ghost v] effect to (100)\nset [x speed v] to [0]\nset [y speed v] to [0]\ngo to x: (-206) y: (-20)\nwait (0.2) seconds\nrepeat (4)\n    change [ghost v] effect by (-25)\nend\n\nwhen I receive [death v]\nset [x speed v] to [0]\nset [y speed v] to [0]\nset [x v] to (x position)\nset [y v] to (y position)\ngo to x: (-206) y: (-20)\n\nwhen I receive [finish intro v]\nset [sword v] to []\nset [switch in progress v] to []\nset [levels v] to [1]\n\nwhen I receive [play v]\nforever\n    if <not <(LEVELS) = [14]>> then\n        if <(x position) > [235]> then\n            broadcast (Next Level v)\n            start sound [Ding Sound Effect v]\n            set [x speed v] to [0]\n            set [y speed v] to [0]\n            change [levels v] by (1)\n        end\n    end\nend\n\nwhen I receive [death v]\nset [ghost v] effect to (100)\nstart sound [Punch Sound Effect v]\nwait (0.5) seconds\ngo to x: (-206) y: (-20)\nrepeat (4)\n    change [ghost v] effect by (-25)\nend\n\nwhen I receive [play v]\nforever\n    repeat until <([costume # v] of [mobile button v]) = [2]>\n        if <<<key (up arrow v) pressed?> or <key (w v) pressed?>> and <(Above the platform?) = [Yes]>> then\n            change [y speed v] by (13)\n            set [above the platform? v] to [No]\n        end\n        if <<key (d v) pressed?> or <key (right arrow v) pressed?>> then\n            point in direction (90)\n            change [x speed v] by (1.5)\n        end\n        if <<key (a v) pressed?> or <key (left arrow v) pressed?>> then\n            point in direction (-90)\n            change [x speed v] by (-1.5)\n        end\n        if <<touching (sword v)?> and <(SWORD) = []>> then\n            set [sword v] to [1]\n        end\n    end\nend\n\nwhen I receive [play v]\nforever\n    repeat until <([costume # v] of [mobile button v]) = [1]>\n        if <<<mouse down?> and <(mouse y) > (y position)>> and <(Above the platform?) = [Yes]>> then\n            change [y speed v] by (13)\n            set [above the platform? v] to [No]\n        end\n        if <<mouse down?> and <(mouse x) > (x position)>> then\n            point in direction (90)\n            change [x speed v] by (1.5)\n        end\n        if <<mouse down?> and <(mouse x) < (x position)>> then\n            point in direction (-90)\n            change [x speed v] by (-1.5)\n        end\n        if <<touching (sword v)?> and <(SWORD) = []>> then\n            set [sword v] to [1]\n        end\n    end\nend\n\n@Level\n\nwhen I receive [finish intro v]\nshow\ngo to x: (0) y: (0)\nswitch costume to (level 1 v)\n\nwhen I receive [next level v]\nwait (0.2) seconds\nnext costume\n\n@Spike\n\nwhen flag clicked\ngo to [back v] layer\nhide\n\nwhen I start as a clone\nshow\nforever\n    if <touching (player v)?> then\n        broadcast (Death v)\n    end\nend\n\ndefine Create Spike with X: (x) Y: (y)\ngo to x: (x) y: (y)\ncreate clone of (_myself_ v)\n\nwhen I receive [finish intro v]\nCreate Spike with X: [-86] Y: [-76]\n\nwhen I receive [next level v]\nwait (0.19) seconds\nif <(LEVELS) = [4]> then\n    Create Spike with X: [77] Y: [-76]\n    Create Spike with X: [42] Y: [-76]\n    Create Spike with X: [-18] Y: [1]\n    Create Spike with X: [-53] Y: [1]\n    Create Spike with X: [128] Y: [74]\nend\nif <(LEVELS) = [5]> then\n    Create Spike with X: [123] Y: [4]\nend\nif <(LEVELS) = [6]> then\n    Create Spike with X: [176] Y: [-76]\nend\nif <(LEVELS) = [8]> then\n    Create Spike with X: [-74] Y: [54]\n    Create Spike with X: [58] Y: [-76]\n    Create Spike with X: [175] Y: [-76]\nend\nif <(LEVELS) = [9]> then\n    Create Spike with X: [-137] Y: [-76]\n    Create Spike with X: [-102] Y: [-76]\n    Create Spike with X: [-65] Y: [-76]\n    Create Spike with X: [65] Y: [-76]\n    Create Spike with X: [102] Y: [-76]\n    Create Spike with X: [137] Y: [-76]\nend\nif <(LEVELS) = [10]> then\n    Create Spike with X: [67] Y: [37]\n    Create Spike with X: [-87] Y: [-24]\nend\nif <(LEVELS) = [13]> then\n    Create Spike with X: [-145] Y: [-76]\n    Create Spike with X: [50] Y: [-76]\nend\n\nwhen I receive [next level v]\ndelete this clone\n\n@Lava\n\nwhen flag clicked\ngo to [back v] layer\nhide\n\ndefine Create Lava with X: (x) Y: (y)\ngo to x: (x) y: (y)\ncreate clone of (_myself_ v)\n\nwhen I receive [next level v]\nif <(LEVELS) = [2]> then\n    Create Lava with X: [0] Y: [-213]\nend\nif <(LEVELS) = [6]> then\n    Create Lava with X: [82] Y: [-213]\nend\nif <(LEVELS) = [7]> then\n    Create Lava with X: [82] Y: [-214]\nend\nif <(LEVELS) = [8]> then\n    Create Lava with X: [0] Y: [-213]\nend\nif <(LEVELS) = [13]> then\n    Create Lava with X: [0] Y: [-213]\nend\n\nwhen I start as a clone\nforever\n    if <touching (player v)?> then\n        broadcast (Death v)\n    end\nend\n\nwhen I receive [finish intro v]\nCreate Lava with X: [0] Y: [-213]\n\nwhen I start as a clone\nshow\nforever\n    change [move v] by (5)\n    change y by ([sin v] of (Move) )\nend\n\nwhen I receive [next level v]\nset [move v] to [0]\ndelete this clone\n\n@Particles\n\nwhen flag clicked\nhide\nset [is clone? v] to []\n\nwhen I receive [death v]\nstart sound [Punch Sound Effect v]\nif <not <(Is clone?) = [1]>> then\n    repeat (4)\n        Particles\n    end\nend\n\nwhen I start as a clone\nswitch costume to (pick random (1) to (3))\nset [ghost v] effect to (0)\nset [color v] effect to (pick random (-5) to (5))\nset [brightness v] effect to (pick random (-20) to (0))\nset [is clone? v] to [1]\ngo to x: (x) y: (y)\nshow\nset [xv v] to (pick random (-10) to (10))\nset [yv v] to (pick random (5) to (30))\nrepeat until <<touching (_edge_ v)?> or <touching (level v)?>>\n    change [yv v] by (-2)\n    set [xv v] to ((xv) * (0.9))\n    set [yv v] to ((yv) * (0.9))\n    change x by (xv)\n    change y by (yv)\n    if <touching (level v)?> then\n        change y by (1)\n        if <touching (level v)?> then\n            change y by (1)\n            if <touching (level v)?> then\n                change y by (1)\n                if <touching (level v)?> then\n                    change y by (1)\n                    if <touching (level v)?> then\n                        change y by (1)\n                        if <touching (level v)?> then\n                            change y by (1)\n                            if <touching (level v)?> then\n                                change y by (1)\n                                if <touching (level v)?> then\n                                    change y by (1)\n                                    if <touching (level v)?> then\n                                        change y by (1)\n                                        if <touching (level v)?> then\n                                            change y by (1)\n                                            if <touching (level v)?> then\n                                                change y by (1)\n                                                if <touching (level v)?> then\n                                                    change y by (1)\n                                                else\n                                                    change y by (-1)\n                                                end\n                                            end\n                                        end\n                                    end\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\nrepeat (20)\n    change [ghost v] effect by (5)\nend\ndelete this clone\n\ndefine Particles\nrepeat (5)\n    create clone of (_myself_ v)\nend\n\n@Walk particles\n\nwhen flag clicked\nhide\n\nwhen I receive [play v]\nhide\nforever\n    if <(Y Speed) < [0]> then\n        wait until <(Y Speed) = [-1]>\n        repeat until <(Y Speed) > [0]>\n            repeat (2)\n                move (0) steps\n            end\n            create clone of (_myself_ v)\n        end\n    end\nend\n\nwhen I start as a clone\ngo to [back v] layer\nset [ghost v] effect to (0)\nset size to (pick random (130) to (150)) %\nshow\npoint in direction (pick random (-360) to (360))\ngo to (player v)\nchange x by (X Speed)\nchange y by (-15)\nwait (0.075) seconds\nrepeat (10)\n    change [ghost v] effect by (10)\nend\ndelete this clone\n\n@Words\n\nwhen I receive [intro v]\nset size to (150) %\ngo to [front v] layer\nset [ghost v] effect to (100)\nswitch costume to (intro v)\nwait (0.01) seconds\nshow\nrepeat (20)\n    change [ghost v] effect by (-5)\nend\nwait (1) seconds\nrepeat (20)\n    change [ghost v] effect by (5)\nend\nset [ghost v] effect to (20)\nset size to (130) %\nswitch costume to (level 1 v)\ngo to x: (-24) y: (160)\n\nwhen flag clicked\ngo to x: (0) y: (0)\nhide\n\nwhen I receive [play v]\nforever\n    if <(LEVELS) = [2]> then\n        switch costume to (level 2 v)\n        go to x: (-38) y: (143)\n    end\n    if <(LEVELS) = [3]> then\n        switch costume to (level 3 v)\n        go to x: (-56) y: (129)\n    end\n    if <(LEVELS) = [4]> then\n        switch costume to (level 4 v)\n        go to x: (-199) y: (160)\n    end\n    if <(LEVELS) = [5]> then\n        switch costume to (level 5 v)\n        go to x: (-77) y: (145)\n    end\n    if <(LEVELS) = [6]> then\n        switch costume to (level 6 v)\n        go to x: (-165) y: (161)\n    end\n    if <(LEVELS) = [7]> then\n        switch costume to (level 7 v)\n        go to x: (-66) y: (160)\n    end\n    if <(LEVELS) = [8]> then\n        switch costume to (level 8 v)\n        go to x: (-132) y: (162)\n    end\n    if <(LEVELS) = [9]> then\n        switch costume to (level 9 v)\n        go to x: (-139) y: (163)\n    end\n    if <(LEVELS) = [10]> then\n        switch costume to (level 10 v)\n        go to x: (0) y: (120)\n    end\n    if <(LEVELS) = [11]> then\n        switch costume to (level 11 v)\n        go to x: (0) y: (120)\n    end\n    if <(LEVELS) = [12]> then\n        switch costume to (level 12 v)\n        go to x: (-117) y: (130)\n    end\n    if <(LEVELS) = [13]> then\n        switch costume to (level 13 v)\n        go to x: (-117) y: (130)\n    end\n    if <(LEVELS) = [14]> then\n        switch costume to (level 14 v)\n        go to x: (-21) y: (127)\n    end\nend\n\nwhen I receive [play v]\nforever\n    if <touching (player v)?> then\n        set [ghost v] effect to (40)\n    else\n        set [ghost v] effect to (20)\n    end\nend\n\n@Trampoline\n\nwhen flag clicked\nhide\nset [ghost v] effect to (100)\nswitch costume to (trampoline 1 v)\nwait until <(LEVELS) = [7]>\nwait (0.19) seconds\nshow\nset [ghost v] effect to (30)\n\nwhen I receive [bounce v]\nswitch costume to (trampoline 2 v)\nwait (0.01) seconds\nswitch costume to (trampoline 3 v)\nwait (0.01) seconds\nswitch costume to (trampoline 2 v)\nwait (0.01) seconds\nswitch costume to (trampoline 1 v)\n\nwhen flag clicked\nhide\nset [ghost v] effect to (100)\n\nwhen I receive [next level v]\nhide\nwait (0.19) seconds\nif <(LEVELS) = [7]> then\n    show\n    go to x: (-72) y: (-71)\nend\nif <(LEVELS) = [8]> then\n    show\n    go to x: (-125) y: (-71)\nend\nif <(LEVELS) = [11]> then\n    show\n    go to x: (-80) y: (-20)\nend\n\n@Trampoline (Program)\n\nwhen flag clicked\nforever\n    if <touching (player v)?> then\n        if <<not <(Y Speed) = [1]>> and <not <(Y Speed) = [6]>>> then\n            broadcast (Bounce v)\n            set [above the trampoline? v] to [Yes]\n            set [y speed v] to [17]\n            start sound [Jump v]\n        end\n    end\nend\n\nwhen flag clicked\nhide\nset [ghost v] effect to (100)\nwait until <(LEVELS) = [7]>\nset [ghost v] effect to (100)\nshow\n\nwhen I receive [next level v]\nhide\nwait (0.19) seconds\nif <(LEVELS) = [7]> then\n    show\n    go to x: (-72) y: (-52)\nend\nif <(LEVELS) = [8]> then\n    show\n    go to x: (-125) y: (-52)\nend\nif <(LEVELS) = [11]> then\n    show\n    go to x: (-80) y: (-1)\nend\n\n@Decoration\n\nwhen flag clicked\nhide\n\nwhen I receive [finish intro v]\nswitch costume to (level 1 v)\nshow\n\nwhen I receive [next level v]\nwait (0.2) seconds\nnext costume\n\n@INTRO, DEATH, NEXT LEVEL\n\nwhen flag clicked\ngo to x: (36) y: (28)\nhide\n\nwhen I receive [next level v]\ngo to x: (0) y: (0)\nswitch costume to (next v)\ngo to [front v] layer\nset [ghost v] effect to (100)\nshow\nrepeat (7)\n    change [ghost v] effect by (-14)\nend\nwait (0.2) seconds\nrepeat (7)\n    change [ghost v] effect by (14)\nend\nset [ghost v] effect to (0)\nhide\n\nwhen flag clicked\ngo to x: (0) y: (0)\ngo to [front v] layer\ngo [backward v] (1) layers\nswitch costume to (death v)\nset [ghost v] effect to (100)\nshow\nrepeat (5)\n    change [ghost v] effect by (-20)\nend\nwait (1) seconds\nstart sound [Connect v]\nwait (1) seconds\nrepeat (5)\n    change [ghost v] effect by (20)\nend\nset [ghost v] effect to (0)\nhide\nbroadcast (Play v)\n\n@Clouds\n\nwhen flag clicked\nset [ghost v] effect to (100)\ngo to [back v] layer\nhide\n\nwhen I receive [play v]\nwait (0.5) seconds\nforever\n    set [ghost v] effect to (pick random (10) to (20))\nend\n\nwhen I receive [play v]\nset [ghost v] effect to (0)\nforever\n    wait (pick random (1) to (1.5)) seconds\n    switch costume to (pick random (1) to (2))\n    go to x: (240) y: (pick random (65) to (150))\n    create clone of (_myself_ v)\nend\n\nwhen I start as a clone\nshow\nrepeat ((236) / (2.5))\n    change x by (-3)\n    change x by (-3)\nend\ndelete this clone\n\n@Enemy\n\ndefine Gravity (gravity) Jump Height (jump height) Speed (speed) Friction (friction) Slope (slope)\nchange [yv v] by (gravity)\nchange y by (yv)\nif <touching (level v)?> then\n    repeat until <not <touching (level v)?>>\n        change y by ((([abs v] of (yv) ) / (yv)) * (-1))\n    end\nend\nset [xv v] to (((xv) + ((<(x position) > ([x position v] of [player v])> * ((speed) * (-1))) + (<(x position) < ([x position v] of [player v])> * (speed)))) * (friction))\nchange x by (xv)\nset [enemy - slope v] to [0]\nrepeat until <<(Enemy - Slope) = ((slope) * (-1))> or <not <touching (level v)?>>>\n    change y by (1)\n    change [enemy - slope v] by (-1)\nend\nif <touching (level v)?> then\n    change y by (Enemy - Slope)\n    repeat until <not <touching (level v)?>>\n        change x by ((([abs v] of (xv) ) / (xv)) * (-1))\n    end\nend\npoint towards (player v)\nif <(y position) < [-180]> then\n    delete this clone\nend\n\nwhen I receive [play v]\ngo to [front v] layer\nhide\n\nwhen I receive [next level v]\nrepeat (1)\n    delete this clone\nend\nrepeat (13)\n    move (0) steps\nend\nif <(LEVELS) = [3]> then\n    Clone at [150] [ -65]\nelse\n    if <(LEVELS) = [5]> then\n        Clone at [31] [-65]\n    else\n        if <(LEVELS) = [10]> then\n            Clone at [-17] [-65]\n            Clone at [138] [-65]\n        else\n            if <(LEVELS) = [11]> then\n                Clone at [209] [-65]\n            else\n                if <(LEVELS) = [12]> then\n                    Clone at [215] [-65]\n                    Clone at [19] [-65]\n                else\n                    if <(LEVELS) = [14]> then\n                        Clone at [215] [-65]\n                    end\n                end\n            end\n        end\n    end\nend\n\ndefine Clone at (x) (y)\ngo to x: (x) y: (y)\ncreate clone of (_myself_ v)\n\nwhen I start as a clone\nshow\nforever\n    set size to (90) %\n    Gravity [-1] Jump Height [1] Speed [1.25] Friction [.75] Slope [1]\nend\n\nwhen I receive [death v]\npoint towards (player v)\nrepeat (1)\n    delete this clone\nend\nif <(LEVELS) = [3]> then\n    Clone at [170] [-65]\nelse\n    if <(LEVELS) = [5]> then\n        Clone at [31] [-65]\n    else\n        if <(LEVELS) = [10]> then\n            Clone at [-17] [-65]\n            Clone at [138] [-65]\n        else\n            if <(LEVELS) = [11]> then\n                Clone at [209] [-65]\n            else\n                if <(LEVELS) = [12]> then\n                    Clone at [215] [-65]\n                    Clone at [19] [-65]\n                else\n                    if <(LEVELS) = [14]> then\n                        Clone at [215] [-65]\n                    end\n                end\n            end\n        end\n    end\nend\n\nwhen I start as a clone\nshow\nforever\n    if <touching (player v)?> then\n        broadcast (Death v)\n    end\nend\n\nwhen I start as a clone\nshow\nforever\n    if <<touching (spike v)?> or <touching (lava v)?>> then\n        broadcast (Enemy death v)\n        set [enemy x v] to (x position)\n        set [enemy y v] to (y position)\n    end\nend\n\n@Mobile button\n\nwhen I receive [play v]\ngo to x: (200) y: (-145)\nswitch costume to (button v)\ngo to [front v] layer\ngo [forward v] (100) layers\nset size to (90) %\nshow\nforever\n    if <touching (mouse-pointer v)?> then\n        repeat (5)\n            change size by (2)\n        end\n        wait until <not <touching (mouse-pointer v)?>>\n        repeat (5)\n            change size by (-2)\n        end\n    end\nend\n\nwhen this sprite clicked\nwait until <mouse down?>\nrepeat (2)\n    change size by (-5)\nend\nwait until <not <mouse down?>>\nnext costume\nrepeat (2)\n    change size by (5)\nend\n\nwhen this sprite clicked\nif <(costume [number v]) = [1]> then\n    broadcast (Mobile - on v)\nelse\n    broadcast (Mobile - off v)\nend\n\n@Enemy Particles\n\nwhen flag clicked\nhide\nset [is clone? v] to []\n\nwhen I receive [enemy death v]\nstart sound [Punch Sound Effect v]\nif <not <(Is clone?) = [1]>> then\n    repeat (4)\n        Particles\n    end\nend\n\nwhen I start as a clone\nswitch costume to (pick random (1) to (3))\nset [ghost v] effect to (0)\nset [color v] effect to (pick random (-5) to (5))\nset [brightness v] effect to (pick random (-20) to (0))\nset [is clone? v] to [1]\ngo to x: (Enemy X) y: (Enemy Y)\nshow\nset [xv v] to (pick random (-10) to (10))\nset [yv v] to (pick random (5) to (30))\nrepeat until <<touching (_edge_ v)?> or <touching (level v)?>>\n    change [yv v] by (-2)\n    set [xv v] to ((xv) * (0.9))\n    set [yv v] to ((yv) * (0.9))\n    change x by (xv)\n    change y by (yv)\n    if <touching (level v)?> then\n        change y by (1)\n        if <touching (level v)?> then\n            change y by (1)\n            if <touching (level v)?> then\n                change y by (1)\n                if <touching (level v)?> then\n                    change y by (1)\n                    if <touching (level v)?> then\n                        change y by (1)\n                        if <touching (level v)?> then\n                            change y by (1)\n                            if <touching (level v)?> then\n                                change y by (1)\n                                if <touching (level v)?> then\n                                    change y by (1)\n                                    if <touching (level v)?> then\n                                        change y by (1)\n                                        if <touching (level v)?> then\n                                            change y by (1)\n                                            if <touching (level v)?> then\n                                                change y by (1)\n                                                if <touching (level v)?> then\n                                                    change y by (1)\n                                                else\n                                                    change y by (-1)\n                                                end\n                                            end\n                                        end\n                                    end\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\nrepeat (20)\n    change [ghost v] effect by (5)\nend\ndelete this clone\n\ndefine Particles\nrepeat (5)\n    create clone of (_myself_ v)\nend\n\n
==================Adventure===============\nThese is the FINAL test to be an expert adventurer.\nReach to the end of this adventure if you can...\n\n\n================ How To Play ===============\n[Arrows - WASD - Mobile] - Move\n-Avoid spikes, enemies and lava\n-Jump on trampolines\n\nIf lagging go here: https://turbowarp.org/695952611