Platformer Starter Project
@Stage\n\n@Player\n\nwhen flag clicked\ngo to x: (135) y: (-75)\nset [x velocity v] to [0]\nset [y velocity v] to [0]\nforever\n    Platform [12] [-1] [0.7] [2]\nend\n\ndefine Platform (jump height) (gravity) (friction) (running speed)\nif <<key (right arrow v) pressed?> or <key (d v) pressed?>> then\n    change [x velocity v] by (running speed)\nend\nif <<key (left arrow v) pressed?> or <key (a v) pressed?>> then\n    change [x velocity v] by ((running speed) * (-1))\nend\nset [x velocity v] to ((X Velocity) * (friction))\nchange x by (X Velocity)\nif <touching (level v)?> then\n    set [slope v] to [0]\n    repeat until <<(Slope) = [8]> or <not <touching (level v)?>>>\n        change [slope v] by (1)\n        change y by (1)\n    end\n    if <touching (level v)?> then\n        change y by ((Slope) * (-1))\n        repeat ([ceiling v] of ([abs v] of (X Velocity) ) )\n            if <touching (level v)?> then\n                change x by ((([abs v] of (X Velocity) ) / (X Velocity)) * (-1))\n            end\n        end\n        set [x velocity v] to [0]\n    end\nend\nchange y by (Y Velocity)\nif <touching (level v)?> then\n    repeat ([ceiling v] of ([abs v] of (Y Velocity) ) )\n        if <touching (level v)?> then\n            change y by ((([abs v] of (Y Velocity) ) / (Y Velocity)) * (-1))\n        end\n    end\n    if <<(([abs v] of (Y Velocity) ) / (Y Velocity)) = [-1]> and <<key (up arrow v) pressed?> or <key (w v) pressed?>>> then\n        set [y velocity v] to (jump height)\n    else\n        set [y velocity v] to [0]\n    end\nelse\n    change [y velocity v] by (-1)\nend\n\n@Level\n\nwhen flag clicked\nset [level v] to [1]\nforever\n    go to x: (0) y: (0)\n    switch costume to (Level)\nend\n\n@Thumbnail\n\nwhen flag clicked\ngo to [front v] layer\nset [ghost v] effect to (100)\n\n@Easter Egg\n\n@Disappear\n\nwhen flag clicked\nset [ghost v] effect to (0)\nforever\n    if <touching (player v)?> then\n        repeat (8)\n            change [ghost v] effect by (10)\n        end\n        wait until <not <touching (player v)?>>\n        repeat (8)\n            change [ghost v] effect by (-10)\n        end\n    end\nend\n\n
| THINGS TO KNOW |\n- Feel free to use this!\n- You don't have to give credit!\n- There is an easter egg!\n- Spoilers will be deleted!\n- Like and favorite!\n\n#games #tutorial #starter #project #platformer #colorless #black #white #fun #easy #help #light #dark #VeryBeary