Discovery || A Scientific Platformer
@Stage\n\n@PlayerMain\n\nwhen flag clicked\nhide\nset [xvel v] to [0]\nset [yvel v] to [0]\ngo to x: (-202) y: (0)\nforever\n    set drag mode [not draggable v]\nend\n\nwhen I start as a clone\nswitch costume to (playertrail v)\nrepeat (10)\n    change size by (-5)\n    change [ghost v] effect by (10)\nend\ndelete this clone\n\nwhen I receive [game v]\nshow\n\nwhen I receive [game v]\nforever\n    change [yvel v] by (-1)\n    change y by (yvel)\n    if <touching (levels v)?> then\n        change y by (() - (yvel))\n        set [yvel v] to [0]\n    end\n    change y by (-1)\n    if <touching (levels v)?> then\n        if <<key (up arrow v) pressed?> or <key (w v) pressed?>> then\n            set [yvel v] to [12]\n        end\n    end\n    change y by (1)\nend\n\nwhen I receive [game v]\nforever\n    change x by (xvel)\n    set rotation style [left-right v]\n    if <not <touching (levels v)?>> then\n        if <<key (right arrow v) pressed?> or <key (d v) pressed?>> then\n            change [xvel v] by (1)\n            point in direction (90)\n        end\n        if <<key (left arrow v) pressed?> or <key (a v) pressed?>> then\n            change [xvel v] by (-1)\n            point in direction (-90)\n        end\n    end\n    if <touching (levels v)?> then\n        change y by (1)\n        if <touching (levels v)?> then\n            if <<key (up arrow v) pressed?> or <key (w v) pressed?>> then\n                change x by (() - (xvel))\n                if <(xvel) > [0]> then\n                    set [xvel v] to [-7]\n                else\n                    set [xvel v] to [7]\n                end\n                set [yvel v] to [10]\n            else\n                change x by (() - (xvel))\n                if <(xvel) > [0]> then\n                    change x by (-1)\n                end\n                if <[0] > (xvel)> then\n                    change x by (1)\n                end\n                set [xvel v] to [0]\n            end\n        end\n    end\n    set [xvel v] to ((xvel) * (0.95))\nend\n\nwhen I receive [game v]\nforever\n    if <(x position) > [235]> then\n        set [xvel v] to [0]\n        set [yvel v] to [0]\n        go to x: (-202) y: (0)\n        broadcast (Level v)\n    end\n    create clone of (_myself_ v)\nend\n\nwhen I receive [game v]\nforever\n    if <not < ([costume name v] of [obstacles v]) contains [INFO]?>> then\n        if <touching (obstacles v)?> then\n            go to x: (-202) y: (0)\n        end\n    end\nend\n\nwhen [space v] key pressed\n\nif <touching color (#714700)?> then\n    broadcast (NOTE v)\nend\n\nwhen flag clicked\nforever\n    if <touching (trampoline v)?> then\n        set [yvel v] to [20]\n    end\nend\n\nif <not <(username) = [cards104171]>> then\n    change [☁ views v] by (1)\nend\n\n@Levels\n\nwhen I receive [level v]\nnext costume\n\nwhen flag clicked\nswitch costume to (1 v)\n\nwhen flag clicked\nset [level v] to [0]\nforever\n    if <(Level) = [5]> then\n        switch backdrop to (jungle v)\n    end\n    if <(Level) = [10]> then\n        switch backdrop to (water v)\n    end\nend\n\n@Text\n\ndefine Type (text)\nerase all\nset [letter? v] to [0]\ngo to x: (-225) y: (162)\nrepeat (length of (text))\n    change [letter? v] by (1)\n    switch costume to (letter (Letter?) of (text))\n    move (10) steps\n    if <(x position) > [205]> then\n        set x to (-225)\n        change y by (-15)\n    end\n    stamp\nend\n\nwhen I receive [level v]\nstop [other scripts in sprite v]\nerase all\nchange [level v] by (1)\nType (item (Level) of [dialogues v])\nif <(Level) = [14]> then\n    broadcast (End of Game v)\n    wait (3) seconds\n    Type [GAME OVER! YOU WIN! UNTIL WE NEED YOU      NEXT TIME...]\nend\nstop [this script v]\n\nwhen I receive [game v]\nset [space v] to [0]\nerase all\nset [level v] to [0]\nType [WELCOME TO DISCOVERY. <SPACE>]\n\nwhen flag clicked\nhide\nerase all\n\nwhen [space v] key pressed\nif <(Level) = [0]> then\n    if <(Space) < (length of [dialogueintro v])> then\n        change [space v] by (1)\n        Type (item (Space) of [dialogueintro v])\n    end\nend\n\n\n\nwhen I receive [info collected intro v]\nstop [other scripts in sprite v]\nType [YOU HAVE NOW COLLECTED INFO ABOUT THIS     OBJECT, AS WELL AS A SAMPLE TO TAKE BACK TO YOUR PLANET. NICE JOB!]\nwait (2) seconds\nType [YOUR JOB NOW IS TO PASS THIS LEVEL.]\n\n@Effect\n\nwhen flag clicked\nhide\nrepeat (10)\n    create clone of (_myself_ v)\nend\n\nwhen flag clicked\nforever\n    if on edge, bounce\nend\n\nwhen I start as a clone\ngo to [back v] layer\ngo to (random position v)\nshow\nforever\n    glide (pick random (8) to (15)) secs to (random position v)\nend\n\nglide (1) secs to x: (pick random (1) to (100)) y: (pick random (1) to (100))\n\n@Clouds\n\nwhen flag clicked\nset [ghost v] effect to (40)\n\n@Title\n\nwhen flag clicked\nshow\nswitch costume to (title v)\ngo to x: (3) y: (197)\nrepeat (90)\n    change y by (((120) - (y position)) / (16))\nend\nwait (0.1) seconds\ncreate clone of (_myself_ v)\ngo to x: (3) y: (197)\nswitch costume to (subtitle v)\nrepeat (90)\n    change y by (((68) - (y position)) / (16))\nend\nwait (0.5) seconds\nbroadcast (Start v)\n\nrepeat until <(y position) = [68]>\n\nrepeat until <(y position) = [120]>\n\ndefine fade out\nset [ghost v] effect to (0)\nrepeat (20)\n    change [ghost v] effect by (5)\nend\n\nwhen I receive [game v]\nfade out\n\n@Start\n\nwhen flag clicked\nhide\n\nwhen I receive [start v]\nshow\nfade in\n\ndefine fade in\nset [ghost v] effect to (100)\nrepeat (20)\n    change [ghost v] effect by (-5)\nend\n\ndefine fade out\nset [ghost v] effect to (0)\nrepeat (20)\n    change [ghost v] effect by (5)\nend\n\nwhen flag clicked\nswitch backdrop to (start v)\nforever\n    if <touching (mouse-pointer v)?> then\n        repeat until <(size) = [110]>\n            change size by (2)\n        end\n    else\n        repeat until <(size) = [100]>\n            change size by (-2)\n        end\n    end\nend\n\nwhen this sprite clicked\nbroadcast (Game v)\nswitch backdrop to (main v)\nfade out\nhide\n\n@Tack Note\n\nwhen I receive [note v]\nshow\nswitch costume to (Level)\n\nwhen flag clicked\nhide\nswitch costume to (blank v)\n\nwhen this sprite clicked\nhide\n\nnext costume\n\n@Tack Board\n\nwhen flag clicked\nswitch costume to (1 v)\n\nwhen I receive [level v]\nnext costume\n\nwhen [space v] key pressed\nif <touching (playermain v)?> then\n    broadcast (NOTE v)\nend\n\n@Obstacles\n\nwhen flag clicked\nshow\ngo to x: (0) y: (0)\nswitch costume to (1 v)\nforever\n    glide (1) secs to x: (0) y: (5)\n    glide (1) secs to x: (0) y: (0)\nend\n\nwhen I receive [level v]\nnext costume\n\nwhen this sprite clicked\nadd (costume [name v]) to [items v]\nswitch costume to (join (Level) [-INFO])\n\nwhen [a v] key pressed\nif < (costume [name v]) contains [INFO]?> then\n    switch costume to ((Level) + (1))\n    broadcast (info collected intro v)\nend\n\n@Trampoline\n\nwhen flag clicked\nforever\n    if <(Level) = [13]> then\n        show\n    else\n        hide\n    end\nend\n\n@ End\n\nwhen I receive [end of game v]\nif <(length of [items v]) > [0]> then\n    set [clonecount v] to [0]\n    repeat (length of [items v])\n        create clone of (_myself_ v)\n    end\nend\n\nwhen flag clicked\ndelete all of [items v]\nhide\n\nwhen I start as a clone\ngo to x: (0) y: (-210)\nchange [clonecount v] by (1)\nswitch costume to (item (CloneCount) of [items v])\nshow\nglide (1) secs to x: (((-66.67) * (length of [items v])) + ((CloneCount) * (100))) y: (20)\nforever\n    glide (1) secs to x: (x position) y: (25)\n    glide (1) secs to x: (x position) y: (20)\nend\n\n@Thumb\n\nwhen flag clicked\nhide\n\n
Discovery || A Scientific Platformer\n\n===== Instructions =====\n- Right & left arrows to move (or A & D)\n- Up arrow to jump (W)\n- Left, right, A, or D + up or W keys to climb\n- Press space if touching a tack board to read the message\n- Press space to continue in the story line\n- Click on an obstacle/object to gather info about it, then press the A key to close/officially get a sample\n=======================================\n