Shadows - A Story Platformer (New Levels!)
@Stage\n\nwhen flag clicked\nwait (1) seconds\nwait (1) seconds\nforever\n    play sound [Rain_Loud v] until done\nend\n\n@Shadow Man\n\nwhen flag clicked\nhide\nswitch backdrop to (backdrop0 v)\nReset Player Position\nset [force walk v] to [3]\nset [force gravity v] to [-1.5]\nset [force jump v] to [17]\nset [player speed x v] to [0]\nforever\n    Check Player Gravity\n    Check Player Walk\n    Check Player Touching\nend\n\ndefine move out (dx) (dy)\nrepeat until <not <touching color (#808080)?>>\n    change x by (dx)\n    change y by (dy)\nend\n\ndefine Check Player Gravity\nchange [player speed y v] by (FORCE GRAVITY)\nchange y by (Player Speed Y)\nif <touching color (#808080)?> then\n    if <(Player Speed Y) > [0]> then\n        move out [0] [-1]\n        set [player speed y v] to [0]\n    else\n        move out [0] [1]\n        if <<key (w v) pressed?> or <key (up arrow v) pressed?>> then\n            set [player speed y v] to (FORCE JUMP)\n        else\n            set [player speed y v] to [0]\n        end\n    end\nend\n\ndefine Check Player Walk\nif <<key (a v) pressed?> or <key (left arrow v) pressed?>> then\n    change [player speed x v] by ((-1) * (FORCE WALK))\nend\nif <<key (d v) pressed?> or <key (right arrow v) pressed?>> then\n    change [player speed x v] by ((1) * (FORCE WALK))\nend\nset [player speed x v] to ((Player Speed X) * (0.7))\nchange x by (Player Speed X)\nif <(Player Speed X) > [0]> then\n    move out [-1] [0]\nelse\n    move out [1] [0]\nend\n\ndefine Check Player Touching\nif <touching color (#ffe600)?> then\n    broadcast (Complete level v) and wait\n    Reset Player Position\n    next backdrop\nend\nif <touching color (#7971ff)?> then\n    set [player speed y v] to [24]\nend\nif <<touching color (#5500ff)?> or <touching color (#c30000)?>> then\n    repeat (20)\n        change [ghost v] effect by (5)\n        change [whirl v] effect by (-5)\n    end\n    Reset Player Position\nend\n\ndefine Reset Player Position\nclear graphic effects\ngo to x: (-200) y: (-10)\n\nwhen flag clicked\nforever\n    create clone of (_myself_ v)\n    if <<key (w v) pressed?> or <key (up arrow v) pressed?>> then\n        switch costume to (jump v)\n        repeat until <not <<key (w v) pressed?> or <key (up arrow v) pressed?>>>\n            create clone of (_myself_ v)\n        end\n    end\n    wait until <not <<key (w v) pressed?> or <key (up arrow v) pressed?>>>\n    switch costume to (idle v)\nend\n\nwhen I receive [show v]\nshow\n\nwhen I start as a clone\nswitch costume to (idle2 v)\nrepeat (10)\n    change [ghost v] effect by (10)\n    change size by (-10)\nend\ndelete this clone\n\nwhen flag clicked\nforever\n    if <(y position) = [-185]> then\n        Reset Player Position\n    end\nend\n\nwhen flag clicked\nforever\n    if <key (r v) pressed?> then\n        Reset Player Position\n    end\nend\n\n@Sprite1\n\nwhen flag clicked\nwait (2) seconds\nswitch costume to (costume1 v)\nforever\n    if <key (space v) pressed?> then\n        if <(costume [number v]) = [4]> then\n            repeat (40)\n                change [ghost v] effect by (2.5)\n            end\n            broadcast (Show v)\n        else\n            next costume\n            wait (0.5) seconds\n        end\n    end\nend\n\n@Sprite2\n\nwhen flag clicked\nswitch costume to (thumbnail v)\ngo to x: (0) y: (0)\nwait (2) seconds\nset [ghost v] effect to (100)\ngo to [front v] layer\n\n@Enimies\n\n
Meet Shadow Man, an adventurous shadow who is seeking the Gem of Light. Dodge spikes, Lava, and reach the yellow portal to finish each level. Press "r" to reset.\n----------------------------------------------------------------------------\nThis is now my best project in terms of hearts, stars, and views!\nPropose this project here if you want: https://scratch.mit.edu/studios/28715018/