Tiger -A Platformer-

Instructions: Use the arrow keys/wasd/mobile to move the tiger.\nR or restart button to restart if you get stuck\nSpace or skip button to skip a level\nAvoid the spikes\nYou can swim\nBounce on trampolines\nTurn your volume on

@Stage\n\nwhen flag clicked\nswitch backdrop to (blue sky 2  v)\nforever\n    play sound [Travel The Galaxy \(HD\) v] until done\nend\n\n@Tiger\n\nwhen flag clicked\nforever\n\nwhen flag clicked\nhide\n\n\n\nchange [yv v] by (1)\n\nchange [yv v] by (-1)\n\nwhen I receive [lvl start v]\ngo to x: (-187) y: (-56)\nset [xv v] to [0]\nset [yv v] to [0]\n\nwhen I receive [start v]\ngo to x: (-187) y: (-56)\nshow\nset [ghost v] effect to (0)\nset size to (100) %\nset [lvl v] to [1]\nset [water v] to [0]\nset [yv v] to [0]\nset [xv v] to [0]\nforever\n    if <(water) = [0]> then\n        if <<<key (right arrow v) pressed?> or <key (d v) pressed?>> or <<mouse down?> and <(mouse x) > (x position)>>> then\n            change [xv v] by (1)\n        end\n        if <<<key (left arrow v) pressed?> or <key (a v) pressed?>> or <<mouse down?> and <(mouse x) < (x position)>>> then\n            change [xv v] by (-1)\n        end\n        set [xv v] to ((Xv) * (0.9))\n        change x by (Xv)\n        if <touching (sprite1 v)?> then\n            change y by (1)\n            if <touching (sprite1 v)?> then\n                change y by (1)\n                if <touching (sprite1 v)?> then\n                    change y by (1)\n                    if <touching (sprite1 v)?> then\n                        change y by (1)\n                        if <touching (sprite1 v)?> then\n                            change y by (1)\n                            if <touching (sprite1 v)?> then\n                                change x by ((Xv) * (-1))\n                                change y by (-5)\n                                if <<<key (up arrow v) pressed?> or <key (w v) pressed?>> or <<mouse down?> and <(mouse y) > ((y position) + (20))>>> then\n                                    if <(Xv) > [0]> then\n                                        set [xv v] to [-10]\n                                    else\n                                        set [xv v] to [10]\n                                    end\n                                    set [yv v] to [13]\n                                else\n                                    set [xv v] to [0]\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n        change [yv v] by (-1)\n        change y by (Yv)\n        if <touching (sprite1 v)?> then\n            change y by ((Yv) * (-1))\n            set [yv v] to [0]\n        end\n        change y by (-1)\n        if <touching (sprite1 v)?> then\n            if <<<key (up arrow v) pressed?> or <key (w v) pressed?>> or <<mouse down?> and <(mouse y) > ((y position) + (20))>>> then\n                set [yv v] to [15]\n            end\n        end\n        change y by (1)\n        if <touching (tramp v)?> then\n            set [yv v] to [22]\n        end\n        if <touching (sprite3 v)?> then\n            broadcast (new lvl v)\n            set [xv v] to [0]\n            set [yv v] to [0]\n            go to x: (-187) y: (-56)\n            change [lvl v] by (1)\n        end\n        if <<touching (sprite5 v)?> or <touching (sprite8 v)?>> then\n            start sound [Crunch v]\n            repeat (10)\n                change size by (-10)\n                change [ghost v] effect by (10)\n            end\n            go to x: (-187) y: (-56)\n            set [ghost v] effect to (0)\n            set size to (100) %\n        end\n        if <key (space v) pressed?> then\n            broadcast (new lvl v)\n            go to x: (-187) y: (-56)\n            change [lvl v] by (1)\n            wait (.2) seconds\n        end\n        if <touching (sprite6 v)?> then\n            start sound [Plunge v]\n            set [water v] to [1]\n        else\n            set [water v] to [0]\n        end\n        if <key (r v) pressed?> then\n            go to x: (-187) y: (-56)\n        end\n    end\n    if <(water) = [1]> then\n        if <key (r v) pressed?> then\n            go to x: (-187) y: (-56)\n        end\n        if <<<key (up arrow v) pressed?> or <key (w v) pressed?>> or <<mouse down?> and <(mouse y) > ((y position) + (20))>>> then\n            set [yv v] to [4.5]\n            change y by (Yv)\n        else\n            set [yv v] to [-1.75]\n            change y by (Yv)\n        end\n        if <<<key (down arrow v) pressed?> or <key (s v) pressed?>> or <<mouse down?> and <(mouse y) > ((y position) + (-20))>>> then\n            set [yv v] to [-2.5]\n            change y by (Yv)\n        end\n        if <touching (sprite1 v)?> then\n            change y by (1)\n            if <touching (sprite1 v)?> then\n                change y by (1)\n                if <touching (sprite1 v)?> then\n                    change y by (1)\n                    if <touching (sprite1 v)?> then\n                        change y by (1)\n                        if <touching (sprite1 v)?> then\n                            change y by (1)\n                            if <touching (sprite1 v)?> then\n                                change x by ((Xv) * (-1))\n                                change y by (-5)\n                            end\n                        end\n                    end\n                end\n            end\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 [xv v] by (1)\n        end\n        if <<<key (left arrow v) pressed?> or <key (a v) pressed?>> or <<mouse down?> and <(mouse x) < (x position)>>> then\n            change [xv v] by (-1)\n        end\n        set [xv v] to ((Xv) * (0.9))\n        change x by (Xv)\n        if <touching (sprite1 v)?> then\n            change y by ((Yv) * (-1))\n            set [yv v] to [0]\n        end\n        if <not <touching (sprite6 v)?>> then\n            set [water v] to [0]\n        end\n        if <touching (sprite3 v)?> then\n            broadcast (new lvl v)\n            set [yv v] to [0]\n            set [xv v] to [0]\n            go to x: (-187) y: (-56)\n            change [lvl v] by (1)\n        end\n        if <<touching (sprite5 v)?> or <touching (sprite8 v)?>> then\n            repeat (10)\n                change size by (-10)\n                change [ghost v] effect by (10)\n            end\n            go to x: (-187) y: (-56)\n            set [ghost v] effect to (0)\n            set size to (100) %\n        end\n        if <key (space v) pressed?> then\n            broadcast (new lvl v)\n            go to x: (-187) y: (-56)\n            change [lvl v] by (1)\n            wait (.2) seconds\n        end\n    end\nend\n\n@thumbnail\n\nwhen flag clicked\ngo to x: (0) y: (0)\nshow\ngo to [front v] layer\nset [ghost v] effect to (100)\n\n@Sprite1\n\nwhen flag clicked\nhide\n\nwhen I receive [new lvl v]\nnext costume\n\nwhen I receive [start v]\nswitch costume to (costume1 v)\ngo to x: (0) y: (0)\nshow\ngo to [back v] layer\n\n@Sprite2\n\nwhen flag clicked\nhide\n\nwhen I receive [new lvl v]\nnext costume\n\nwhen I receive [start v]\nswitch costume to (costume1 v)\ngo to x: (0) y: (0)\nshow\n\n@Sprite3\n\nwhen flag clicked\ngo to x: (0) y: (0)\nshow\nset size to (100) %\nset [ghost v] effect to (0)\ngo to [back v] layer\n\n@water\n\nhide\n\nwhen I receive [start the game v]\n\ndefine wave\nset [ghost v] effect to (40)\nset y to ((([sin v] of ((timer) * (100)) ) * (15)) + (35))\nstamp\nset y to ((([sin v] of ((timer) * (100)) ) * (10)) + (25))\nstamp\nset y to ((([sin v] of ((timer) * (100)) ) * (5)) + (15))\nstamp\nset [ghost v] effect to (100)\n\nwhen I receive [new lvl v]\nnext costume\n\nshow\ngo to [back v] layer\n\nwhen I receive [start v]\nerase all\nswitch costume to (costume1 v)\nhide\nforever\n    erase all\n    wave\nend\n\n@Sprite4\n\nwhen flag clicked\nhide\n\nwhen I receive [new lvl v]\nnext costume\n\nwhen I receive [start v]\nswitch costume to (costume1 v)\nshow\ngo to [back v] layer\ngo to x: (0) y: (0)\n\n@Sprite5\n\nwhen flag clicked\nswitch costume to (costume1 v)\nshow\ngo to x: (0) y: (0)\nforever\n    if <touching (tiger v)?> then\n        play sound [Crunch v] until done\n    end\nend\n\nwhen I receive [new lvl v]\nnext costume\n\n@Sprite6\n\nwhen flag clicked\ngo to [back v] layer\nshow\nswitch costume to (costume2 v)\nforever\n    go to [back v] layer\n    go to (water v)\nend\n\nwhen I receive [new lvl v]\nnext costume\n\n@Sprite7\n\nwhen flag clicked\nhide\nforever\n    wait (pick random (1.5) to (5)) seconds\n    create clone of (_myself_ v)\nend\n\nwhen I start as a clone\ngo to [back v] layer\nset x to (-200)\nset size to (pick random (50) to (100)) %\nshow\nset [ghost v] effect to (pick random (10) to (70))\nset y to (pick random (60) to (120))\nrepeat until <touching (sprite3 v)?>\n    change x by (3)\nend\ndelete this clone\n\n@Sprite8\n\nwhen flag clicked\nswitch costume to (costume2 v)\nshow\ngo to x: (36) y: (28)\nforever\n    repeat (20)\n        change x by (5)\n    end\n    wait (.3) seconds\n    repeat (20)\n        change x by (-5)\n    end\n    wait (.3) seconds\nend\n\nwhen I receive [new lvl v]\nnext costume\n\n@Screen Shot 2020-04-15 at 11\n\nwhen flag clicked\ngo to x: (0) y: (0)\nshow\n\n@Sprite9\n\nwhen flag clicked\nhide\n\nwhen this sprite clicked\nchange [lvl v] by (1)\nbroadcast (new lvl v)\nbroadcast (lvl start v)\nwait (.2) seconds\n\nwhen I receive [start v]\ngo to x: (-183) y: (-159)\nshow\npoint in direction (90)\nforever\n    repeat (3)\n        turn right (5) degrees\n        wait (.00001) seconds\n    end\n    wait (.1) seconds\n    repeat (6)\n        turn left (5) degrees\n        wait (.00001) seconds\n    end\n    wait (.1) seconds\n    repeat (3)\n        turn right (5) degrees\n        wait (.00001) seconds\n    end\nend\n\n@Sprite10\n\nwhen flag clicked\nhide\n\nturn left (15) degrees\n\nwhen this sprite clicked\nbroadcast (lvl start v)\nwait (.2) seconds\n\nwait (.00001) seconds\n\nwhen I receive [start v]\ngo to x: (-91) y: (-159)\nshow\npoint in direction (90)\nforever\n    repeat (3)\n        turn right (5) degrees\n        wait (.00001) seconds\n    end\n    wait (.1) seconds\n    repeat (6)\n        turn left (5) degrees\n        wait (.00001) seconds\n    end\n    wait (.1) seconds\n    repeat (3)\n        turn right (5) degrees\n        wait (.00001) seconds\n    end\nend\n\n@tramp\n\nwhen flag clicked\nswitch costume to (costume6 v)\nhide\nforever\n    if <touching (tiger v)?> then\n        start sound [Big Boing v]\n        repeat (4)\n            next costume\n            wait (.05) seconds\n        end\n    end\nend\n\nswitch costume to (costume6 v)\n\nwhen flag clicked\nforever\n    if <(lvl) = [1]> then\n        hide\n    end\n    if <(lvl) = [2]> then\n        hide\n    end\n    if <(lvl) = [3]> then\n        hide\n    end\n    if <(lvl) = [4]> then\n        hide\n    end\n    if <(lvl) = [5]> then\n        hide\n    end\n    if <(lvl) = [6]> then\n        go to x: (70) y: (-94)\n        show\n    end\n    if <(lvl) = [7]> then\n        hide\n    end\n    if <(lvl) = [8]> then\n        hide\n    end\n    if <(lvl) = [9]> then\n        hide\n    end\n    if <(lvl) = [10]> then\n        hide\n    end\n    if <(lvl) = [11]> then\n        go to x: (193) y: (-94)\n        show\n    end\n    if <(lvl) = [12]> then\n        hide\n    end\n    if <(lvl) = [13]> then\n        hide\n    end\n    if <(lvl) = [14]> then\n        hide\n    end\n    if <(lvl) = [15]> then\n        go to x: (-146) y: (-94)\n        show\n    end\n    if <(lvl) = [16]> then\n        set [lvl v] to [1]\n        hide\n    end\nend\n\ngo to x: (70) y: (-94)\n\ngo to x: (193) y: (-94)\n\n@intro\n\nwhen flag clicked\ngo to [front v] layer\ngo [forward v] (100) layers\nset volume to (100) %\nstart sound [Super intro v]\nswitch costume to (screen shot 2020-06-03 at 11 v)\nset size to (100) %\nerase all\nhide\nset [ghost v] effect to (0)\npen up\ngo to x: (-231) y: (-240)\nset pen size to (100)\nset pen color to (#00f307)\npen down\nrepeat (3)\n    point in direction (0)\n    repeat (20)\n        move (20) steps\n    end\n    point in direction (90)\n    repeat (5)\n        move (20) steps\n    end\n    point in direction (180)\n    repeat (20)\n        move (20) steps\n    end\n    point in direction (90)\n    repeat (5)\n        move (20) steps\n    end\nend\npen up\nshow\ngo to x: (0) y: (0)\nset [ghost v] effect to (100)\nrepeat (10)\n    change [ghost v] effect by (-10)\nend\nset size to (200) %\npoint in direction (90)\nshow\nrepeat (20)\n    change size by (-10)\n    turn right (10) degrees\nend\nrepeat (10)\n    change size by (20)\n    turn right (10) degrees\nend\npoint in direction (90)\nrepeat (10)\n    change size by (-10)\nend\nwait (.5) seconds\nrepeat (20)\n    turn right (18) degrees\n    create clone of (_myself_ v)\nend\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nhide\nerase all\nbroadcast (start v)\nerase all\ndelete this clone\n\nwhen flag clicked\nforever\n    set pen color to (#00f307)\n    wait (.5) seconds\n    repeat (17)\n        change pen (color v) by (-1)\n    end\n    set pen color to (#ffe900)\n    wait (.5) seconds\n    repeat (14)\n        change pen (color v) by (-1)\n    end\n    set pen color to (#ff0000)\n    wait (.5) seconds\n    repeat (32)\n        change pen (color v) by (1)\n    end\nend\n\nwhen I start as a clone\nswitch costume to (costume1 v)\nset pen size to (100)\nset pen color to (#ffffff)\npen down\nrepeat until <touching (_edge_ v)?>\n    move (15) steps\nend\ndelete this clone\n\n