Nightfall / A Platformer
@Stage\n\nwhen flag clicked\nforever\n    set [pan left/right v] effect to (pick random (-100) to (100))\n    set [ghost v] effect to (pick random (-10) to (10))\n    set [brightness v] effect to (pick random (-50) to (10))\n    wait (0.1) seconds\nend\n\nwhen flag clicked\nforever\n    play sound [trueno v] until done\nend\n\n@player\n\nwhen flag clicked\nset [time v] to [0]\nshow variable [time v]\nswitch costume to (disfraz1 v)\nset [puntaje v] to [0]\nshow variable [puntaje v]\nhide variable [piso v]\nset rotation style [left-right v]\npoint in direction (90)\nset size to (250) %\n\nwhen I receive [restart v]\ngo to x: (-130) y: (-40)\nswitch costume to (disfraz1 v)\npoint in direction (90)\n\nwhen flag clicked\nforever\n    set [x v] to (x position)\n    set [y v] to (y position)\nend\n\nwhen I receive [start v]\n\nwhen I receive [start v]\nforever\n    if <key (right arrow v) pressed?> then\n        switch costume to (disfraz1 v)\n        point in direction (90)\n        repeat (3)\n            wait (0.1.000000) seconds\n            if <touching (rayo v)?> then\n                start sound [Oops v]\n                broadcast (De nuevo v)\n            end\n            next costume\n        end\n        repeat until <not <key (right arrow v) pressed?>>\n            switch costume to (disfraz4 v)\n        end\n        switch costume to (disfraz3 v)\n        wait (0.1.000000) seconds\n        switch costume to (disfraz2 v)\n        if <touching (rayo v)?> then\n            start sound [Oops v]\n            broadcast (De nuevo v)\n        end\n        wait (0.1.000000) seconds\n        switch costume to (disfraz1 v)\n        wait (0.1.000000) seconds\n    end\n    if <key (left arrow v) pressed?> then\n        switch costume to (disfraz1 v)\n        point in direction (-90)\n        repeat (3)\n            wait (0.1.000000) seconds\n            next costume\n            if <touching (rayo v)?> then\n                start sound [Oops v]\n                broadcast (De nuevo v)\n            end\n        end\n        repeat until <not <key (left arrow v) pressed?>>\n            switch costume to (disfraz4 v)\n            if <touching (rayo v)?> then\n                start sound [Oops v]\n                broadcast (De nuevo v)\n            end\n        end\n        switch costume to (disfraz3 v)\n        wait (0.1.000000) seconds\n        if <touching (rayo v)?> then\n            start sound [Oops v]\n            broadcast (De nuevo v)\n        end\n        switch costume to (disfraz2 v)\n        wait (0.1.000000) seconds\n        switch costume to (disfraz1 v)\n        wait (0.1.000000) seconds\n    end\n    if <key (up arrow v) pressed?> then\n        switch costume to (disfraz1 v)\n        point in direction (-90)\n        switch costume to (disfraz5 v)\n        repeat (2)\n            wait (0.1.000000) seconds\n            next costume\n            if <touching (rayo v)?> then\n                start sound [Oops v]\n                broadcast (De nuevo v)\n            end\n        end\n        repeat until <touching (escenario v)?>\n            switch costume to (disfraz7 v)\n            if <touching (rayo v)?> then\n                start sound [Oops v]\n                broadcast (De nuevo v)\n            end\n        end\n        switch costume to (disfraz1 v)\n    end\n    if <key (down arrow v) pressed?> then\n        switch costume to (disfraz8 v)\n        if <touching (rayo v)?> then\n            start sound [Oops v]\n            broadcast (De nuevo v)\n        end\n        wait until <not <key (down arrow v) pressed?>>\n        if <touching (rayo v)?> then\n            start sound [Oops v]\n            broadcast (De nuevo v)\n        end\n        switch costume to (disfraz1 v)\n    end\n    if <touching (rayo v)?> then\n        start sound [Oops v]\n        broadcast (De nuevo v)\n    end\nend\n\nwhen I receive [start v]\nforever\n    wait (1) seconds\n    change [time v] by (1)\nend\n\n@escenario\n\nwhen flag clicked\nshow variable [level v]\nset [level v] to [1]\nswitch costume to (disfraz1 v)\ngo to x: (153) y: (187)\nset size to (400) %\n\nwhen I receive [derecha v]\nchange x by (-10)\n\nwhen I receive [izquierda v]\nchange x by (10)\n\nwhen I receive [caer v]\nchange y by (6)\n\nwhen I receive [salto v]\nrepeat (10)\n    change y by (-15)\nend\n\nwhen flag clicked\nforever\n    set [d v] to (costume [number v])\nend\n\nwhen I receive [de nuevo v]\nbroadcast (REstart v)\ngo to x: (153) y: (187)\n\nwhen I receive [start v]\nforever\n    if <touching (abajo v)?> then\n        set [piso v] to [1]\n    else\n        set [piso v] to [0]\n    end\n    if <(Puntaje) = [3]> then\n        set [puntaje v] to [0]\n        change [level v] by (1)\n        broadcast (siguiente v)\n        next costume\n        go to x: (153) y: (187)\n    end\n    if <key (space v) pressed?> then\n        broadcast (REstart v)\n        go to x: (153) y: (187)\n    end\nend\n\n@derecha\n\nwhen flag clicked\n\nwhen flag clicked\nforever\n    go to (player v)\nend\n\nwhen I receive [start v]\nforever\n    if <<key (right arrow v) pressed?> and <not <touching (escenario v)?>>> then\n        broadcast (derecha v)\n    end\nend\n\nwhen flag clicked\nset [ghost v] effect to (9999999999)\ngo to (player v)\n\n@izquierda\n\nwhen flag clicked\nset [ghost v] effect to (9999999999)\ngo to (player v)\n\nwhen flag clicked\nforever\n    go to (player v)\nend\n\nwhen I receive [start v]\nforever\n    if <<key (left arrow v) pressed?> and <not <touching (escenario v)?>>> then\n        broadcast (izquierda v)\n    end\nend\n\n@abajo\n\nwhen flag clicked\nset [ghost v] effect to (999999999)\ngo to (player v)\n\nwhen flag clicked\nforever\n    go to (player v)\nend\n\nwhen I receive [start v]\nforever\n    if <not <touching (escenario v)?>> then\n        broadcast (caer v)\n    end\nend\n\n@arriba\n\nwhen flag clicked\nset [ghost v] effect to (9999999)\ngo to (player v)\n\nwhen flag clicked\nforever\n    go to (player v)\nend\n\nwhen I receive [start v]\nforever\n    if <<key (up arrow v) pressed?> and <<not <touching (escenario v)?>> and <(piso) = [1]>>> then\n        broadcast (salto v)\n    end\nend\n\n@nada\n\nwhen flag clicked\nset [ghost v] effect to (9999999999)\n\n@lluvia\n\nwhen flag clicked\nhide\nforever\n    create clone of (_myself_ v)\nend\n\nwhen I start as a clone\nset [ghost v] effect to (70)\nshow\ngo to x: (pick random (-215) to (215)) y: (161)\nrepeat until <touching (nada v)?>\n    change y by (-10)\nend\ndelete this clone\n\n@Objeto2\n\nwhen flag clicked\nswitch costume to (disfraz1 v)\ngo to (escenario v)\nshow\nset [brightness v] effect to (-30)\n\nwhen I receive [siguiente v]\nnext costume\nshow\n\nwhen I receive [restart v]\nshow\nset [puntaje v] to [0]\n\nwhen I receive [start v]\nforever\n    go to (escenario v)\n    if <touching (player v)?> then\n        change [puntaje v] by (1)\n        start sound [Collect v]\n        hide\n    end\nend\n\n@Objeto5\n\nwhen flag clicked\nswitch costume to (disfraz1 v)\ngo to (escenario v)\nshow\nset [brightness v] effect to (-30)\n\nwhen I receive [siguiente v]\nnext costume\nshow\n\nwhen I receive [restart v]\nshow\nset [puntaje v] to [0]\n\nwhen I receive [start v]\nforever\n    go to (escenario v)\n    if <touching (player v)?> then\n        change [puntaje v] by (1)\n        start sound [Collect v]\n        hide\n    end\nend\n\n@Objeto6\n\nwhen flag clicked\nswitch costume to (disfraz1 v)\ngo to (escenario v)\nshow\nset [brightness v] effect to (-30)\n\nwhen I receive [siguiente v]\nnext costume\nshow\n\nwhen I receive [restart v]\nshow\nset [puntaje v] to [0]\n\nwhen I receive [start v]\nforever\n    go to (escenario v)\n    if <touching (player v)?> then\n        change [puntaje v] by (1)\n        start sound [Collect v]\n        hide\n    end\nend\n\n@Objeto1\n\nwhen flag clicked\ngo to [back v] layer\ngo to x: (0) y: (0)\n\nwhen I receive [start v]\nforever\n    go to [front v] layer\nend\n\n@Objeto7\n\nwhen flag clicked\nswitch costume to (disfraz1 v)\ngo to x: (0) y: (0)\nset [ghost v] effect to (100)\n\nwhen I receive [start v]\nwait (1) seconds\nrepeat (100)\n    change [ghost v] effect by (-1)\nend\nwait (2) seconds\nrepeat (100)\n    change [ghost v] effect by (1)\nend\nnext costume\nwait (1) seconds\nrepeat (100)\n    change [ghost v] effect by (-1)\nend\nwait (2) seconds\nrepeat (100)\n    change [ghost v] effect by (1)\nend\n\n@Objeto8\n\nwhen flag clicked\nhide\ngo to [back v] layer\nshow variable [puntaje v]\n\ngo to [front v] layer\n\n@RAYO\n\nwhen flag clicked\nset size to (100) %\nhide\n\nwhen I receive [caer v]\nchange y by (6)\n\nwhen I receive [izquierda v]\nchange x by (10)\n\nwhen I receive [derecha v]\nchange x by (-10)\n\nwhen I receive [salto v]\nrepeat (10)\n    change y by (-15)\nend\n\nwhen flag clicked\nforever\n    if <not <<(d) = [5]> or <(d) = [8]>>> then\n        go to x: (0) y: (0)\n        hide\n    end\nend\n\nwhen I receive [start v]\nforever\n    go to x: (0) y: (0)\n    hide\n    wait until <(d) = [5]>\n    show\n    repeat (32)\n        change x by (5)\n    end\n    wait until <(d) = [5]>\n    wait (0.5) seconds\n    repeat (32)\n        change x by (-5)\n    end\n    wait until <(d) = [5]>\n    wait (0.5) seconds\n    repeat (32)\n        change y by (5)\n    end\n    wait until <(d) = [5]>\n    wait (0.5) seconds\n    repeat (32)\n        change y by (-5)\n    end\n    wait until <(d) = [5]>\n    wait (0.5) seconds\n    glide (0.8) secs to x: (X) y: (Y)\n    wait until <(d) = [5]>\n    repeat (10)\n        change size by (10)\n    end\n    wait until <(d) = [5]>\n    repeat (10)\n        change size by (-10)\n    end\nend\n\nwhen I receive [start v]\nforever\n    go to x: (0) y: (0)\n    hide\n    wait until <(d) = [8]>\n    show\n    glide (0.8) secs to (random position v)\n    wait until <(d) = [8]>\n    wait (0.5) seconds\n    glide (0.5) secs to (random position v)\n    wait until <(d) = [8]>\n    wait (0.5) seconds\n    glide (0.3) secs to (random position v)\n    wait until <(d) = [8]>\n    wait (0.5) seconds\n    glide (0.2) secs to (random position v)\n    wait until <(d) = [8]>\n    wait (0.5) seconds\n    glide (0.7) secs to x: (X) y: (Y)\n    wait until <(d) = [8]>\n    repeat (10)\n        change size by (10)\n    end\n    wait until <(d) = [8]>\n    repeat (10)\n        change size by (-10)\n    end\nend\n\nrepeat (32)\n    change x by (5)\nend\n\n@Objeto3\n\nwhen flag clicked\nshow\nswitch costume to (disfraz1 v)\nrepeat (18)\n    wait (0.5) seconds\n    next costume\nend\nwait (2.6) seconds\nhide\nbroadcast (START v)\n\nwhen flag clicked\nwait (0.2) seconds\nwait until <(costume [number v]) = [13]>\nstart sound [Collect v]\n\n@hitbox\n\nwhen flag clicked\nset [ghost v] effect to (99999999999)\nforever\n    go to (player v)\nend\n\nwhen I receive [start v]\nforever\n    if <touching color (#ff0000)?> then\n        start sound [hu v]\n        broadcast (De nuevo v)\n    end\nend\n\n
Te movés con las flechas, y cuando tenés 3 monedas pasás de nivel y con ESPACIO volvés al principio del nivel