fogformer || mobile platformer  ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ #all #timmccool
@Stage\n\nwhen [space v] key pressed\nif <<(flash) = [0]> or <(flash) = [1]>> then\n    change [flash v] by (1)\n    change [brightness v] effect by (100)\n    wait (0.01) seconds\n    repeat (2)\n        change [brightness v] effect by (-30)\n    end\n    repeat (5)\n        change [brightness v] effect by (-6)\n    end\n    repeat (10)\n        change [brightness v] effect by (-1)\n    end\nend\n\nwhen I receive [levelup v]\nset [flash v] to [0]\n\nwhen flag clicked\nset [flash v] to [4]\n\nwhen I receive [start v]\nset [flash v] to [0]\n\nwhen I receive [start v]\nforever\n    set [pan left/right v] effect to (-50)\n    play sound [bensound-betterdays v] until done\n    stop all sounds\nend\n\nwhen flag clicked\nstop all sounds\n\n@Figur2\n\nwhen I receive [start v]\ngo to [front v] layer\nshow\nforever\n    switch costume to (Level)\nend\n\nwhen flag clicked\nhide\n\n@player\n\ndefine touching ground\nchange y by ((0) - (y))\nset [y v] to [1]\n\nwhen I start as a clone\nchange y by (-50)\nshow\ngo to [front v] layer\nset [ghost v] effect to (40)\nswitch costume to (dot v)\nset size to (20) %\nset [brightness v] effect to (0)\nset [cy2 v] to [0]\nset [cx1 v] to (pick random (-5) to (5))\nrepeat until <touching (_edge_ v)?>\n    change x by (cx1)\n    change y by (cy2)\n    change [cy2 v] by (-2)\nend\ndelete this clone\n\nwhen flag clicked\nforever\n    wait (0.1) seconds\n    create clone of (_myself_ v)\nend\n\nwhen I receive [start v]\nwait (0.2) seconds\ngo to x: (-200) y: (-79)\ngo to [front v] layer\nswitch costume to (kostüm1 v)\npoint in direction (90)\nforever\n    change [y v] by (-1)\n    if <<<(x position) > (mouse x)> and <mouse down?>> or <key (left arrow v) pressed?>> then\n        change [x v] by (-0.6)\n        turn right (15) degrees\n    end\n    if <<<(x position) < (mouse x)> and <mouse down?>> or <key (right arrow v) pressed?>> then\n        change [x v] by (0.6)\n        turn left (15) degrees\n    end\n    set [x v] to ((x) * (0.9))\n    change x by (x)\n    if <touching (figur3 v)?> then\n        change y by (1)\n    end\n    if <touching (figur3 v)?> then\n        change y by (1)\n    end\n    if <touching (figur3 v)?> then\n        change y by (1)\n    end\n    if <touching (figur3 v)?> then\n        change y by (1)\n    end\n    if <touching (figur3 v)?> then\n        change y by (-4)\n        change x by ((x) * (-1))\n    end\n    change y by (y)\n    if <touching (figur3 v)?> then\n        touching ground\n    end\n    change y by (-1)\n    if <<touching (figur3 v)?> and <<key (up arrow v) pressed?> or <<(mouse y) > (y position)> and <mouse down?>>>> then\n        set [y v] to [15]\n    end\n    change y by (1)\n    if <(y position) > [180]> then\n        set [y v] to [0]\n    end\n    if <touching (figur4 v)?> then\n        if <(Level) < [16]> then\n            broadcast (levelup v)\n            wait (1) seconds\n            go to x: (-200) y: (-79)\n        else\n            broadcast (fin v)\n        end\n    end\n    if <touching (spring v)?> then\n        set [y v] to [15.5]\n    end\n    if <touching (spring2 v)?> then\n        set [y v] to [25.5]\n    end\n    if <touching (figur6 v)?> then\n        set [x v] to [0]\n        set [y v] to [0]\n        broadcast (died v)\n        go to x: (-200) y: (-79)\n    end\nend\n\nwhen flag clicked\ngo to x: (159) y: (69)\n\nwhen I receive [fin v]\nhide\nstop [other scripts in sprite v]\n\nwhen flag clicked\nshow\n\n@Figur1\n\nwhen flag clicked\nforever\n    go to (player v)\nend\n\nwhen flag clicked\nswitch costume to (kostüm1 v)\ngo to [back v] layer\ncreate clone of (_myself_ v)\nforever\n    set size to (aize) %\n    set [ghost v] effect to (durchs)\nend\n\nwhen I start as a clone\ngo to [back v] layer\nforever\n    set size to ((aize) - (-30)) %\n    set [ghost v] effect to (durchs)\nend\n\nwhen I start as a clone\nforever\n    go to (player v)\nend\n\nwhen I start as a clone\nforever\n\nwhen I receive [died v]\nrepeat (5)\n    change [durchs v] by (1)\nend\nrepeat (5)\n    change [durchs v] by (-1)\nend\n\nchange [ghost v] effect by (1)\n\nwhen flag clicked\nset [aize v] to [100]\n\nwhen flag clicked\nset [aize v] to [100]\nset [durchs v] to [88]\nforever\n    repeat (100)\n        change [aize v] by (0.1)\n        change [durchs v] by (0.01)\n    end\n    repeat (100)\n        change [aize v] by (-0.1)\n        change [durchs v] by (-0.01)\n    end\nend\n\nwhen I receive [fin v]\nrepeat (20)\n    change [durchs v] by (1)\nend\n\n@Figur4\n\nwhen flag clicked\nset [level v] to [1]\nforever\n    go to x: (item (Level) of [portal_x v]) y: (item (Level) of [portal_y v])\n    turn right (15) degrees\nend\n\nwhen flag clicked\nshow\ncreate clone of (_myself_ v)\n\nwhen I start as a clone\nhide\nforever\n    go to x: (item (Level) of [portal_x v]) y: (item (Level) of [portal_y v])\n    turn right (-15) degrees\nend\n\nwhen flag clicked\ndelete all of [portal_y v]\ndelete all of [portal_x v]\nadd [208] to [portal_x v]\nadd [59] to [portal_y v]\nadd [216] to [portal_x v]\nadd [-45] to [portal_y v]\nadd [214] to [portal_x v]\nadd [142] to [portal_y v]\nadd [222] to [portal_x v]\nadd [155] to [portal_y v]\nadd [215] to [portal_x v]\nadd [0] to [portal_y v]\nadd [215] to [portal_x v]\nadd [-45] to [portal_y v]\nadd [180] to [portal_x v]\nadd [0] to [portal_y v]\nadd [215] to [portal_x v]\nadd [100] to [portal_y v]\nadd [215] to [portal_x v]\nadd [-45] to [portal_y v]\nadd [215] to [portal_x v]\nadd [-45] to [portal_y v]\nadd [222] to [portal_x v]\nadd [155] to [portal_y v]\nadd [214] to [portal_x v]\nadd [87] to [portal_y v]\nadd [213] to [portal_x v]\nadd [-63] to [portal_y v]\nadd [213] to [portal_x v]\nadd [-63] to [portal_y v]\nadd [213] to [portal_x v]\nadd [-63] to [portal_y v]\nadd [213] to [portal_x v]\nadd [63] to [portal_y v]\n\nwhen I receive [start v]\nshow\n\nwhen flag clicked\nhide\n\n@Figur5\n\nwhen I receive [levelup v]\nrepeat (10)\n    change [ghost v] effect by (-10)\nend\nchange [level v] by (1)\nwait (1) seconds\nrepeat (10)\n    change [ghost v] effect by (10)\nend\n\nwhen I receive [start v]\nset [level v] to [1]\ngo to [front v] layer\nshow\nwait (1) seconds\nrepeat (10)\n    change [ghost v] effect by (10)\nend\n\nwhen flag clicked\ngo to [front v] layer\nset [ghost v] effect to (0)\nrepeat (10)\n    change [ghost v] effect by (10)\nend\n\nwhen flag clicked\nforever\n    if <<key (space v) pressed?> or <mouse down?>> then\n        repeat (10)\n            change [ghost v] effect by (-10)\n        end\n        wait (2) seconds\n        broadcast (start v)\n        stop [this script v]\n    end\nend\n\n@Figur6\n\nwhen I receive [start v]\ngo to [front v] layer\nshow\nforever\n    switch costume to (Level)\nend\n\nwhen flag clicked\nhide\n\n@spring\n\nwhen flag clicked\nhide\n\nwhen I receive [levelup v]\nwait (1) seconds\nswitch costume to (Level)\n\nwhen flag clicked\nswitch costume to (1 v)\n\nwhen I receive [start v]\nshow\ngo to [front v] layer\nforever\n    if <touching (player v)?> then\n        repeat (1)\n            repeat (10)\n                change y by (-1)\n            end\n            repeat (10)\n                change y by (1)\n            end\n        end\n        go to x: (0) y: (0)\n    end\nend\n\nwhen flag clicked\n\n@Fog\n\nwhen flag clicked\nset [ghost v] effect to (50)\ngo to x: (0) y: (0)\nshow\ncreate clone of (_myself_ v)\nforever\n    change x by (-1)\n    if <(x position) = [-475]> then\n        hide\n    end\nend\n\nwhen I start as a clone\nset x to (475)\nforever\n    change x by (-1)\n    if <(x position) = [0]> then\n        create clone of (_myself_ v)\n    end\n    if <(x position) = [-475]> then\n        delete this clone\n    end\nend\n\nwhen I start as a clone\nset [ghost v] effect to (70)\n\n@Figur3\n\nwhen I receive [intro v]\nswitch costume to (intro2 v)\n\nwhen flag clicked\ngo to x: (0) y: (0)\nforever\n    repeat (10)\n        change y by (0.25)\n    end\n    repeat (10)\n        change y by (-0.25)\n    end\nend\n\nwhen I receive [start v]\nwait (0.1) seconds\nstop [other scripts in sprite v]\ngo to [front v] layer\nforever\n    switch costume to (Level)\nend\n\nwhen flag clicked\nshow\nswitch costume to (intro v)\n\n@spring2\n\nwhen flag clicked\nhide\n\nwhen I receive [levelup v]\nwait (1) seconds\nswitch costume to (Level)\n\nwhen flag clicked\nswitch costume to (1 v)\n\nwhen I receive [start v]\nshow\ngo to [front v] layer\nforever\n    if <touching (player v)?> then\n        repeat (1)\n            repeat (10)\n                change y by (-1)\n            end\n            repeat (10)\n                change y by (1)\n            end\n        end\n        go to x: (0) y: (0)\n    end\nend\n\nwhen flag clicked\n\n@Figur7\n\nwhen flag clicked\nshow\nswitch costume to (kostüm1 v)\ngo to [front v] layer\ngo [backward v] (1) layers\nforever\n    set size to (100) %\n    set [ghost v] effect to (60)\n    if <touching (mouse-pointer v)?> then\n        set [ghost v] effect to (50)\n        repeat (10)\n            change size by (0.5)\n        end\n        wait until <not <touching (mouse-pointer v)?>>\n        set [ghost v] effect to (60)\n        repeat (10)\n            change size by (-0.5)\n        end\n    end\nend\n\nwhen I receive [start v]\nstop [other scripts in sprite v]\nhide\nstop [this script v]\n\nwhen I receive [intro v]\nnext costume\n\nwhen I receive [fin v]\ngo to [front v] layer\nshow\nset [ghost v] effect to (100)\nswitch costume to (kostüm3 v)\nrepeat (4)\n    change [ghost v] effect by (-10)\nend\n\nwhen flag clicked\ngo to x: (0) y: (0)\nforever\n    repeat (10)\n        change y by (0.5)\n    end\n    repeat (10)\n        change y by (-0.5)\n    end\nend\n\n@Figur8\n\nwhen I receive [start v]\nshow\n\nwhen flag clicked\nforever\n    go to (figur4 v)\nend\n\nwhen flag clicked\nswitch costume to (kostüm1 v)\ngo to [back v] layer\ncreate clone of (_myself_ v)\nforever\n    set size to ((aize) - (30)) %\n    set [ghost v] effect to (durchs)\nend\n\nwhen I start as a clone\nhide\ngo to [back v] layer\nforever\n    set size to ((aize) - (50)) %\n    set [ghost v] effect to (durchs)\nend\n\nwhen I start as a clone\nforever\n    go to (figur4 v)\nend\n\nwhen I start as a clone\nforever\n\nchange [ghost v] effect by (1)\n\nwhen flag clicked\nset [aize v] to [100]\n\nwhen flag clicked\nhide\n\nwhen I receive [fin v]\nrepeat (20)\n    change [durchs v] by (1)\nend\n\n@TimMcCool2\n\nwhen flag clicked\nset [ghost v] effect to (80)\nhide\n\n@//📊 Scratch Analytics by @TimMcCool2\n\ndefine Send Data (payload)\nset [☁ to_host v] to (payload)\n\ndefine Encode (input)\nset [//output v] to []\nset [i v] to [0]\nrepeat (length of (input))\n    change [i v] by (1)\n    switch costume to (join [=] (letter (i) of (input)))\n    set [//output v] to (join (//output) (costume [number v]))\nend\n\nwhen flag clicked\nwait (0.6) seconds\nEncode (join (username) (join [,] (join (current [hour v]) (join [,] []))))\nSend Data (//output)\n\n
a platformer by @TimMcCool. normal controls.\n\nspace to send lightflashes ( you don't need them) \n\nfullscreen is recommended