Ghost - A Platformer #All #Animations #Art #Games #Music #Stories #Tutorial
@Stage\n\nwhen flag clicked\nforever\n    play sound [Pokemon Sun & Moon - Abandoned Site Music \(HQ\) v] until done\nend\n\n@Player\n\nwhen flag clicked\nshow\nset size to (200) %\npoint in direction (90)\nset [xv v] to [0]\nset [yv v] to [0]\nset [level v] to [1]\ngo to x: (-219) y: (-119)\nset rotation style [left-right v]\nforever\n    Platform\n    if <(x position) > [239]> then\n        start sound [Coin v]\n        go to x: (-219) y: (-119)\n        change [level v] by (1)\n    end\n    if <(Level) > [1]> then\n        if <(x position) < [-239]> then\n            start sound [Coin2 v]\n            go to x: (219) y: (-119)\n            change [level v] by (-1)\n        end\n    end\n    if <touching (spikes v)?> then\n        start sound [Coin2 v]\n        go to x: (-219) y: (-119)\n    end\nend\n\ndefine Platform\nswitch costume to (player v)\nif <<key (right arrow v) pressed?> or <key (d v) pressed?>> then\n    set [xv v] to [12]\n    point in direction (90)\n    create clone of (_myself_ v)\nend\nif <<key (left arrow v) pressed?> or <key (a v) pressed?>> then\n    set [xv v] to [-12]\n    point in direction (-90)\n    create clone of (_myself_ v)\nend\nset [xv v] to ((XV) / (2))\nchange x by (XV)\nif <touching (level v)?> then\n    change x by ((0) - (XV))\n    set [xv v] to [0]\nend\nchange y by (YV)\nif <<<key (up arrow v) pressed?> or <key (w v) pressed?>> and <(YV) < [0]>> then\n    if <touching (level v)?> then\n        start sound [Jump v]\n        set [yv v] to [14]\n        change y by (14)\n    end\nend\nif <touching (level v)?> then\n    if <(YV) < [0]> then\n        set [yv v] to [0]\n    end\n    if <(YV) > [0]> then\n        change y by ((0) - (YV))\n        set [yv v] to [-5]\n    end\nend\nrepeat until <not <touching (level v)?>>\n    change y by (1)\nend\nchange [yv v] by (-1)\nif <touching (trampoline v)?> then\n    start sound [Boing v]\n    set [yv v] to [18]\n    change y by (18)\nend\n\nwhen I start as a clone\nswitch costume to (clone v)\nrepeat (20)\n    change size by (-5)\n    change [ghost v] effect by (10)\nend\ndelete this clone\n\n@Level\n\nwhen flag clicked\nshow\ngo to x: (0) y: (0)\nforever\n    switch costume to (Level)\nend\n\n@Thumbnail\n\nwhen flag clicked\nhide\n\nshow\ngo to [front v] layer\ngo to x: (0) y: (0)\n\n@Spikes\n\nwhen flag clicked\nshow\ngo to x: (0) y: (0)\nforever\n    switch costume to (Level)\nend\n\n@Ghost\n\nwhen flag clicked\nhide\ngo to [back v] layer\nforever\n    wait (pick random (0.1) to (0.2)) seconds\n    create clone of (_myself_ v)\nend\n\nwhen I start as a clone\nshow\nset [ghost v] effect to (pick random (0) to (75))\nset size to (pick random (50) to (75)) %\ngo to x: (pick random (-220) to (220)) y: (-200)\nrepeat until <(y position) > [170]>\n    change y by (10)\nend\ndelete this clone\n\n@Trampoline\n\nwhen flag clicked\nset size to (150) %\ngo to x: (0) y: (0)\nforever\n    switch costume to (Level)\nend\n\n@Love and Favorite\n\nwhen flag clicked\ngo to x: (0) y: (0)\nforever\n    if <(Level) = [10]> then\n        show\n    else\n        hide\n    end\nend\n\n
Ghost - A Platformer\n@chill_coder\n\n- Arrow keys or WASD to move\n- Avoid the spikes\n- Use the trampolines to jump higher