Winter (platformer)
@Stage\n\nwhen flag clicked\nswitch backdrop to (tausta1 v)\nwait until <(level) = [23]>\nswitch backdrop to (tausta3 v)\n\nwhen flag clicked\nforever\n    play sound [Xylo2 v] until done\nend\n\nplay sound [Dubstep v] until done\n\n@Crystal\n\nwhen flag clicked\nshow\ngo to x: (210) y: (-100)\nwait until <(level) = [12]>\ngo to x: (200) y: (85)\nwait until <(level) = [13]>\ngo to x: (210) y: (-100)\nwait until <(level) = [23]>\nhide\n\n@player\n\nwhen I start as a clone\nrepeat (40)\n    change [color v] effect by (23)\n    change [ghost v] effect by (5)\n    change size by (-2.5)\n    turn right (23) degrees\n    wait (0.05) seconds\nend\nwait (0.1) seconds\ndelete this clone\n\ndefine Move\nif <<key (left arrow v) pressed?> or <key (a v) pressed?>> then\n    change [xv v] by (-1)\nend\nif <<key (right arrow v) pressed?> or <key (d v) pressed?>> then\n    change [xv v] by (1)\nend\nset [xv v] to ((xv) * (0.85))\nchange x by (xv)\nif  then\n    change y by (-2)\n    if  then\n        change y by (1)\n        if  then\n            change y by (1)\n            if  then\n                change y by (1)\n                if  then\n                    change y by (1)\n                    if  then\n                        change y by (1)\n                        if  then\n                            change y by (-5)\n                            change x by ((-1) * (xv))\n                        end\n                        if <<<key (up arrow v) pressed?> or <key (w v) pressed?>> and <not <(xv) = [0]>>> then\n                            start sound [Jump v]\n                            set [mode v] to [walljump]\n                            set [yv v] to [8]\n                            set [xv v] to (((xv) / ([abs v] of (xv) )) * (-10))\n                        else\n                            set [mode v] to [wallslide]\n                            set [xv v] to [0]\n                        end\n                    end\n                end\n            end\n        end\n    end\n    change y by (2)\nend\nchange y by (-3)\nif <<touching (water v)?> or <touching (ground v)?>> then\n    if <(yv) = [-3]> then\n        if <<<key (left arrow v) pressed?> or <key (a v) pressed?>> or <<key (right arrow v) pressed?> or <key (d v) pressed?>>> then\n            set [mode v] to [run]\n        else\n            if <([abs v] of (xv) ) > [.1]> then\n                set [mode v] to [skid]\n            else\n                set [mode v] to [stand]\n            end\n        end\n    end\n    if <<key (up arrow v) pressed?> or <key (w v) pressed?>> then\n        start sound [Jump v]\n        set [mode v] to [jump]\n        set [yv v] to [8]\n        turn right (90) degrees\n    end\nend\nif <<<<(mode) = [jump]> or <(mode) = [walljump]>> and <(yv) < [0]>> or <<<(mode) = [run]> or <(mode) = [skid]>> and <(yv) < [-3]>>> then\n    set [mode v] to [fall]\nend\nchange y by (3)\nif <(yv) > [-15]> then\n    change [yv v] by (-0.5)\nend\nchange y by (-2)\nif <not <touching (ground v)?>> then\n    change y by (-1)\n    if <not <touching (ground v)?>> then\n        change y by (-1)\n        if <not <touching (ground v)?>> then\n            change y by (-1)\n            if <not <touching (ground v)?>> then\n                change y by (-1)\n                if <not <touching (ground v)?>> then\n                    change y by (-1)\n                    if <not <touching (ground v)?>> then\n                        change y by (5)\n                    end\n                end\n            end\n        end\n    end\nend\nif <<(y position) < [-170]> or <touching (death v)?>> then\n    broadcast (lose v)\n    start sound [Lose v]\n    repeat (95)\n        change [ghost v] effect by (1)\n    end\n    go to x: (-200) y: (-111)\n    set [ghost v] effect to (0)\n    change [deaths v] by (1)\n    set [xv v] to [0]\n    set [yv v] to [0]\nend\nif <touching (spoing v)?> then\n    set [yv v] to [12]\n    start sound [Bounce v]\nend\nchange y by (2)\nchange y by (yv)\nif <(y position) > [170]> then\n    set y to (170)\nend\nif <touching (ground v)?> then\n    change y by (-2)\n    if <touching (ground v)?> then\n        change y by ((-1) * (yv))\n        set [yv v] to [-3]\n    end\n    change y by (2)\nend\nif <touching (crystal v)?> then\n    go to x: (-230) y: (-118)\n    change [level v] by (1)\nend\nif <touching (ulottuvuus portti v)?> then\n    go to (ulottuvuus portti2 v)\nend\nif <key (space v) pressed?> then\n    set size to (50) %\nelse\n    set size to (100) %\nend\nif <touching (water v)?> then\n    if <<key (s v) pressed?> or <key (down arrow v) pressed?>> then\n        change [yv v] by (-0.5)\n    else\n        change [yv v] by (1)\n    end\nend\nif <touching (x move super v)?> then\n    set [xv v] to [40]\nend\n\nwhen flag clicked\nset [deaths v] to [0]\ngo to x: (-230) y: (0)\nset [level v] to [1]\nshow\nrepeat until <(level) = [11]>\n    Move\nend\nrepeat until <(level) = [13]>\n    move 2\nend\nforever\n    Move\nend\n\ndefine move 2\nif <<key (left arrow v) pressed?> or <key (a v) pressed?>> then\n    change [xv v] by (-1)\n    point in direction (-90)\nend\nif <<key (right arrow v) pressed?> or <key (d v) pressed?>> then\n    change [xv v] by (1)\nend\nset [xv v] to ((xv) * (0.85))\nchange x by (xv)\nif <touching (ground v)?> then\n    change y by (-2)\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 (-5)\n                            change x by ((-1) * (xv))\n                            if <<<key (up arrow v) pressed?> or <key (w v) pressed?>> and <not <(xv) = [0]>>> then\n                                start sound [Jump v]\n                                set [mode v] to [walljump]\n                                set [yv v] to [8]\n                                set [xv v] to [0]\n                            else\n                                set [mode v] to [wallslide]\n                                set [xv v] to [0]\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\n    change y by (2)\nend\nchange y by (-3)\nif <<touching (ground v)?> or <touching (water v)?>> then\n    if <(yv) = [-3]> then\n        if <<<key (left arrow v) pressed?> or <key (a v) pressed?>> or <<key (right arrow v) pressed?> or <key (d v) pressed?>>> then\n            set [mode v] to [run]\n        else\n            if <([abs v] of (xv) ) > [.1]> then\n                set [mode v] to [skid]\n            else\n                set [mode v] to [stand]\n            end\n        end\n    end\n    if <<key (up arrow v) pressed?> or <key (w v) pressed?>> then\n        start sound [Jump v]\n        set [mode v] to [jump]\n        if <not <touching (water v)?>> then\n            set [yv v] to [8]\n        else\n            set [yv v] to [6]\n        end\n    end\nend\nif <<<<(mode) = [jump]> or <(mode) = [walljump]>> and <(yv) < [0]>> or <<<(mode) = [run]> or <(mode) = [skid]>> and <(yv) < [-3]>>> then\n    set [mode v] to [fall]\nend\nchange y by (3)\nif <(yv) > [-15]> then\n    change [yv v] by (-0.5)\nend\nchange y by (-2)\nif <not <touching (ground v)?>> then\n    change y by (-1)\n    if <not <touching (ground v)?>> then\n        change y by (-1)\n        if <not <touching (ground v)?>> then\n            change y by (-1)\n            if <not <touching (ground v)?>> then\n                change y by (-1)\n                if <not <touching (ground v)?>> then\n                    change y by (-1)\n                    if <not <touching (ground v)?>> then\n                        change y by (5)\n                    end\n                end\n            end\n        end\n    end\nend\nif <<(y position) < [-170]> or <touching (death v)?>> then\n    broadcast (lose v)\n    start sound [Lose v]\n    change [deaths v] by (1)\n    go to x: (-200) y: (-111)\n    set [xv v] to [0]\n    set [yv v] to [0]\nend\nif <touching (spoing v)?> then\n    set [yv v] to [12]\n    start sound [Bounce v]\nend\nchange y by (2)\nchange y by (yv)\nif <(y position) > [160]> then\n    set y to (160)\nend\nif <touching (ground v)?> then\n    change y by (-2)\n    if <touching (ground v)?> then\n        change y by ((-1) * (yv))\n        set [yv v] to [-3]\n    end\n    change y by (2)\nend\nif <touching (crystal v)?> then\n    go to x: (-220) y: (-72)\n    change [level v] by (1)\nend\nif <touching (water v)?> then\n    set [yv v] to [-3]\nend\n\nwhen flag clicked\nwait (1) seconds\nrepeat until <(costume [number v]) = [3]>\n    if <not <<touching (water v)?> or <touching (ground v)?>>> then\n        repeat (10)\n            create clone of (_myself_ v)\n            wait (0.05) seconds\n        end\n    end\nend\n\ndefine move 3\nif <<key (left arrow v) pressed?> or <key (a v) pressed?>> then\n    change [xv v] by (-1)\n    point in direction (-90)\nend\nif <<key (right arrow v) pressed?> or <key (d v) pressed?>> then\n    change [xv v] by (1)\nend\nset [xv v] to ((xv) * (0.85))\nchange x by (xv)\nif <touching (ground v)?> then\n    change y by (-2)\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 (-5)\n                            change x by ((-1) * (xv))\n                            if <<<key (up arrow v) pressed?> or <key (w v) pressed?>> and <not <(xv) = [0]>>> then\n                                start sound [Jump v]\n                                set [mode v] to [walljump]\n                                set [yv v] to [8]\n                                set [xv v] to [0]\n                            else\n                                set [mode v] to [wallslide]\n                                set [xv v] to [0]\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\n    change y by (2)\nend\nchange y by (-3)\nif <<touching (ground v)?> or <touching (water v)?>> then\n    if <(yv) = [-3]> then\n        if <<<key (left arrow v) pressed?> or <key (a v) pressed?>> or <<key (right arrow v) pressed?> or <key (d v) pressed?>>> then\n            set [mode v] to [run]\n        else\n            if <([abs v] of (xv) ) > [.1]> then\n                set [mode v] to [skid]\n            else\n                set [mode v] to [stand]\n            end\n        end\n    end\n    if <<key (up arrow v) pressed?> or <key (w v) pressed?>> then\n        start sound [Jump v]\n        set [mode v] to [jump]\n        set [yv v] to [8]\n    end\nend\nif <<<<(mode) = [jump]> or <(mode) = [walljump]>> and <(yv) < [0]>> or <<<(mode) = [run]> or <(mode) = [skid]>> and <(yv) < [-3]>>> then\n    if <not <touching (water v)?>> then\n        set [mode v] to [fall]\n    end\nend\nchange y by (3)\nif <(yv) > [-15]> then\n    change [yv v] by (-0.5)\nend\nchange y by (-2)\nif <not <touching (ground v)?>> then\n    change y by (-1)\n    if <not <touching (ground v)?>> then\n        change y by (-1)\n        if <not <touching (ground v)?>> then\n            change y by (-1)\n            if <not <touching (ground v)?>> then\n                change y by (-1)\n                if <not <touching (ground v)?>> then\n                    change y by (-1)\n                    if <not <touching (ground v)?>> then\n                        change y by (5)\n                    end\n                end\n            end\n        end\n    end\nend\nif <<(y position) < [-170]> or <touching (death v)?>> then\n    broadcast (lose v)\n    start sound [Lose v]\n    change [deaths v] by (1)\n    go to x: (-200) y: (-111)\n    set [xv v] to [0]\n    set [yv v] to [0]\nend\nif <touching (spoing v)?> then\n    set [yv v] to [12]\n    start sound [Bounce v]\nend\nchange y by (2)\nchange y by (yv)\nif <(y position) > [160]> then\n    set y to (160)\nend\nif <touching (ground v)?> then\n    change y by (-2)\n    if <touching (ground v)?> then\n        change y by ((-1) * (yv))\n        set [yv v] to [-3]\n    end\n    change y by (2)\nend\nif <touching (crystal v)?> then\n    go to x: (-220) y: (-72)\n    change [level v] by (1)\nend\nif <touching (water v)?> then\n    if <<key (s v) pressed?> or <key (down arrow v) pressed?>> then\n        change [yv v] by (-0.5)\n    else\n        change [yv v] by (1)\n    end\nend\nif <touching (ulottuvuus portti v)?> then\n    go to (ulottuvuus portti2 v)\nend\nif <touching (water v)?> then\n    set [mode v] to [swim]\nend\nif <touching (x move super v)?> then\n    set [xv v] to [40]\nend\nif <<(costume [number v]) = [3]> and <key (space v) pressed?>> then\n    turn right (90) degrees\n    wait until <not <key (space v) pressed?>>\n    change x by (10)\n    turn left (90) degrees\nend\n\nwhen flag clicked\nset [time v] to [0]\nforever\n    wait (1) seconds\n    change [time v] by (1)\nend\n\nwhen flag clicked\nforever\n    set [swim time left v] to [16]\n    if <touching (water v)?> then\n        show variable [swim time left v]\n        repeat until <not <touching (water v)?>>\n            wait (1) seconds\n            change [swim time left v] by (-1)\n            if <(swim time left) = [0]> then\n                go to x: (-195) y: (-100)\n                change [deaths v] by (1)\n                set [swim time left v] to [20]\n            end\n        end\n    else\n        hide variable [swim time left v]\n    end\nend\n\nwhen flag clicked\nset [nuotti v] to [0]\nforever\n    repeat (90)\n        change [nuotti v] by (1)\n        wait (0.1) seconds\n    end\n    repeat (90)\n        change [nuotti v] by (-1)\n        wait (0.1) seconds\n    end\nend\n\nwhen flag clicked\nswitch costume to (asuste2 v)\nwait until <(level) = [10]>\nswitch costume to (asuste1 v)\nwait until <(level) = [20]>\nswitch costume to (asuste3 v)\nwait until <(level) = [23]>\nsay (join [deaths ] (Deaths)) for (2) seconds\nsay (join [time ] (Time)) for (2) seconds\n\nstop [other scripts in sprite v]\n\nwhen I receive [lose v]\n\nwhen I receive [dearh v]\nchange [deaths v] by (1)\ngo to x: (-200) y: (-111)\nset [xv v] to [0]\nset [yv v] to [0]\n\nmove 3\n\nif <touching (water v)?> then\n\n@ground\n\nwhen flag clicked\nshow\ngo to [back v] layer\nforever\n    switch costume to (level)\nend\n\nset [level v] to [22]\n\n@death\n\nwhen flag clicked\nshow\nforever\n    switch costume to (level)\nend\n\nwhen flag clicked\ngo to x: (38) y: (28)\nwait until <<(costume [name v]) = [10]> or <(costume [number v]) = [10]>>\nwait (10) seconds\nhide\nwait until <<(costume [name v]) = [11]> or <(costume [number v]) = [11]>>\nshow\nwait until <(level) = [21]>\nrepeat until <(level) = [22]>\n    repeat until <touching (_edge_ v)?>\n        change x by (5)\n    end\n    if on edge, bounce\n    point in direction (90)\n    repeat until <touching (_edge_ v)?>\n        change x by (-5)\n    end\n    if on edge, bounce\n    point in direction (90)\nend\ngo to x: (35) y: (28)\n\n@spoing\n\nwhen flag clicked\nforever\n    switch costume to (level)\nend\n\n@ulottuvuus portti\n\nwhen flag clicked\nhide\nwait until <(level) = [9]>\nshow\nwait until <(level) = [10]>\nhide\nwait until <(level) = [15]>\nhide\nshow\nwait until <(level) = [16]>\nhide\nwait until <(level) = [19]>\nshow\nwait until <(level) = [20]>\nhide\n\n@ulottuvuus portti2\n\nwhen flag clicked\nhide\nwait until <(level) = [9]>\nshow\nwait until <(level) = [10]>\nhide\nwait until <(level) = [15]>\nshow\nwait until <(level) = [16]>\nhide\nwait until <(level) = [19]>\nshow\nwait until <(level) = [20]>\nhide\n\n@water\n\nwhen flag clicked\nshow\ngo [backward v] (1) layers\ngo to [back v] layer\nforever\n    switch costume to (level)\nend\n\n@x move super\n\nwhen flag clicked\nforever\n    switch costume to (level)\nend\n\n@snow\n\nwhen flag clicked\nhide\nforever\n    create clone of (_myself_ v)\n    wait (pick random (0.01) to (0.2)) seconds\nend\n\nwhen I start as a clone\ngo to [back v] layer\ngo to x: (pick random (-220) to (220)) y: (y position)\nshow\nglide (pick random (5) to (10)) secs to x: (x position) y: (-170)\ndelete this clone\n\n@valo\n\nwhen I start as a clone\nshow\ngo to (player v)\npoint in direction (pick random (-180) to (180))\ngo to [back v] layer\nrepeat until <<(distance to [player v]) > [75]> or <touching (_edge_ v)?>>\n    set [color v] effect to (Color)\n    move (-5) steps\n    set [ghost v] effect to (distance to [player v])\nend\ndelete this clone\n\nwhen flag clicked\n\nwhen backdrop switches to [tausta3 v]\nshow\nforever\n    hide\n    create clone of (_myself_ v)\n    create clone of (_myself_ v)\n    create clone of (_myself_ v)\n    create clone of (_myself_ v)\n    create clone of (_myself_ v)\nend\n\n
Welcome the winter platformer.\nArrow keys or a,w,s,d to move.\nYou can wall jump. \nIf you want to be smaller press space.\nMore instructions are in game.\nMy best time is 115 and deaths 1 \nWhat about you?\n(Sorry, because I'm not so good in english.)\nIn level 16 is a bug. :( 