Aquatic - A Platformer Collab #all #games
@Stage\n\nwhen flag clicked\nforever\n    if <(Level) = [4]> then\n        switch backdrop to (backdrop2 v)\n    else\n        if <(Level) = [6]> then\n            switch backdrop to (backdrop3 v)\n        else\n            switch backdrop to (backdrop1 v)\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    play sound [bensound-summer v] until done\nend\n\n@Ground\n\nwhen I receive [message1 v]\nnext costume\n\nwhen flag clicked\ngo to [back v] layer\nswitch costume to (costume1 v)\nforever\n    set [level v] to (costume [number v])\nend\n\n@Player\n\ndefine Run Game\nchange [speed y v] by (-0.2)\nif <<<key (a v) pressed?> or <key (left arrow v) pressed?>> or <<mouse down?> and <(mouse x) < (x position)>>> then\n    change [speed x v] by (-2)\n    switch costume to (costume3 v)\nend\nif <<<key (right arrow v) pressed?> or <key (d v) pressed?>> or <<mouse down?> and <(x position) < (mouse x)>>> then\n    change [speed x v] by (2)\n    switch costume to (costume2 v)\nend\nset [speed x v] to ((Speed X) * (0.7))\nchange x by (Speed X)\nif <touching (ground v)?> then\n    change y by (1)\n    if <touching (ground v)?> then\n        change y by (1)\n        if <touching (ground v)?> then\n            change y by (1)\n            if <touching (ground v)?> then\n                change y by (1)\n                if <touching (ground v)?> then\n                    change y by (1)\n                    if <touching (ground v)?> then\n                        change y by (1)\n                        if <touching (ground v)?> then\n                            change y by (1)\n                            if <touching (ground v)?> then\n                                change y by (1)\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\nif <touching (ground v)?> then\n    change y by (-8)\n    repeat until <not <touching (ground v)?>>\n        change x by ((Speed X) * (-1))\n    end\n    if <<<key (w v) pressed?> or <key (up arrow v) pressed?>> or <<mouse down?> and <(y position) < (mouse y)>>> then\n        set [speed y v] to [4]\n        if <(Speed X) < [0]> then\n            set [speed x v] to [16]\n        else\n            set [speed x v] to [-16]\n        end\n    else\n        set [speed x v] to [0]\n    end\nend\nchange y by (Speed Y)\nif <touching (ground v)?> then\n    repeat until <not <touching (ground v)?>>\n        change y by ((Speed Y) * (-1))\n    end\n    set [speed y v] to [0]\nend\nchange y by (-1)\nif <<<<key (w v) pressed?> or <key (up arrow v) pressed?>> or <<mouse down?> and <(y position) < (mouse y)>>> and <touching (ground v)?>> then\n    set [speed y v] to [5]\nend\nchange y by (1)\nif <not <(Level) = [7]>> then\n    if <(x position) > [240]> then\n        go to x: (-213) y: (-28)\n        broadcast (message1 v)\n    end\nend\nif <(y position) < [-178]> then\n    broadcast (die v)\nend\nif <not <<<key (right arrow v) pressed?> or <key (left arrow v) pressed?>> or <key (up arrow v) pressed?>>> then\n    switch costume to (costume1 v)\nend\n\nwhen flag clicked\ngo to x: (-213) y: (-28)\nset [speed x v] to [0]\nset [speed y v] to [0]\nforever\n    Run Game\nend\n\nwhen I receive [die v]\ngo to x: (-213) y: (-28)\n\nwhen flag clicked\nforever\n    if <key (up arrow v) pressed?> then\n        switch costume to (costume4 v)\n    end\nend\n\nwhen flag clicked\nforever\n    if <(y position) < [-175]> then\n        broadcast (die v)\n    end\nend\n\n@Obstacles\n\nwhen flag clicked\ngo to [back v] layer\nforever\n    switch costume to (Level)\n    if <touching (player v)?> then\n        broadcast (die v)\n    end\nend\n\n@Sprite1\n\nwhen flag clicked\nhide\nforever\n    reset timer\nend\n\nwhen [timer v] > (0.001)\nshow\ngo to x: (0) y: (375)\nrepeat until <(y position) = [0]>\n    change y by (((y position) / (5)) * (-1))\nend\n\n@Sprite2\n\nwhen flag clicked\nwait (1) seconds\nset [treasure? v] to [0]\nforever\n    if <<(Level) = [7]> and <(Treasure?) = [0]>> then\n        show\n        if <<touching (player v)?> and <(Treasure?) = [0]>> then\n            set [treasure? v] to [1]\n            hide\n        end\n    else\n        hide\n    end\nend\n\n@Trail\n\nwhen flag clicked\nforever\n    go to [back v] layer\n    go to (player v)\nend\n\nwhen flag clicked\nforever\n    wait (pick random (0.3) to (0.4)) seconds\n    create clone of (_myself_ v)\nend\n\nwhen I start as a clone\nset size to (pick random (70) to (100)) %\nrepeat (100)\n    change y by (1)\n    change [ghost v] effect by (5)\nend\n\n