Infinity Platformer |Pytkamen Cup|
@Stage\n\nwhen flag clicked\nforever\n    play sound [Odesong v] until done\nend\n\nwhen flag clicked\nforever\n    set [pitch v] effect to ((level) / (2))\nend\n\nwhen I receive [stop v]\nstop [other scripts in sprite v]\nstart sound [Odesong v]\nrepeat (100)\n    change [pitch v] effect by (-2)\nend\nstop all sounds\nstop [all v]\n\n@to coś co wszystko zasłania\n\nwhen flag clicked\nhide\nswitch costume to (czarne v)\n\nwhen I receive [stop v]\ngo to [front v] layer\ngo to x: (0) y: (0)\nshow\nset [ghost v] effect to (100)\nrepeat (20)\n    change [ghost v] effect by (-5)\nend\nclear graphic effects\n\nwhen flag clicked\nforever\n    reset timer\nend\n\nwhen [timer v] > (1)\nswitch costume to (miniatura2 v)\nshow\nclear graphic effects\n\n@player\n\ndefine physics <left> <right> <jump> g (g) Ax (ax) Ay (ay) Cf (cf) Smax (smax)\nchange [vy v] by (g)\nchange [py v] by (Vy)\nchange y by (Vy)\nif <touching color (#ffffff)?> then\n    repeat until <not <touching color (#ffffff)?>>\n        change y by ((g) * ((Vy) / ([abs v] of (Vy) )))\n        change [py v] by ((g) * ((Vy) / ([abs v] of (Vy) )))\n    end\n    set [vy v] to ((ay) * <<jump> and <((Vy) / ([abs v] of (Vy) )) = [-1]>>)\nend\nchange [vx v] by ((ax) * (<right> - <left>))\nset [vx v] to ((Vx) * (cf))\nchange x by (Vx)\nset [slope v] to [0]\nrepeat until <<(slope) = (smax)> or <not <touching color (#ffffff)?>>>\n    change y by (1)\n    change [slope v] by (1)\nend\nif <touching color (#ffffff)?> then\n    repeat until <not <touching color (#ffffff)?>>\n        change x by ((-1) * ((Vx) / ([abs v] of (Vx) )))\n    end\nend\nchange [px v] by ((0) - (y position))\nset y to ((Py) - (Y))\n\nwhen flag clicked\nstop [other scripts in sprite v]\ngo to [front v] layer\ngo [backward v] (1) layers\nshow\nclear graphic effects\nset [px v] to [0]\nset [py v] to [120]\nset [vx v] to [0]\nset [vy v] to [0]\ngo to x: (0) y: (120)\nwait (0.1) seconds\nforever\n    if <(y position) > [-160]> then\n        physics <<<key (left arrow v) pressed?> or <key (a v) pressed?>> or <<mouse down?> and <((x position) - (20)) > (mouse x)>>> <<<key (right arrow v) pressed?> or <key (d v) pressed?>> or <<mouse down?> and <(mouse x) > ((x position) + (20))>>> <<<key (up arrow v) pressed?> or <key (w v) pressed?>> or <<mouse down?> and <(mouse y) > [20]>>> g [-1] Ax [4] Ay [13] Cf [0.6] Smax [2]\n    else\n        broadcast (stop v)\n        stop [this script v]\n    end\nend\n\nwhen I receive [stop v]\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nhide\n\n@level\n\nwhen flag clicked\ngo to x: (0) y: (0)\nhide\ngo to [back v] layer\nset [y v] to [0]\nset [data v] to (pick random (41) to (49))\nset [clone# v] to [0]\nrepeat (6)\n    create clone of (_myself_ v)\n    change [clone# v] by (1)\nend\nforever\n    set [level v] to ([floor v] of ((Y) / (60)) )\n    if <((level) + (2)) > (length of (data))> then\n        repeat until <not <(clone#) = (letter (length of (data)) of (data))>>\n            set [clone# v] to (pick random (1) to (9))\n        end\n        set [data v] to (join (data) (clone#))\n    end\n    change [y v] by ((1) + (((level) / (100)) + (((([y position v] of [player v]) + (100)) * (([y position v] of [player v]) + (100))) / (20000))))\nend\n\nwhen I start as a clone\nforever\n    set y to (((60) * (((level) + (3)) - (clone#))) - (Y))\n    switch costume to ((1) + (letter (((level) + (2)) - (clone#)) of (data)))\n    show\nend\n\nwhen I receive [stop v]\nstop [other scripts in sprite v]\ndelete this clone\n\n@tło\n\ndefine render (n)\nerase all\nset pen (brightness v) to (50)\nset pen size to ((n) / (3))\ngo to x: ((-240) + ((n) / (2))) y: ((-180) + (((Y) + (y position)) mod (n)))\nrepeat ((360) / (n))\n    set x to ((-240) + ((n) / (2)))\n    repeat ((480) / (n))\n        set pen (color v) to (((60) * ((round ((x position) / (50))) mod (2))) + ((40) * ((round (((Y) + (y position)) / (50))) mod (2))))\n        pen down\n        pen up\n        change x by (n)\n    end\n    change y by (n)\nend\n\nwhen flag clicked\nset [n v] to [5]\nforever\n    wait (0.5) seconds\n    set [fps v] to (count)\n    set [count v] to [0]\n    if <(fps) < [15]> then\n        change [n v] by (1)\n    end\nend\n\nwhen flag clicked\nforever\n    change [count v] by (1)\n    render (n)\nend\n\nwhen flag clicked\nrepeat (5)\n    wait (1) seconds\n    if <[1] < (n)> then\n        change [n v] by (-1)\n    end\nend\n\n
Sterowanie - strzałkami lub myszką/palcem\n\nCel - dojść jak najwyżej i nie zginąć :)