∘ °. Books! A platformer ♪. °


@Stage\n\n@Spikes\n\nwhen flag clicked\ngo to [back v] layer\nhide\n\nwhen I receive [done intro! ✔ v]\nshow\ngo to x: (0) y: (0)\nset [level v] to [1]\nforever\n    switch costume to (level)\nend\n\n@Player\n\nwhen flag clicked\nchange [veiwers v] by (1)\nhide variable [veiwers v]\n\nwhen flag clicked\nhide\n\ndefine Platformer engine\nchange [y v] by (-0.5)\nif <<key (left arrow v) pressed?> or <key (a v) pressed?>> then\n    change [x v] by (-0.8)\nend\nif <<key (right arrow v) pressed?> or <key (d v) pressed?>> then\n    change [x v] by (0.8)\nend\nset [x v] to ((X) * (0.9))\nchange x by (X)\nif <touching (platforms v)?> then\n    change y by (1)\n    if <touching (platforms v)?> then\n        change y by (1)\n        if <touching (platforms v)?> then\n            change y by (1)\n            if <touching (platforms v)?> then\n                change y by (1)\n                if <touching (platforms v)?> then\n                    change y by (1)\n                    if <touching (platforms v)?> then\n                        change y by (-6)\n                        change x by ((X) * (-1))\n                        if <<key (w v) pressed?> or <key (up arrow v) pressed?>> then\n                            set [y v] to [10]\n                            if <(X) > [0]> then\n                                set [x v] to [-10]\n                            else\n                                set [x v] to [10]\n                            end\n                        else\n                            set [x v] to [0]\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\nchange y by (Y)\nif <touching (platforms v)?> then\n    change y by ((Y) * (-1))\n    set [y v] to [0]\nend\nchange y by (-0.5)\nif <<touching (platforms v)?> and <<key (up arrow v) pressed?> or <key (w v) pressed?>>> then\n    set [y v] to [10]\nend\nchange y by (0.5)\nif <(x position) > [240]> then\n    change [level v] by (1)\n    go to x: (X spawn) y: (Y spawn)\n    change [☁ score v] by (1)\nend\nif <touching (trampoline v)?> then\n    set [y v] to [15]\nend\nif <[-195] > (y position)> then\n    go to x: (X spawn) y: (Y spawn)\nend\nif <touching (platforms v)?> then\n    go to x: (X spawn) y: (Y spawn)\nend\nif <touching (spikes v)?> then\n    go to x: (X spawn) y: (Y spawn)\nend\n\nwhen I receive [done intro! ✔ v]\nshow\n\nwhen I receive [done intro! ✔ v]\npoint in direction (90)\nset [☁ score v] to [0]\nset [x spawn v] to [-220]\nset [y spawn v] to [-75]\ngo to x: (X spawn) y: (Y spawn)\nshow\nset size to (50) %\nset [x v] to [0]\nset [y v] to [0]\nforever\n    Platformer engine\nend\n\n@platforms\n\nwhen I receive [done intro! ✔ v]\ngo to [front v] layer\ngo [backward v] (1) layers\nshow\ngo to x: (0) y: (0)\nset [level v] to [1]\nforever\n    switch costume to (level)\nend\n\nwhen flag clicked\nhide\n\n@Trampoline\n\nwhen flag clicked\nhide\n\nwhen I receive [done intro! ✔ v]\nshow\ngo to x: (0) y: (0)\nset [level v] to [1]\nforever\n    switch costume to (level)\nend\n\n@Sound Icon\n\nwhen this sprite clicked\nnext costume\nif <(costume [name v]) = [unmuted]> then\n    set volume to (100) %\nelse\n    set volume to (0) %\nend\n\nwhen I receive [done intro! ✔ v]\ngo to [front v] layer\ngo [forward v] (1) layers\nshow\ngo to x: (-210) y: (-155)\nswitch costume to (unmuted v)\nset volume to (100) %\n\n    play sound [Acoustic Breeze v] until done\nend\n\nwhen flag clicked\nhide\n\n@Duszek1\n\nwhen I receive [done intro! ✔ v]\ngo [forward v] (2) layers\nshow\ngo to x: (-25) y: (-140)\nset [level v] to [1]\n\nwhen flag clicked\nhide\n\nwhen this sprite clicked\nchange [level v] by (1)\n\nwhen flag clicked\nforever\n    go to [front v] layer\n    if <(level) = [11]> then\n        hide\n        stop [other scripts in sprite v]\n    end\nend\n\n@Green Flag\n\nwhen flag clicked\nhide\n\nwhen I receive [done intro! ✔ v]\nforever\n    if <([costume name v] of [platforms v]) = [11]> then\n        show\n        go to [front v] layer\n        go [backward v] (1) layers\n        go to x: (-30) y: (-15)\n        set size to (75) %\n        if <touching (player v)?> then\n            hide\n            broadcast (Done game v)\n            stop [this script v]\n        end\n    else\n        hide\n    end\nend\n\n@Done\n\nwhen flag clicked\nhide\n\nwhen I receive [done game v]\nshow\ngo to [front v] layer\ngo [forward v] (5) layers\n\n@Intro\n\nwhen flag clicked\nset [ghost v] effect to (0)\nshow\nwait (1) seconds\nrepeat (10)\n    change [ghost v] effect by (10)\n    go to [front v] layer\nend\nhide\nbroadcast (Done intro! ✔ v)\n\n@Thumbnail\n\nwhen [timer v] > (timer)\nswitch costume to (thumbnail v)\nset size to (100) %\nswitch costume to (thumbnail v)\nshow\ngo to [front v] layer\nrepeat until <(round (y position)) = [0]>\n    change y by (((0) - (y position)) / (5))\nend\nset y to (0)\n\nwhen flag clicked\nreset timer\nhide\nswitch costume to (thumbnail v)\nset size to (100) %\nswitch costume to (thumbnail v)\ngo to x: (0) y: (-480)\nforever\n    set [timer v] to ((timer) + (0.1))\nend\n\n