Tropical - A platformer #games #all

Instructions: Summer is coming in the year 2021!! And, this is my first platformer! It has 12 levels but they're possible without walljumps so I didn't add them :/ (Maybe I'll add them in my next platformer.)\nI also added a stopwatch so you can speedrun and maybe comment your time?\nPart 2 - Sunset Version: https://scratch.mit.edu/projects/549387205/\n=======================================\n~Story~\nYou are going to visit a place with your coconut-fueled car. But unfortunately your car is out of coconut oil!!! You decided to go on a quest to gather coconuts and make coconut oil for the car. Can you get all 12 coconuts and repair your coconut car??\n~Controls~\nA or left arrow → Move left\nD or right arrow → Move right\nW or up arrow → Jump or swim up faster\nS or down arrow → Swim down faster\nRed → Hot sand that will burn your feet!!!\nLight blue → Water, very cool, you'll like it there\n======================================\nThey're might be some bugs or other weird stuff. If there is, just tell me.\nBy the way, what are you planning to do for this summer? Lemme know in the comments!!\nPlease consider \nThanks so much for playing this project!! #EnjoyThisProject

@Stage\n\nwhen flag clicked\nplay sound [Sneaky adventure v] until done\n\nwhen I receive [start game v]\nset [level v] to [0]\nforever\n    play sound [Coconut Mall v] until done\nend\n\nwhen I receive [stop music v]\nstop [other scripts in sprite v]\n\n@Player\n\nwhen flag clicked\nhide\n\ndefine Platformer Physics (speed) (friction) (jump height)\nchange [y velocity v] by (-1)\nif <<key (right arrow v) pressed?> or <key (d v) pressed?>> then\n    change [x velocity v] by (speed)\nend\nif <<key (left arrow v) pressed?> or <key (a v) pressed?>> then\n    change [x velocity v] by ((speed) * (-1))\nend\nset [x velocity v] to ((X Velocity) * (friction))\nchange x by (X Velocity)\nif <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 (-8)\n                                    repeat until <not <touching (level v)?>>\n                                        change x by ((([abs v] of (X Velocity) ) / (X Velocity)) * (-1))\n                                    end\n                                    set [x velocity v] to [0]\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\nchange y by (Y Velocity)\nif <touching (level v)?> then\n    repeat until <not <touching (level v)?>>\n        change y by ((([abs v] of (Y Velocity) ) / (Y Velocity)) * (-1))\n    end\n    set [y velocity v] to [0]\nend\nchange y by (-1)\nif <<<key (up arrow v) pressed?> or <key (w v) pressed?>> and <touching (level v)?>> then\n    set [y velocity v] to (jump height)\nend\nchange y by (1)\n\nwhen I receive [go to next level v]\ngo to x: (-192) y: (-27)\n\nwhen flag clicked\nforever\n    if <touching (hot sand v)?> then\n        go to x: (-192) y: (-27)\n    end\nend\n\nwhen flag clicked\nforever\n    if <touching (water v)?> then\n        if <<key (up arrow v) pressed?> or <key (w v) pressed?>> then\n            set [y velocity v] to [5]\n        else\n            if <<key (down arrow v) pressed?> or <key (s v) pressed?>> then\n                set [y velocity v] to [-5]\n            else\n                set [y velocity v] to [-1]\n            end\n        end\n    end\nend\n\nwhen I receive [water appear v]\ngo to x: (-167) y: (116)\n\nwhen I receive [water tp 1 v]\ngo to x: (-211) y: (-107)\n\nwhen I receive [start game v]\nshow\nset size to (40) %\nset [x velocity v] to [0]\nset [y velocity v] to [0]\ngo to x: (-192) y: (-27)\nforever\n    Platformer Physics [1] [0.9] [15]\nend\n\nwhen I receive [in the car v]\nhide\n\n@Level\n\nwhen I receive [level change v]\nswitch costume to ((Level) + (1))\nbroadcast (Go to next level v)\n\nwhen flag clicked\nshow variable [time v]\nset [time v] to [0]\nswitch costume to (level 1 v)\nwait until <(costume [number v]) = [2]>\nbroadcast (Coconut TP 1 v)\nwait until <(costume [number v]) = [3]>\nbroadcast (Coconut TP 2 v)\nbroadcast (Hot sand appear v)\nwait until <(costume [number v]) = [4]>\nbroadcast (Coconut TP 3 v)\nbroadcast (Hot sand TP v)\nwait until <(costume [number v]) = [5]>\nbroadcast (Coconut TP 4 v)\nbroadcast (Hot sand hide v)\nbroadcast (Water appear v)\nwait until <(costume [number v]) = [6]>\ngo to x: (-1) y: (-33)\nbroadcast (Coconut TP 5 v)\nbroadcast (Hot sand appear again v)\nbroadcast (Water TP 1 v)\nwait until <(costume [number v]) = [7]>\nbroadcast (Coconut TP 6 v)\nbroadcast (Hot banana v)\nbroadcast (Water hide v)\nwait until <(costume [number v]) = [8]>\nbroadcast (Coconut TP 7 v)\nbroadcast (Change hot sand 1 v)\nwait until <(costume [number v]) = [9]>\nbroadcast (Change hot sand 2 v)\nbroadcast (Water appear again v)\nwait until <(costume [number v]) = [10]>\nbroadcast (Coconut TP 8 v)\nbroadcast (Change hot sand 3 v)\nbroadcast (Water TP 2 v)\nwait until <(costume [number v]) = [11]>\nbroadcast (Coconut TP 9 v)\nbroadcast (Water hide v)\nwait until <(costume [number v]) = [12]>\nbroadcast (Coconut TP 10 v)\nbroadcast (Change hot sand 2 v)\nbroadcast (Water appear 3 v)\nwait until <(costume [number v]) = [13]>\nbroadcast (Hide coconut v)\nbroadcast (Hot sand hide v)\nbroadcast (Water hide 2 v)\nbroadcast (Coconut car v)\n\nwhen I receive [start game v]\nwait (1) seconds\nforever\n    change [time v] by (1)\n    wait (1) seconds\nend\n\nwhen I receive [in the car v]\nstop [other scripts in sprite v]\n\n@Coconut\n\nwhen flag clicked\nforever\n    repeat (10)\n        change y by (1)\n        wait (0.1) seconds\n    end\n    repeat (10)\n        change y by (-1)\n        wait (0.1) seconds\n    end\nend\n\nwhen flag clicked\nforever\n    if <touching (player v)?> then\n        change [level v] by (1)\n        broadcast (Level Change v)\n    end\nend\n\nwhen I receive [coconut tp 1 v]\ngo to x: (9) y: (119)\n\nwhen flag clicked\nshow\ngo to [back v] layer\ngo to x: (190) y: (9)\n\nwhen I receive [coconut tp 2 v]\ngo to x: (167) y: (-14)\n\nwhen I receive [coconut tp 3 v]\ngo to x: (-169) y: (142)\n\nwhen I receive [coconut tp 4 v]\ngo to x: (197) y: (-120)\n\nwhen I receive [coconut tp 5 v]\ngo to x: (207) y: (150)\n\nwhen I receive [coconut tp 6 v]\ngo to x: (198) y: (-36)\n\nwhen I receive [coconut tp 7 v]\ngo to x: (198) y: (-38)\n\nwhen I receive [coconut tp 8 v]\ngo to x: (193) y: (26)\n\nwhen I receive [coconut tp 9 v]\ngo to x: (175) y: (135)\n\nwhen I receive [hide coconut v]\nhide\n\n@Hot sand\n\nwhen flag clicked\nhide\n\nwhen I receive [hot sand appear v]\nshow\nswitch costume to (hot sand v)\nset size to (40) %\ngo to x: (-6) y: (-104)\n\nwhen I receive [hot sand tp v]\nset size to (100) %\ngo to x: (66) y: (-119)\n\nwhen I receive [hot sand hide v]\nhide\n\nwhen I receive [hot sand appear again v]\nshow\nset size to (30) %\ngo to x: (182) y: (94)\n\nwhen I receive [hot banana v]\nswitch costume to (hot banana v)\nset size to (100) %\ngo to x: (70) y: (-2)\n\nwhen I receive [change hot sand 1 v]\nswitch costume to (hot sand 3 v)\n\nwhen I receive [change hot sand 2 v]\nswitch costume to (hot sand 4 v)\ngo to x: (9) y: (-60)\nforever\n    glide (2) secs to x: (9) y: (45)\n    glide (2) secs to x: (9) y: (-60)\nend\n\nwhen I receive [change hot sand 3 v]\nstop [other scripts in sprite v]\nswitch costume to (hot sand 5 v)\ngo to x: (11) y: (-10)\n\n@Water\n\nwhen flag clicked\ngo to [back v] layer\nhide\n\nwhen I receive [water appear v]\nshow\nswitch costume to (water v)\nset size to (100) %\ngo to x: (79) y: (10)\n\nwhen I receive [water tp 1 v]\nswitch costume to (water 2 v)\ngo to x: (-85) y: (26)\n\nwhen I receive [water hide v]\nhide\n\nwhen I receive [water appear again v]\nshow\nswitch costume to (water 3 v)\n\nwhen I receive [water tp 2 v]\nswitch costume to (water 4 v)\n\nwhen I receive [water appear 3 v]\nshow\nset size to (25) %\nrepeat (10)\n    create clone of (_myself_ v)\nend\nforever\n    glide (2) secs to (random position v)\nend\n\nwhen I start as a clone\nforever\n    glide (2) secs to (random position v)\nend\n\nwhen I receive [water hide 2 v]\nhide\n\n@Story board\n\nwhen flag clicked\nshow\nset [ghost v] effect to (0)\ngo to x: (0) y: (293)\nglide (2) secs to x: (0) y: (0)\n\nwhen I receive [hide board v]\nglide (2) secs to x: (0) y: (293)\nrepeat (4)\n    change [ghost v] effect by (25)\nend\nhide\nstop all sounds\nbroadcast (Start game v)\n\n@Story\n\nwhen flag clicked\nhide\nwait (3) seconds\nshow\nswitch costume to (story 1 v)\ngo to x: (0) y: (-32)\nwait (2) seconds\nstart sound [Nani v]\nswitch costume to (story 2 v)\nwait (3) seconds\nswitch costume to (story 3 v)\nwait (2) seconds\nbroadcast (Hide board v)\nhide\n\n@Coconut car\n\nwhen flag clicked\nhide\n\nwhen I receive [coconut car v]\nshow\nset [ghost v] effect to (0)\nswitch costume to (coconut car v)\nbroadcast (Stop music v)\ngo to x: (66) y: (-96)\nwait until <touching (player v)?>\nbroadcast (In the car v)\nswitch costume to (player in car v)\nwait (2) seconds\nstart sound [Nyoom v]\nglide (1) secs to x: (256) y: (-96)\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nhide\nwait (1) seconds\nbroadcast (Thanks for playing v)\n\n@Thanks for playing\n\nwhen flag clicked\nhide\n\nwhen I receive [thanks for playing v]\nshow\ngo to x: (0) y: (0)\nforever\n    repeat (10)\n        change size by (1)\n        wait (0.1) seconds\n    end\n    repeat (10)\n        change size by (-1)\n        wait (0.1) seconds\n    end\nend\n\nwhen I receive [thanks for playing v]\nforever\n    play sound [Bubblaine Music v] until done\nend\n\n@Thumbnail\n\nwhen flag clicked\nhide\n\n