Water ~ Platformer
@Stage\n\nwhen I receive [choose v]\nswitch backdrop to (choose v)\n\nwhen flag clicked\nhide variable [skipavailable? v]\nhide variable [score v]\nhide variable [level v]\nshow list [all time winners v]\nhide variable [plays v]\nset [score v] to [0]\nhide variable [☁ highscore v]\nhide variable [gamerunning v]\nset [gamerunning v] to [0]\nset [skipavailable? v] to [1]\n\n\n    if <key (space v) pressed?> then\n        switch backdrop to (backdrop1 v)\n        broadcast (play v)\n    end\nend\n\nwhen backdrop switches to [backdrop22 v]\nshow variable [level v]\nif <(Score) > [49]> then\n    set [level v] to [Beginner]\nend\nif <<(Score) > [25]> and <(Score) < [50]>> then\n    set [level v] to [Intermediate]\nend\nif <<(Score) > [15]> and <(Score) < [26]>> then\n    set [level v] to [Advanced]\nend\nif <<(Score) > [5]> and <(Score) < [16]>> then\n    set [level v] to [Master]\nend\nif <<(Score) > [0]> and <(Score) < [6]>> then\n    set [level v] to [Champion]\nend\nif <(Score) = [0]> then\n    set [level v] to [Winner -- Best Score Possible]\n    say [Congratulations! You are now on the leaderboard \(all time winners\)!] for (8) seconds\n    add (username) to [all time winners v]\nend\n\nwhen backdrop switches to [backdrop22 v]\nif <(Score) < (☁ Highscore)> then\n    set [☁ highscore v] to (Score)\nend\nshow variable [score v]\nshow variable [level v]\nshow variable [☁ highscore v]\n\nwhen flag clicked\nforever\n    play sound [1 v] until done\n    play sound [2 v] until done\n    play sound [3 v] until done\nend\n\nwhen I receive [playmessage v]\nswitch backdrop to (backdrop7 v)\n\nwhen backdrop switches to [backdrop21 v]\nbroadcast (congrats v)\n\nwhen flag clicked\nswitch backdrop to (front v)\n\nwhen [s v] key pressed\nif <(GameRunning) = [1]> then\n    if <(SkipAvailable?) = [1]> then\n        next backdrop\n        set [skipavailable? v] to [0]\n        broadcast (Skipped v)\n    end\nend\n\n@Sprite1\n\nwhen flag clicked\nforever\n    if <touching color (#ffffcc)?> then\n        next backdrop\n        go to x: (-183) y: (-100)\n    end\nend\n\nwhen flag clicked\nhide\nswitch costume to (costume1 v)\ngo to [front v] layer\n\nwhen I receive [choose v]\ngo to x: (0) y: (0)\nshow\n\nwhen I receive [nextright v]\nnext costume\n\nwhen I receive [front v]\nhide\n\nwhen flag clicked\nforever\n    if <touching color (#99ffff)?> then\n        go to x: (-183) y: (-100)\n        change [score v] by (1)\n    end\nend\n\nwhen I receive [nextleft v]\nif <(costume [number v]) = [1]> then\n    switch costume to (costume5 v)\nend\nif <(costume [number v]) = [2]> then\n    switch costume to (costume1 v)\nend\nif <(costume [number v]) = [3]> then\n    switch costume to (costume2 v)\nend\nif <(costume [number v]) = [4]> then\n    switch costume to (costume3 v)\nend\nif <(costume [number v]) = [5]> then\n    switch costume to (costume4 v)\nend\n\nwhen backdrop switches to [backdrop21 v]\nhide\nset [gamerunning v] to [0]\nstop [other scripts in sprite v]\n\nwhen I receive [playmessage v]\nset [gamerunning v] to [1]\nshow\ngo to x: (-183) y: (-100)\nset [xv v] to [0]\nset [yv v] to [0]\nforever\n    if <key (right arrow v) pressed?> then\n        change [xv v] by (1)\n    end\n    if <key (left arrow v) pressed?> 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 color (#000000)?> then\n        change y by (1)\n        if <touching color (#000000)?> then\n            change y by (1)\n            if <touching color (#000000)?> then\n                change y by (1)\n                if <touching color (#000000)?> then\n                    change y by (1)\n                    if <touching color (#000000)?> then\n                        change y by (1)\n                        if <touching color (#000000)?> then\n                            change x by ((Xv) * (-1))\n                            change y by (-5)\n                            if <key (up arrow v) pressed?> then\n                                if <(Xv) > [0]> then\n                                    set [xv v] to [-5]\n                                else\n                                    set [xv v] to [5]\n                                end\n                                set [yv v] to [10]\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 color (#000000)?> then\n        change y by ((Yv) * (-1))\n        set [yv v] to [0]\n    end\n    change y by (-1)\n    if <touching color (#000000)?> then\n        if <key (up arrow v) pressed?> then\n            set [yv v] to [15]\n        end\n    end\n    change y by (1)\nend\n\nwhen I receive [skipped v]\ngo to x: (-183) y: (-100)\n\n@Sprite2\n\nwhen backdrop switches to [front v]\nshow\n\nwhen backdrop switches to [backdrop21 v]\nhide\n\n@Sprite3\n\nwhen backdrop switches to [front v]\nshow\n\nwhen backdrop switches to [backdrop21 v]\nhide\n\n@Sprite4\n\nwhen this sprite clicked\nbroadcast (PlayMessage v)\nhide\nnext backdrop\n\nwhen I receive [choose v]\nhide\n\nwhen I receive [front v]\nset size to (100) %\nshow\nset [ghost v] effect to (100)\nrepeat (20)\n    change [ghost v] effect by (-4)\nend\nforever\n    if <touching (mouse-pointer v)?> then\n        set size to (95) %\n        set [ghost v] effect to (60)\n    else\n        set size to (100) %\n        set [ghost v] effect to (0)\n    end\nend\n\nwhen flag clicked\nset size to (100) %\nshow\nset [ghost v] effect to (100)\nrepeat (20)\n    change [ghost v] effect by (-4)\nend\nforever\n    if <touching (mouse-pointer v)?> then\n        set size to (95) %\n        set [ghost v] effect to (60)\n    else\n        set size to (100) %\n        set [ghost v] effect to (0)\n    end\nend\n\n@Sprite5\n\nwhen flag clicked\nset size to (100) %\nshow\nset [ghost v] effect to (100)\nwait (0.5) seconds\nrepeat (20)\n    change [ghost v] effect by (-4)\nend\nforever\n    if <touching (mouse-pointer v)?> then\n        set size to (95) %\n        set [ghost v] effect to (60)\n    else\n        set size to (100) %\n        set [ghost v] effect to (0)\n    end\nend\n\nwhen this sprite clicked\nbroadcast (Choose v)\nhide\n\nwhen I receive [playmessage v]\nhide\n\nwhen I receive [front v]\nset size to (100) %\nshow\nset [ghost v] effect to (100)\nrepeat (20)\n    change [ghost v] effect by (-4)\nend\nforever\n    if <touching (mouse-pointer v)?> then\n        set size to (95) %\n        set [ghost v] effect to (60)\n    else\n        set size to (100) %\n        set [ghost v] effect to (0)\n    end\nend\n\n@Sprite7\n\nwhen flag clicked\nhide\ngo to x: (-61) y: (-5)\n\nwhen I receive [choose v]\nshow\nforever\n    glide (0.5) secs to x: (-61) y: (1)\n    glide (0.5) secs to x: (-61) y: (-8)\nend\n\nwhen this sprite clicked\nbroadcast (NextLeft v)\n\nwhen I receive [front v]\nhide\n\n@Sprite6\n\nwhen flag clicked\nhide\ngo to x: (64) y: (-5)\n\nwhen I receive [choose v]\nshow\nforever\n    glide (0.5) secs to x: (62) y: (-2)\n    glide (0.5) secs to x: (62) y: (-12)\nend\n\nwhen this sprite clicked\nbroadcast (NextRight v)\n\nwhen I receive [front v]\nhide\n\n@Sprite8\n\nwhen flag clicked\nhide\n\nwhen I receive [choose v]\nshow\nforever\n    if <touching (mouse-pointer v)?> then\n        switch costume to (costume2 v)\n    else\n        switch costume to (costume1 v)\n    end\nend\n\nwhen this sprite clicked\nswitch backdrop to (front v)\nbroadcast (Front v)\n\nwhen I receive [front v]\nhide\n\n@Sprite9\n\nwhen flag clicked\nhide\n\nwhen I receive [congrats v]\nset size to (100) %\nshow\nset [ghost v] effect to (100)\nrepeat (20)\n    change [ghost v] effect by (-4)\nend\nforever\n    if <touching (mouse-pointer v)?> then\n        set size to (95) %\n        set [ghost v] effect to (60)\n    else\n        set size to (100) %\n        set [ghost v] effect to (0)\n    end\nend\n\nwhen this sprite clicked\nswitch backdrop to (backdrop22 v)\nhide\n\nwhen backdrop switches to [backdrop22 v]\n\n@Sprite10\n\nwhen flag clicked\nhide\n\nwhen backdrop switches to [backdrop22 v]\nshow\n\nwhen this sprite clicked\nhide\nhide list [all time winners v]\nhide variable [score v]\nhide variable [level v]\nswitch backdrop to (backdrop23 v)\n\n
Welcome to Water, my first ever platformer!\n*DO NOT USE FULL SCREEN (it lags)*\nAfter you arrive at this page, reload once to get rid of glitches.\n\nThis project was started when I found out about California (USA) 's drought to raise water usage awareness.\nFinished April 24, 2018.\n\nInstructions:\nPlay: start the game\nChoose: Customize your character\n\nGoal: to waste as little water as possible (a unit of water is wasted each time you touch water)\nHow to Play: just like a normal platformer, use the arrow keys to get to the other side of the screen. Do not touch the blue (wastes water), you can go on black. You have one skip. Press S to use your skip.