lukastaniak scroling platformer część 2
@Stage\n\nwhen I receive [start v]\nswitch backdrop to (lawa v)\n\nwhen I receive [die v]\nswitch backdrop to (die v)\nstop [all v]\n\nwhen flag clicked\nforever\n    play sound [Mystery v] until done\nend\n\nwhen I receive [win v]\nswitch backdrop to (win v)\nstop [all v]\n\n@Platform\n\nwhen flag clicked\nforever\n    hide\nend\n\nwhen I receive [start v]\nforever\n    if <(Sounds) = [0]> then\n        set volume to (50) %\n    else\n        set volume to (0) %\n    end\nend\n\nwhen I receive [win v]\nhide\nstop [other scripts in sprite v]\ndelete this clone\n\nwhen I receive [tick v]\nPosition ((x) - (Scroll x)) ((y) - (Scroll y))\n\ndefine Position (x) (y)\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\nelse\n    hide\nend\n\ndefine Clone at x: (x) y: (y)\ncreate clone of (_myself_ v)\nnext costume\nchange [x v] by (x)\nchange [y v] by (y)\n\nwhen I receive [setup v]\nhide\nswitch costume to (1 v)\nset [x v] to [0]\nset [y v] to [0]\nClone at x: [360] y: [0]\nClone at x: [360] y: [0]\nClone at x: [360] y: [0]\nClone at x: [360] y: [0]\nClone at x: [360] y: [0]\nClone at x: [360] y: [0]\nClone at x: [360] y: [0]\nClone at x: [360] y: [0]\nClone at x: [360] y: [0]\nClone at x: [360] y: [0]\nClone at x: [360] y: [0]\nClone at x: [360] y: [0]\nClone at x: [360] y: [0]\nClone at x: [360] y: [0]\nClone at x: [360] y: [0]\nClone at x: [360] y: [0]\nClone at x: [360] y: [0]\nClone at x: [360] y: [0]\n\nwhen I receive [reset v]\ndelete this clone\n\n@notif\n\nwhen flag clicked\ngo to x: (0) y: (50)\nhide\nwait (pick random (8) to (15)) seconds\nshow\nrepeat until <(y position) < [6]>\n    change y by (((5) - (y position)) / (6))\nend\nwait (3.5) seconds\nrepeat until <(y position) > [49.5]>\n    change y by (((y position) + (5)) / (5))\nend\nhide\nforever\n    wait (pick random (14) to (26)) seconds\n    show\n    repeat until <(y position) < [6]>\n        change y by (((5) - (y position)) / (6))\n    end\n    wait (3.5) seconds\n    repeat until <(y position) > [49.5]>\n        change y by (((y position) + (5)) / (5))\n    end\n    hide\nend\n\nwhen I receive [tick v]\ngo to [front v] layer\n\n@END\n\nwhen flag clicked\nforever\n    hide\nend\n\nwhen I receive [start v]\nforever\n    if <(Sounds) = [0]> then\n        set volume to (50) %\n    else\n        set volume to (0) %\n    end\nend\n\nwhen I receive [win v]\nhide\nstop [other scripts in sprite v]\ndelete this clone\n\nwhen I receive [tick v]\nPosition ((x) - (Scroll x)) ((y) - (Scroll y))\n\ndefine Position (x) (y)\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\nelse\n    hide\nend\n\ndefine Clone at x: (x) y: (y)\ncreate clone of (_myself_ v)\nnext costume\nchange [x v] by (x)\nchange [y v] by (y)\n\nwhen I receive [setup v]\nhide\nswitch costume to (1 v)\nset [x v] to [0]\nset [y v] to [0]\nClone at x: [360] y: [0]\nClone at x: [360] y: [0]\nClone at x: [360] y: [0]\nClone at x: [360] y: [0]\nClone at x: [360] y: [0]\nClone at x: [360] y: [0]\nClone at x: [360] y: [0]\nClone at x: [360] y: [0]\nClone at x: [360] y: [0]\nClone at x: [360] y: [0]\nClone at x: [360] y: [0]\nClone at x: [360] y: [0]\nClone at x: [360] y: [0]\nClone at x: [360] y: [0]\nClone at x: [360] y: [0]\nClone at x: [360] y: [0]\nClone at x: [360] y: [0]\nClone at x: [360] y: [0]\n\nwhen I receive [reset v]\ndelete this clone\n\n@Player2\n\ndefine Set Costume\nif <(falling?) < [6]> then\n    if <(frame) = [0]> then\n        switch costume to (stojanisko2 v)\n    else\n        switch costume to ([floor v] of ((4) + ((frame) mod (6))) )\n    end\nelse\n    if <(speed y) > [0]> then\n        switch costume to (skakańsko v)\n    else\n        switch costume to (spadańsko 2 v)\n    end\nend\n\nwhen I receive [play v]\nshow\nforever\n    Griffpatch Platforming Engine [5]\nend\n\ndefine Touch Ground <up?>\nchange [falling? v] by (1)\nrepeat until <not <touching (platform v)?>>\n    if <up?> then\n        change y by (-1)\n    else\n        change y by (1)\n        set [falling? v] to [0]\n    end\n    set [speed y v] to [0]\nend\n\ndefine Walk (direction) (speed)\npoint in direction (direction)\nchange x by (speed)\nset [slope v] to [0]\nrepeat until <<(slope) = [8]> or <not <touching (level hitbox v)?>>>\n    change y by (1)\n    change [slope v] by (1)\nend\nif <(slope) = [8]> then\n    change x by ((0) - (speed))\n    change y by ((0) - (slope))\nend\nchange [frame v] by (0.5)\n\ndefine Griffpatch Platforming Engine (speed)\nswitch costume to (hitbox v)\nif <<(speed y) < [4]> or <<key (w v) pressed?> or <key (up arrow v) pressed?>>> then\n    change [speed y v] by (-1)\nelse\n    change [speed y v] by (-2)\nend\nchange y by (speed y)\nTouch Ground <(speed y) > [0]>\nif <<key (a v) pressed?> or <key (left arrow v) pressed?>> then\n    Walk (-90) ((speed) * (-1))\n    start sound [Running Footsteps Sound Effects All Sounds5 v]\nelse\n    if <<key (d v) pressed?> or <key (right arrow v) pressed?>> then\n        Walk (90) (speed)\n        start sound [Running Footsteps Sound Effects All Sounds5 v]\n    else\n        set [frame v] to [0]\n    end\nend\nif <<key (w v) pressed?> or <key (up arrow v) pressed?>> then\n    if <<(jump key) = [0]> and <(falling?) < [3]>> then\n        start sound [recording1 v]\n        set [speed y v] to [14]\n        set [falling? v] to [6]\n        set [jump key v] to [1]\n    end\nelse\n    set [jump key v] to [0]\nend\nif <<(y position) < [-180]> or <touching color (#000000)?>> then\n    start sound [fall v]\n    go to x: (0) y: (0)\n    point in direction (90)\n    set [scrollx v] to [0]\n    set [speed y v] to [0]\n    wait (1) seconds\n    stop [all v]\nend\nSet Costume\nScrolling Blocks\n\ndefine Reset Player\nshow\nset size to (40) %\nset rotation style [left-right v]\npoint in direction (90)\ngo to x: (0) y: (100)\nset [speed y v] to [0]\nset [falling? v] to [10]\nset [scrollx v] to [0]\nhide\n\ndefine Scrolling Blocks\nchange [scrollx v] by (x position)\nset x to (0)\n\nwhen flag clicked\nbroadcast (Transition In v) and wait\nbroadcast (Delete All Clones v) and wait\nbroadcast (SetUp v) and wait\nbroadcast (Level Loop v)\nbroadcast (Play v)\nbroadcast (Transition Out v) and wait\nbroadcast (Setup v)\nbroadcast (zxxxxxxxxx v)\nbroadcast (Start v)\nthink [Hmm...] for (2) seconds\nsay [jakaś bariaera] for (2) seconds\nsay [niewidzialna staranuj ją biegnij na nią skacz it tym podobne] for (5) seconds\nsay [ruszasz się strzałkami] for (2) seconds\nsay [udało się] for (2) seconds\nsay [teraz jak zginiemy to się nie odrodzimy więc uważaj] for (2) seconds\nsay [nie dotykaj czarnego] for (2) seconds\nsay [nadal badam sprawę hejtera] for (2) seconds\nsay [w droge!] for (2) seconds\n\nwhen I receive [setup v]\nReset Player\n\ndefine Quick Scroll\nif <key (right arrow v) pressed?> then\n    change [scrollx v] by (100)\nend\nif <key (left arrow v) pressed?> then\n    change [scrollx v] by (-100)\nend\n\nQuick Scroll\n\nplay sound [Running Footsteps Sound Effects All Sounds5 v] until done\n\nplay sound [recording1 v] until done\n\nplay sound [recording1 v] until done\n\nstart sound [Running Footsteps Sound Effects All Sounds5 v]\n\nplay sound [Running Footsteps Sound Effects All Sounds5 v] until done\n\nplay sound [Running Footsteps Sound Effects All Sounds5 v] until done\n\nwhen flag clicked\nforever\n    show\nend\n\nif  then\n    start sound [fall v]\n    go to x: (0) y: (0)\n    point in direction (90)\n    set [scrollx v] to [0]\n    set [speed y v] to [0]\n    stop [all v]\nend\n\nwhen flag clicked\n\nsay [ciapek wreszcie] for (2) seconds\nsay [co si stało?] for (2) seconds\nsay [co porwał cię hejter] for (2) seconds\nsay [rozprawię się z nim] for (2) seconds\nsay [ciąg dalszy nastąpi] for (2) seconds\n\nwhen [space v] key pressed\nforever\n    say [ty : CO się stało] for (2) seconds\n    say [pytka : adawin został porwany] for (2) seconds\n    say [ty : jak] for (2) seconds\n    say [ pytka :faceci z fabryki ciasta drożdżowego go wzieli nie udałoo mi się ich powstrzymać] for (5) seconds\n    say [ty : idziemy go uratwać] for (2) seconds\n    stop [all v]\nend\n\n@ustawienia\n\ndefine Game On\nset [x v] to (Checkpoint x)\nset [y v] to (Checkpoint y)\nset [sx v] to [0]\nset [sy v] to [0]\nset [in air v] to [0]\nset [finish v] to []\nset [scroll x v] to [0]\nset [scroll y v] to [0]\npoint in direction (90)\nshow\n\ndefine Tick\nswitch costume to (hitbox v)\nif <not <key (any v) pressed?>> then\n    switch costume to (hitbox v)\nend\nif <<<key (a v) pressed?> or <key (left arrow v) pressed?>> or <<(mouse x) < (x position)> and <mouse down?>>> then\n    point in direction (-90)\n    change [sx v] by (-1.75)\nend\nif <<<key (d v) pressed?> or <key (right arrow v) pressed?>> or <<(mouse x) > (x position)> and <mouse down?>>> then\n    point in direction (90)\n    change [sx v] by (1.75)\nend\nset [sx v] to ((sx) * (0.8))\nif <([abs v] of (sx) ) > [0.9]> then\n    Change Player x by (round (sx))\nend\nif <<<key (w v) pressed?> or <key (up arrow v) pressed?>> or <<(mouse y) > (y position)> and <mouse down?>>> then\n    if <(in air) < [4]> then\n        set [sy v] to [16]\n    end\nend\nif <(sy) > [-20]> then\n    change [sy v] by (-2)\nend\nChange Player y by (sy)\nDie\nset [scroll x v] to (x)\nchange [scroll x v] by (round (((x) - (Scroll x)) / (10)))\nif <(Scroll x) < [0]> then\n    set [scroll x v] to [0]\nend\nchange [scroll y v] by (round (((y) - (Scroll y)) / (10)))\nif <(Scroll y) < [0]> then\n    set [scroll y v] to [0]\nend\nPosition\nswitch costume to (stand v)\n\nwhen I receive [green flag v]\nhide\ngo to [front v] layer\n\nwhen I receive [play game v]\nforever\n    broadcast (Reset v) and wait\n    broadcast (Setup v) and wait\n    Game On\n    repeat until <(Finish) > []>\n        Tick\n        Position\n        broadcast (Tick v)\n    end\n    if <(Finish) = [Yes]> then\n        Game Con\n    else\n        Game End\n    end\nend\n\ndefine Change Player y by (sy)\nchange [y v] by (sy)\nchange [in air v] by (1)\nPosition\nrepeat until <not <touching (platform v)?>>\n    if <(sy) > [0]> then\n        change [y v] by (-1)\n    else\n        change [y v] by (1)\n        set [in air v] to [0]\n    end\n    Position\n    set [sy v] to [0]\nend\n\ndefine Position\ngo to x: ((x) - (Scroll x)) y: ((y) - (Scroll y))\n\ndefine Change Player x by (sx)\nchange [x v] by (sx)\nPosition\nif <touching (platform v)?> then\n    repeat (12)\n        change [y v] by (1)\n        Position\n        if <not <touching (platform v)?>> then\n            stop [this script v]\n        end\n    end\n    change [y v] by (-12)\n    if <<<key (w v) pressed?> or <key (up arrow v) pressed?>> or <<(mouse y) > (y position)> and <mouse down?>>> then\n        if <(sx) > [0]> then\n            set [sx v] to [-15]\n        else\n            set [sx v] to [15]\n        end\n        set [in air v] to [0]\n    else\n        set [sx v] to [0]\n    end\n    repeat until <not <touching (platform v)?>>\n        if <(sx) > [0]> then\n            change [x v] by (-1)\n        else\n            change [x v] by (1)\n        end\n        Position\n    end\nend\n\ndefine Game End\nrepeat (2)\n    hide\n    wait (0.05) seconds\n    show\n    wait (0.05) seconds\nend\nhide\n\ndefine Die\nif <<touching (danger v)?> or <touching (spikes v)?>> then\n    set [finish v] to [Die]\nend\n\ndefine Game Con\nbroadcast (Win v)\n\nwhen I receive [bounce v]\nif <touching (enemy v)?> then\n    set [sy v] to [18]\nend\n\nwhen I receive [win v]\nhide\nstop [other scripts in sprite v]\ndelete this clone\n\nwhen I receive [start v]\nbroadcast (DeleteClone v) and wait\nbroadcast (CreateClone v) and wait\n\nwhen flag clicked\nset [time v] to [0]\nbroadcast (Start v)\nbroadcast (Green Flag v) and wait\nbroadcast (Play Game v) and wait\nset [checkpoint x v] to [-199]\nset [checkpoint y v] to [-118]\nset size to (50) %\nshow\n\nwhen flag clicked\nforever\n    if <touching (platform2 v)?> then\n        broadcast (Die v)\n    end\n    if <touching (end v)?> then\n        broadcast (WIN v)\n        if <(TIME) < [50]> then\n        end\n    end\nend\n\nwhen I receive [start v]\nset size to (50) %\nforever\n    hide\nend\n\nshow\n\nwhen flag clicked\nforever\n    wait (0.1) seconds\n    change [time v] by (0.1)\nend\n\n@pick\n\nwhen I receive [play v]\nwait (1) seconds\nshow\n\nwhen flag clicked\nshow\nforever\n    go to (player2 v)\n    point in direction ([x position v] of [player2 v])\nend\n\n
druga część! aby pokonać nie widzialną barierę na początku po prostu chodź i skacz do oporu.\n Ruch - strzałki, lub W, A, S,d  \nNie dotykaj koloru czarnego\n20 gwiazd  i serc następna część\npodpowiedź ciapek może dotykać czarny kolor\n\n\nsecond part! to overcome the invisible barrier at the beginning, just walk and jump until it stops.\n Movement - arrows, or W, A, S, d\nDon't touch the black color\n20 stars and hearts next part\nThe hint of ciapek may touch the black color\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nlove,\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nfav\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nand follow!!! \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nComment ,,Lavalands'' if you read it