scrolling platformer (Very simpel)
@Stage\n\nwhen flag clicked\nrepeat (1)\n    start sound [Drum Jam v]\n    wait (2) seconds\nend\n\nwhen flag clicked\nwait (3) seconds\n\n@player\n\nstart sound [Forest at Night v]\nstart sound [Kokiri Forest v]\nstart sound [Inspiring Piano v]\n\nwhen flag clicked\nhide\nswitch costume to (costume1 v)\nset [xv v] to [0]\nset [yv v] to [0]\nforever\n    broadcast (tick v)\n    if <key (left arrow v) pressed?> then\n        switch costume to (uiterlijk2 v)\n    end\n    if <key (right arrow v) pressed?> then\n        switch costume to (costume1 v)\n    end\nend\n\ndefine tick\nif <key (right arrow v) pressed?> then\n    change [xv v] by (1)\nend\nif <key (left arrow v) pressed?> then\n    change [xv v] by (-1)\nend\nchange x by (xv)\nset [xv v] to ((xv) * (0.9))\nif <touching color (#010101)?> then\n    change y by (1)\n    if <touching color (#000000)?> then\n        change y by (1)\n        if <touching color (#000000)?> then\n            change y by (1)\n            if <touching color (#000000)?> then\n                change y by (1)\n                if <touching color (#000000)?> then\n                    change y by (1)\n                    if <touching color (#000000)?> then\n                        change x by ((xv) * (-1))\n                        change y by (5)\n                        if <key (up arrow v) pressed?> then\n                            if <(xv) > [0]> then\n                                set [xv v] to [-10]\n                            else\n                                set [xv v] to [10]\n                            end\n                            set [yv v] to [15]\n                        else\n                            set [xv v] to [0]\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\nchange [yv v] by (-1)\nchange y by (yv)\nif <touching color (#000000)?> then\n    change y by ((yv) * (-1))\n    set [yv v] to [0]\nend\nchange y by (-1)\nif <key (up arrow v) pressed?> then\n    if <touching color (#000000)?> then\n        set [yv v] to [13]\n    end\nend\nchange y by (1)\nchange [scrollx v] by ((x position) * (-1))\nchange [scrolly v] by ((y position) * (-1))\ngo to x: (0) y: (0)\n\nwhen I receive [tick v]\ntick\n\nwhen flag clicked\nset size to (30) %\nforever\n    if <touching color (#ff0000)?> then\n        broadcast (bericht 1 v) and wait\n    end\nend\n\nwhen I receive [klj;ad v]\nshow\n\nwhen flag clicked\nforever\n    if <touching color (#ff0000)?> then\n        broadcast (klj;ad v)\n    end\nend\n\nwhen flag clicked\nforever\n    start sound [Ain't Misbehavin' v]\nend\n\n@levels\n\nwhen flag clicked\nhide\nswitch costume to (blank v)\nset size to (100) %\nswitch costume to (level 1 v)\nset [scrollx v] to [292]\nset [scrolly v] to [-46]\nforever\n    go to x: (scrollx) y: (scrolly)\nend\n\nwhen I receive [klj;ad v]\nshow\nset [scrollx v] to [231]\nset [scrolly v] to [-46]\n\nwhen I receive [klj;ad v]\nshow\n\nwhen I receive [klj;ad v]\nshow\n\n@Sprite1\n\nwhen flag clicked\nshow\nwait (3) seconds\nbroadcast (klj;ad v)\nhide\n\n@Sprite2\n\nwhen I receive [klj;ad v]\nnext costume\n\nwhen flag clicked\nshow\nswitch costume to (uiterlijk1 v)\nforever\n\n\n\nwhen flag clicked\nhide\nforever\n    if <(costume [number v]) = [4]> then\n        stop [all v]\n    end\nend\n\nwhen I receive [klj;ad v]\nshow\n\n@Love and fave reminder\n\nwhen I receive [intro v]\n\nwhen flag clicked\nhide\ngo to x: (-6) y: (105)\n\nwhen flag clicked\nhide\ngo to [front v] layer\nforever\n    wait (pick random (3) to (5)) seconds\n    switch costume to (costume1 v)\n    go to x: (-249) y: (50)\n    show\n    go to [front v] layer\n    repeat (9)\n        change y by (-6)\n    end\n    repeat (5)\n        change y by (3)\n    end\n    repeat (5)\n        change y by (-1)\n    end\n    wait (2) seconds\n    repeat (15)\n        change y by (7)\n    end\n    hide\nend\n\n@Sprite4\n\n@clouds\n\nwhen flag clicked\ngo to [back v] layer\nhide\nforever\n    wait (pick random (2) to (5)) seconds\n    create clone of (_myself_ v)\nend\n\nwhen I start as a clone\nshow\nset [ghost v] effect to (80)\nset size to (pick random (50) to (100)) %\nswitch costume to (pick random (1) to (4))\nshow\ngo to x: (303) y: (pick random (75) to (175))\nglide (10) secs to x: (-303) y: (y position)\ndelete this clone\n\nwhen I receive [1 : start :d v]\n\n
Use the arrow keys to move the player. If the player falls at the beginning, click the flag again!\n#games #all 