-Ghosting- a Platformer (2.5k entry) #games #all
@Stage\n\nwhen flag clicked\nforever\n    if <(GO!) = [1]> then\n        forever\n            play sound [media-a17b98a2 v] until done\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <(X) = [7]> then\n        switch backdrop to (hahaha v)\n    else\n        if <(X) = [12]> then\n            switch backdrop to (1111 v)\n        else\n            switch backdrop to (follow me! v)\n        end\n    end\nend\n\n@Ghost\n\nwhen flag clicked\ngo to x: (-210) y: (-80)\npoint in direction (90)\nset [x velocity v] to [0]\nset [y velocity v] to [0]\nforever\n    Platform [12] [-1] [.8] [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)?> or <touching (level 2 v)?>> then\n    set [slope v] to [0]\n    repeat until <<(Slope) = [8]> or <not <<touching (level v)?> or <touching (level 2 v)?>>>>\n        change [slope v] by (1)\n        change y by (1)\n    end\n    if <<touching (level v)?> or <touching (level 2 v)?>> then\n        change y by ((Slope) * (-1))\n        repeat ([ceiling v] of ([abs v] of (X Velocity) ) )\n            if <<touching (level v)?> or <touching (level 2 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)?> or <touching (level 2 v)?>> then\n    repeat ([ceiling v] of ([abs v] of (Y Velocity) ) )\n        if <<touching (level v)?> or <touching (level 2 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\nwhen flag clicked\nforever\n    if <touching (level 2 v)?> then\n        repeat (10)\n            change [ghost v] effect by (10)\n            change [brightness v] effect by (10)\n        end\n        go to x: (-210) y: (-80)\n        point in direction (90)\n        set [ghost v] effect to (0)\n        set [brightness v] effect to (0)\n    end\n    if <touching (lava v)?> then\n        repeat (10)\n            change [ghost v] effect by (10)\n            change [brightness v] effect by (10)\n        end\n        set [y velocity v] to [0]\n        go to x: (-210) y: (-80)\n        point in direction (90)\n        set [ghost v] effect to (0)\n        set [brightness v] effect to (0)\n    end\n    if <touching (spikes v)?> then\n        repeat (10)\n            change [ghost v] effect by (10)\n            change [brightness v] effect by (10)\n        end\n        set [y velocity v] to [0]\n        go to x: (-210) y: (-80)\n        point in direction (90)\n        set [ghost v] effect to (0)\n        set [brightness v] effect to (0)\n    end\n    if <touching (checkpoint v)?> then\n        repeat (10)\n            change [ghost v] effect by (10)\n            change [brightness v] effect by (10)\n        end\n        change [x v] by (1)\n        go to x: (-210) y: (-80)\n        point in direction (90)\n        set [ghost v] effect to (0)\n        set [brightness v] effect to (0)\n        if <(X) = [12]> then\n            go to x: (0) y: (-80)\n        end\n    end\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 (ghost 2 v)\n    end\n    if <key (left arrow v) pressed?> then\n        point in direction (-90)\n        switch costume to (ghost 2 v)\n    end\n    if <key (d v) pressed?> then\n        point in direction (90)\n        switch costume to (ghost 2 v)\n    end\n    if <key (a v) pressed?> then\n        point in direction (-90)\n        switch costume to (ghost 2 v)\n    end\n    if <not <<<<key (a v) pressed?> or <key (right arrow v) pressed?>> or <key (left arrow v) pressed?>> or <key (d v) pressed?>>> then\n        switch costume to (ghost 1 v)\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Y Velocity) = [10]> then\n        play sound [Jump v] until done\n    end\nend\n\nwhen flag clicked\nset [ghost v] effect to (100)\nforever\n    if <(GO!) = [1]> then\n        set [ghost v] effect to (0)\n        stop [this script v]\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Show) = [1]> then\n        repeat (10)\n            change [ghost v] effect by (10)\n            change [brightness v] effect by (10)\n        end\n        go to x: (-210) y: (-80)\n        point in direction (90)\n        set [ghost v] effect to (0)\n        set [brightness v] effect to (0)\n        wait until <(Show) = [1]>\n    end\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\nwhen flag clicked\nset [x v] to [1]\nforever\n    switch costume to (X)\nend\n\nwhen flag clicked\nswitch costume to (3 v)\n\nwhen flag clicked\nset [ghost v] effect to (100)\nforever\n    if <(GO!) = [1]> then\n        set [ghost v] effect to (0)\n    end\nend\n\nwhen flag clicked\nforever\n    if <(X) = [12]> then\n        set [ghost v] effect to (100)\n    end\nend\n\n@Level 2\n\nwhen flag clicked\nset [level v] to [1]\nforever\n    go to x: (0) y: (0)\n    switch costume to (Level)\nend\n\nwhen flag clicked\nshow\nset [ghost v] effect to (0)\nforever\n    if <key (space v) pressed?> then\n        repeat (4)\n            change [ghost v] effect by (25)\n            wait (.01) seconds\n        end\n        set [disappear v] to [1]\n        hide\n        wait until <not <key (space v) pressed?>>\n        set [disappear v] to [0]\n        show\n        repeat (4)\n            change [ghost v] effect by (-25)\n            wait (.01) seconds\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <<(X) > [2]> and <(X) < [10]>> then\n        if <(disappear) = [1]> then\n            play sound [Vanishing Sound Effect 1 v] until done\n            wait until <(disappear) = [0]>\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    switch costume to (X)\nend\n\nwhen flag clicked\nset [ghost v] effect to (100)\nforever\n    if <(GO!) = [1]> then\n        set [ghost v] effect to (0)\n        stop [this script v]\n    end\nend\n\n@Particles\n\nwhen I start as a clone\nshow\nset [sy v] to [2]\nset [sx v] to [0]\nset [alt v] to [0]\n\nwhen flag clicked\nhide\nforever\n    broadcast (Tick v)\n    Particle X: (pick random (-241) to (241)) Y: [-160]\nend\n\nwhen I receive [tick v]\nif <(isparticle) = [1]> then\n    change y by (SY)\n    change x by (SX)\n    change [ghost v] effect by (2.)\n    change [alt v] by (1)\n    if <(alt) > [50]> then\n        delete this clone\n    end\nend\n\ndefine Particle X: (x) Y: (y)\nset [isparticle v] to [1]\ngo to x: (x) y: (y)\ncreate clone of (_myself_ v)\nset [isparticle v] to [0]\n\nwhen flag clicked\ngo to [back v] layer\n\nwhen flag clicked\nset [ghost v] effect to (100)\nforever\n    if <(GO!) = [1]> then\n        set [ghost v] effect to (0)\n    end\nend\n\n@Lava\n\nwhen flag clicked\ngo to [back v] layer\nforever\n    go to x: (0) y: (([cos v] of (((timer) - (3)) * (200)) ) * (10))\nend\n\nwhen flag clicked\nshow\nset [ghost v] effect to (100)\nforever\n    if <(GO!) = [1]> then\n        set [ghost v] effect to (0)\n    end\n    if <(X) = [12]> then\n        hide\n    end\nend\n\n@Checkpoint\n\nwhen flag clicked\nshow\nset [ghost v] effect to (100)\nforever\n    switch costume to (X)\nend\n\nwhen flag clicked\nforever\n    if <(X) = [1]> then\n        go to x: (240) y: (-90)\n    end\n    if <(X) = [2]> then\n        go to x: (240) y: (-90)\n    end\n    if <(X) = [3]> then\n        go to x: (240) y: (-90)\n    end\n    if <(X) = [4]> then\n        go to x: (240) y: (-25)\n    end\n    if <(X) = [5]> then\n        go to x: (-240) y: (75)\n    end\n    if <(X) = [6]> then\n        go to x: (240) y: (-90)\n    end\n    if <(X) = [7]> then\n        go to x: (240) y: (-90)\n    end\n    if <(X) = [8]> then\n        go to x: (240) y: (-90)\n    end\n    if <(X) = [9]> then\n        go to x: (240) y: (130)\n    end\n    if <(X) = [10]> then\n        go to x: (220) y: (160)\n    end\n    if <(X) = [11]> then\n        go to x: (240) y: (-85)\n    end\n    if <(X) = [12]> then\n        go to x: (240) y: (100)\n    end\nend\n\n@Instructions\n\nwhen flag clicked\nshow\ngo to [back v] layer\nforever\n    switch costume to (X)\nend\n\nwhen flag clicked\nforever\n    go to x: (0) y: (([cos v] of (((timer) - (3)) * (200)) ) * (10))\nend\n\nwhen flag clicked\nset [ghost v] effect to (100)\nforever\n    if <(GO!) = [1]> then\n        set [ghost v] effect to (0)\n    end\nend\n\n@New Piskel-2\n\nwhen flag clicked\ngo to [front v] layer\nforever\n    go to x: (0) y: (([cos v] of (((timer) - (3)) * (200)) ) * (-10))\nend\n\nwhen flag clicked\nshow\nset [ghost v] effect to (0)\nset [brightness v] effect to (0)\nset [go! v] to [0]\nforever\n    if <<touching (mouse-pointer v)?> and <mouse down?>> then\n        repeat (10)\n            change [ghost v] effect by (10)\n            change [brightness v] effect by (10)\n        end\n        set [go! v] to [1]\n        hide\n    end\nend\n\nwhen flag clicked\nforever\n    if <<touching (mouse-pointer v)?> and <mouse down?>> then\n        play sound [yt1s v] until done\n    end\nend\n\n@New Piskel-1\n\nwhen flag clicked\nshow\nset [ghost v] effect to (0)\nset [brightness v] effect to (0)\nforever\n    if <(GO!) = [1]> then\n        repeat (10)\n            change [ghost v] effect by (10)\n            change [brightness v] effect by (10)\n        end\n        hide\n    end\nend\n\n@Spikes\n\nwhen flag clicked\nshow\nset [ghost v] effect to (100)\nforever\n    if <(GO!) = [1]> then\n        set [ghost v] effect to (0)\n    end\nend\n\nwhen flag clicked\nforever\n    switch costume to (X)\nend\n\n@Sprite1\n\nwhen flag clicked\nhide\nforever\n    if <(X) = [10]> then\n        show\n    else\n        hide\n    end\nend\n\nwhen flag clicked\nforever\n    go to x: (0) y: (([cos v] of (((timer) - (3)) * (200)) ) * (10))\nend\n\n@Thumbnail\n\nwhen flag clicked\nforever\n    hide\n    go to [back v] layer\nend\n\nshow\ngo to [front v] layer\n\n
~ Thank you so much @Coolbe22 for making this project possible! Without this contest I would have never made this project! I am thankful! By the way, congrats on 2.5k ~\n\n| INSTRUCTIONS | ---full screen recommended---\n- Press the floating ghost to start the project\n- Use arrow keys or WASD for movement\n- Press space to "ghost"\n- Avoid falling into the lava\n- Avoid touching the spikes\n- Like, favorite & follow me @VeryBeary\n\n| Enjoy |\n