The Dark Forest - a platformer #games #all

Instructions: The Dark Forest - A Platformer\n\nArrow keys to move,\nreach the portal at the end of each level,\ndont die :)

@Stage\n\nwhen flag clicked\nforever\n    play sound [Horror - Ambience \(7\).mp3 v] until done\nend\n\nwhen flag clicked\nforever\n    play sound [Birds and Bluebells - Relaxing 10 Minutes of Bird Song, Sounds, Chirping and Singing.mp3 v] until done\nend\n\n@Sprite1\n\nwhen flag clicked\nset [level v] to [1]\nset [ghost v] effect to (99)\nwait (0) seconds\nbroadcast (start v)\n\ndefine touch ground\nchange [falling? v] by (1)\nrepeat until <not <touching (hitbox v)?>>\n    change y by (1)\n    set [speed y v] to [0]\n    set [falling? v] to [0]\nend\n\nwhen I receive [start v]\nset size to (50) %\nset rotation style [left-right v]\ngo to x: (-200) y: (0)\nshow\nset [speed y v] to [0]\nset [falling? v] to [10]\nforever\n    change [speed y v] by (-1)\n    change y by (speed y)\n    touch ground\n    if <key (left arrow v) pressed?> then\n        walk [-90] [-4]\n    end\n    if <key (right arrow v) pressed?> then\n        walk [90] [4]\n    end\n    if <<key (up arrow v) pressed?> and <(FALLING?) < [3]>> then\n        set [speed y v] to [12]\n    end\n    if <<(y position) < [-170]> or <touching (spikes v)?>> then\n        go to x: (-200) y: (0)\n        set [speed y v] to [0]\n    end\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 (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\n\nwhen I receive [start v]\nwait (0.001) seconds\nforever\n    if <touching (sprite4 v)?> then\n        broadcast (fade v)\n        repeat (20)\n            change [ghost v] effect by (5)\n        end\n        broadcast (start v)\n        change [level v] by (1)\n    end\nend\n\ngo to x: (178) y: (0)\n\nwhen I receive [fade v]\nglide (0.6) secs to x: (178) y: (0)\n\n@hitbox\n\nwhen flag clicked\ngo to x: (0) y: (0)\nset [ghost v] effect to (99)\nforever\n    switch costume to (level)\nend\n\n@details\n\nwhen flag clicked\ngo to x: (0) y: (0)\nforever\n    switch costume to (level)\nend\n\n@bg1\n\ngo to x: (0) y: (0)\ngo to [back v] layer\n\n@Sprite2\n\ngo to x: (0) y: (0)\n\n@Sprite18\n\nwhen flag clicked\nswitch costume to (costume1 v)\nset size to (200) %\nset [ghost v] effect to (50)\nswitch costume to (costume2 v)\nforever\n    go to x: (481) y: (-50)\n    glide (10) secs to x: (-481) y: (-50)\nend\n\n@Sprite3\n\nwhen flag clicked\nforever\n    go to (sprite1 v)\nend\n\nwhen flag clicked\nset rotation style [left-right v]\nforever\n    if <key (right arrow v) pressed?> then\n        point in direction (90)\n        switch costume to (costume)\n    else\n        if <key (left arrow v) pressed?> then\n            point in direction (-90)\n            switch costume to (costume)\n        else\n            if <key (up arrow v) pressed?> then\n                switch costume to (costume)\n            else\n                switch costume to (costume1 v)\n            end\n        end\n    end\nend\n\nwait (0.5) seconds\nswitch costume to (costume3 v)\nwait (0.5) seconds\n\nwhen flag clicked\nset rotation style [left-right v]\nforever\n    if <key (up arrow v) pressed?> then\n        set [costume v] to [2]\n        wait (0.2) seconds\n        set [costume v] to [3]\n        wait (0.2) seconds\n    else\n        if <key (left arrow v) pressed?> then\n            set [costume v] to [2]\n            wait (0.2) seconds\n            set [costume v] to [3]\n            wait (0.2) seconds\n        else\n            if <key (right arrow v) pressed?> then\n                set [costume v] to [2]\n                wait (0.2) seconds\n                set [costume v] to [3]\n                wait (0.2) seconds\n            else\n                switch costume to (costume1 v)\n            end\n        end\n    end\nend\n\nwhen I receive [fade v]\nrepeat (20)\n    change [ghost v] effect by (5)\nend\nwait (0.1) seconds\nset [ghost v] effect to (0)\n\ngo to [back v] layer\n\ngo [forward v] (1) layers\n\n@Sprite4\n\nwhen I start as a clone\nset size to (50) %\ngo to x: (pick random (179) to (173)) y: (pick random (6) to (12))\nset [ghost v] effect to (50)\nwait (0.3) seconds\ndelete this clone\n\nwhen flag clicked\nif <not <(level) = [9]>> then\n    go to x: (176) y: (9)\n    set [ghost v] effect to (50)\n    set size to (50) %\n    show\n    forever\n        create clone of (_myself_ v)\n    end\nelse\n    hide\nend\n\n@spikes\n\nwhen flag clicked\ngo to x: (0) y: (0)\nforever\n    switch costume to (level)\n    turn right (2) degrees\nend\n\nwhen flag clicked\ngo to x: (0) y: (0)\nforever\n    if <(level) = [2]> then\n        go to x: (0) y: (-50)\n    else\n        if <(level) = [4]> then\n            go to x: (71) y: (2)\n        else\n            if <(level) = [5]> then\n                go to x: (114) y: (-44)\n            else\n                if <(level) = [6]> then\n                    go to x: (36) y: (-100)\n                else\n                    if <(level) = [7]> then\n                        go to x: (-40) y: (-50)\n                        create clone of (_myself_ v)\n                        wait until <not <(level) = [7]>>\n                    else\n                        if <(level) = [8]> then\n                            go to x: (-55) y: (-50)\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\n\ngo to [back v] layer\ngo [forward v] (1) layers\n\ngo to [front v] layer\n\ngo to x: (114) y: (-44)\n\nset [level v] to [8]\n\nwhen I start as a clone\nforever\n    if <(level) = [7]> then\n        go to x: (70) y: (-50)\n    else\n        delete this clone\n    end\nend\n\nwhen I start as a clone\nforever\n    turn right (2) degrees\nend\n\n@ adaw\n\nwhen I receive [fade v]\nrepeat (20)\n    change [ghost v] effect by (-5)\nend\nrepeat (50)\n    change [ghost v] effect by (2)\nend\n\nwhen flag clicked\ngo to x: (0) y: (0)\nset [ghost v] effect to (0)\nrepeat (50)\n    change [ghost v] effect by (2)\nend\n\n@Sprite5\n\nwhen flag clicked\nset [ghost v] effect to (50)\nforever\n    go to (sprite1 v)\nend\n\ngo to [front v] layer\n\n@darkness\n\nwhen flag clicked\ngo to x: (0) y: (0)\nforever\n    go to [front v] layer\n    show\n    set [ghost v] effect to (100)\nend\n\n