(Accepted!) Platformer! an FPC application
@Stage\n\nwhen flag clicked\nswitch backdrop to (background v)\nclear graphic effects\nhide variable [level.completed v]\nhide variable [level v]\nhide variable [clones v]\nif <(username) = [mathias1706]> then\n    wait (2) seconds\nelse\n    wait (0.5) seconds\nend\nrepeat (50)\n    change [brightness v] effect by (-2)\nend\nswitch backdrop to (1 v)\nrepeat (25)\n    change [brightness v] effect by (4)\nend\nwait (1) seconds\nshow\nforever\n    wait until <(Level.Completed) = [1]>\n    repeat (25)\n        change [brightness v] effect by (-4)\n    end\n    switch backdrop to ((Level) + (1))\n    wait (2) seconds\n    repeat (25)\n        change [brightness v] effect by (4)\n    end\nend\n\nwait until <(Level.Completed) = [1]>\nrepeat (25)\n    change [brightness v] effect by (-4)\nend\nswitch backdrop to ((Level) + (1))\nwait (2) seconds\nrepeat (25)\n    change [brightness v] effect by (4)\nend\n\n@Player\n\ndefine Controls - Left and Right\nset [x v] to ((X) * (0.7))\nif <key (left arrow v) pressed?> then\n    change [x v] by (-1.5)\nend\nif <key (right arrow v) pressed?> then\n    change [x v] by (1.5)\nend\n\ndefine Walk (direction) (speed) max steep (max steep)\nchange x by (speed)\nchange [frame v] by (([abs v] of (speed) ) / (8))\nset [slope v] to [0]\nGet Touching <(In.Platform) = [1]>\nrepeat until <<(Slope) = (max steep)> or <(Touch) = [0]>>\n    change y by (1)\n    change [slope v] by (1)\n    Get Touching <(In.Platform) = [1]>\nend\nif <(Slope) = (max steep)> then\n    change x by ((0) - (speed))\n    change y by ((0) - (Slope))\n    if <<(Touch) = [1]> and <(In.Platform) = [1]>> then\n        set [in.platform v] to [2]\n        Walk (direction) (speed) max steep (max steep)\n        if <(X) = [0]> then\n            set [in.platform v] to [1]\n        end\n    else\n        if <<key (up arrow v) pressed?> and <<([abs v] of (speed) ) > [3.5]> and <(Touch) > [1]>>> then\n            set [x v] to ((-1.2) * (speed))\n            set [y v] to [11]\n            set [falling v] to [6]\n            set [wall.jump v] to [15]\n        else\n            set [x v] to [0]\n        end\n    end\nend\n\ndefine Controls - Jump, Crouch\nif <key (up arrow v) pressed?> then\n    if <<(Jump.Key) = [0]> and <(Falling) < [3]>> then\n        start sound [Jump v]\n        set [y v] to [14]\n        set [falling v] to [6]\n        set [jump.key v] to [1]\n    end\nelse\n    set [jump.key v] to [0]\nend\n\ndefine Check Hit Ceiling / Floor <up?>\nGet Touching \nif <(Touch) = [0]> then\n    set [in.platform v] to [1]\nelse\n    if <<up?> and <(Touch) = [1]>> then\n        set [in.platform v] to [2]\n    end\nend\nrepeat until <(Touch) < (In.Platform)>\n    if <up?> then\n        change y by (-1)\n    else\n        change y by (1)\n        set [falling v] to [0]\n    end\n    Get Touching <not <up?>>\n    set [y v] to [0]\nend\n\ndefine Get Touching <check platform?>\nif <(Player Touché?) = [non]> then\n    if <touching color (#000000)?> then\n        set [touch v] to [9]\n    else\n        if <<check platform?> and <touching (platforms v)?>> then\n            set [touch v] to [1]\n        else\n            set [touch v] to [0]\n        end\n    end\nend\n\ndefine Gravity\nif <<(y) < [4]> or <key (up arrow v) pressed?>> then\n    change [y v] by (-1)\nelse\n    change [y v] by (-2)\nend\nchange y by (y)\nchange [falling v] by (1)\n\nwhen I start as a clone\nset size to (50) %\nswitch costume to (arrow1-a v)\nset [ghost v] effect to (100)\ngo to x: (225) y: (item (Level) of [y-2 v])\npoint in direction (90)\nhide\nforever\n    set size to (50) %\n    switch costume to (arrow1-a v)\n    go to x: (225) y: (item (Level) of [y-2 v])\n    repeat (10)\n        go to x: ((x position) - (1)) y: (y position)\n        wait (0) seconds\n        if <(Level) = [6]> then\n            hide\n            stop [this script v]\n        end\n    end\n    go to x: (215) y: (item (Level) of [y-2 v])\n    repeat (10)\n        go to x: ((x position) + (1)) y: (y position)\n        wait (0) seconds\n    end\nend\n\nwhen flag clicked\nhide\nset [ghost v] effect to (100)\nswitch costume to (player v)\nhide variable [x v]\nhide variable [player touché? v]\nhide variable [y v]\nhide variable [falling v]\nhide variable [slope v]\nhide variable [in.platform v]\nhide variable [touch v]\nhide variable [frame v]\nhide variable [jump.key v]\nhide variable [wall.jump v]\nhide variable [speed y v]\nshow list [y v]\ndelete (all) of [y v]\nrepeat (6)\n    insert [-100] at (last) of [y v] \nend\nshow list [y-2 v]\ndelete (all) of [y-2 v]\nrepeat (6)\n    insert [-105] at (last) of [y-2 v] \nend\nif <(username) = [mathias1706]> then\n    wait (3.5) seconds\nelse\n    wait (2) seconds\nend\nset [clones v] to [1]\nset [level v] to [1]\nset [level.completed v] to [0]\ncreate clone of (_myself_ v)\nset size to (50) %\ngo to x: (-217) y: (-110)\npoint in direction (90)\nshow\nswitch costume to (costume1 v)\nrepeat (25)\n    change [ghost v] effect by (-4)\nend\nforever\n    switch costume to (costume1 v)\n    go to [front v] layer\n    show\n    Controls - Jump, Crouch\n    Gravity\n    Check Hit Ceiling / Floor <(y) > [0]>\n    if <(Wall.Jump) > [0]> then\n        change [wall.jump v] by (-1)\n    else\n        Controls - Left and Right\n    end\n    if <(X) < [-0.5]> then\n        Walk (-90) (X) max steep (([ceiling v] of ([abs v] of ((X) * (1.3)) ) ) + (1))\n    else\n        if <(X) > [0.5]> then\n            Walk (90) (X) max steep (([ceiling v] of ([abs v] of ((X) * (1.3)) ) ) + (1))\n        else\n            set [frame v] to [0]\n        end\n    end\n    if <<(x position) > [210]> and <touching color (#ee2a7b)?>> then\n        wait (0.1) seconds\n        change [level v] by (1)\n        set [level.completed v] to [1]\n        set [clones v] to [0]\n        repeat (25)\n            change [brightness v] effect by (-4)\n        end\n        wait (2) seconds\n        go to x: (-225) y: (item (Level) of [y v])\n        point in direction (90)\n        set [level.completed v] to [0]\n        repeat (25)\n            change [brightness v] effect by (4)\n        end\n    end\n    if <(X) > [5]> then\n        set [x v] to [5]\n    end\n    if on edge, bounce\n    point in direction (90)\n    if <(Player Touché?) = [oui]> then\n        go [backward v] (3) layers\n        wait until <(Player Touché?) = [non]>\n        wait (0.7) seconds\n        go to [front v] layer\n    end\nend\n\nwhen I start as a clone\nforever\n    wait until <(Player Touché?) = [oui]>\n    wait until <(Player Touché?) = [non]>\n    clear graphic effects\n    set [ghost v] effect to (100)\n    wait (1.5) seconds\n    show\n    repeat (25)\n        change [ghost v] effect by (-4)\n    end\n    wait until <(Level.Completed) = [1]>\n    hide\n    if <(Level) = [6]> then\n        stop [this script v]\n    end\nend\n\n@Question\n\nwhen flag clicked\npoint in direction (90)\nset size to (100) %\nswitch costume to (1 v)\nclear graphic effects\nset [brightness v] effect to (-100)\nset [player touché? v] to [non]\ndelete all of [position x v]\ndelete all of [position y v]\ninsert [185] at (1) of [position x v] \ninsert [7] at (1) of [position y v] \ninsert [16] at (2) of [position x v] \ninsert [130] at (2) of [position y v] \ninsert [183] at (3) of [position x v] \ninsert [42] at (3) of [position y v] \ninsert [10] at (4) of [position x v] \ninsert [104] at (4) of [position y v] \ninsert [129] at (5) of [position x v] \ninsert [132] at (5) of [position y v] \ninsert [5] at (6) of [position x v] \ninsert [-101] at (6) of [position y v] \ngo to [back v] layer\nhide\nif <(username) = [mathias1706]> then\n    wait (3.6) seconds\nelse\n    wait (2.1) seconds\nend\ngo to x: (185) y: (7)\nshow\nrepeat (25)\n    change [brightness v] effect by (4)\nend\nforever\n    repeat until <(Level.Completed) = [1]>\n        wait (0.2) seconds\n        wait until <<touching (player v)?> or <(Level.Completed) = [1]>>\n        if <touching (player v)?> then\n            set [player touché? v] to [oui]\n        end\n        wait until <<(Player Touché?) = [non]> or <(Level.Completed) = [1]>>\n        wait until <<not <touching (player v)?>> or <(Level.Completed) = [1]>>\n    end\n    repeat (25)\n        change [brightness v] effect by (-4)\n    end\n    go to x: (item (Level) of [position x v]) y: (item (Level) of [position y v])\n    switch costume to (Level)\n    wait (2) seconds\n    repeat (25)\n        change [brightness v] effect by (4)\n    end\nend\n\nwhen flag clicked\nwait (3.6) seconds\nforever\n    set [ghost v] effect to (0)\n    repeat (20)\n        change [ghost v] effect by (1)\n    end\n    repeat (20)\n        change [ghost v] effect by (-1)\n    end\nend\n\n@Réponse\n\nwhen flag clicked\nset [level v] to [1]\nset size to (100) %\nclear graphic effects\ngo to [front v] layer\nhide\nwait (3) seconds\ncreate clone of (_myself_ v)\nforever\n    wait until <(Player Touché?) = [oui]>\n    if <(Level) = [6]> then\n        set size to (1) %\n        switch costume to (texte 6 v)\n        go to x: (0) y: (30)\n        go to [front v] layer\n        clear graphic effects\n        set [ghost v] effect to (100)\n        show\n        repeat (10)\n            change [ghost v] effect by (-10)\n        end\n        set size to (1) %\n        repeat until <(round (size)) = [100]>\n            change size by (((100) - (round (size))) / (9))\n        end\n        wait until <(Player Touché?) = [non]>\n        repeat (25)\n            change [ghost v] effect by (4)\n        end\n        hide\n    else\n        switch costume to (join [Texte ] (Level))\n        go to x: (0) y: (30)\n        go to [front v] layer\n        clear graphic effects\n        set [ghost v] effect to (100)\n        show\n        repeat (25)\n            change [ghost v] effect by (-4)\n        end\n        wait until <(Player Touché?) = [non]>\n        repeat (25)\n            change [ghost v] effect by (4)\n        end\n        hide\n    end\nend\n\nwhen I start as a clone\nset size to (100) %\nclear graphic effects\ngo to [front v] layer\nhide\nforever\n    wait until <(Player Touché?) = [oui]>\n    if <(Level) = [6]> then\n        switch costume to (arrière plan fin v)\n        go to x: (0) y: (30)\n        go to [front v] layer\n        go [backward v] (2) layers\n        clear graphic effects\n        set [ghost v] effect to (100)\n        show\n        repeat (20)\n            change [ghost v] effect by (-4)\n        end\n        wait until <(Player Touché?) = [?]>\n    else\n        switch costume to (arrière plan v)\n    end\n    go to x: (0) y: (30)\n    go to [front v] layer\n    go [backward v] (2) layers\n    clear graphic effects\n    set [ghost v] effect to (100)\n    show\n    repeat (20)\n        change [ghost v] effect by (-4)\n    end\n    wait until <key (space v) pressed?>\n    set [player touché? v] to [non]\n    repeat (20)\n        change [ghost v] effect by (4)\n    end\n    hide\nend\n\n@confetti\n\nwhen flag clicked\nwait (3) seconds\nhide\nwait until <<(Level) = [6]> and <(Player Touché?) = [oui]>>\nforever\n    create clone of (_myself_ v)\nend\n\nwhen I start as a clone\ngo to [front v] layer\nshow\ngo to x: (pick random (-233) to (233)) y: (180)\nswitch costume to (pick random (1) to (4))\nset [color v] effect to (pick random (0) to (100))\nset size to (pick random (100) to (125)) %\nglide (pick random (0.4) to (3)) secs to x: (x position) y: (-177)\ndelete this clone\n\nwhen flag clicked\nwait (3) seconds\nrepeat until <<(Level) = [6]> and <(Player Touché?) = [oui]>>\n    set volume to (30) %\n    start sound [Particles v]\n    reset timer\n    wait until <<(timer) > [225]> or <<(Level) = [6]> and <(Player Touché?) = [oui]>>>\nend\nwait until <(Player Touché?) = [oui]>\nrepeat (30)\n    change volume by (-1)\nend\nstop all sounds\nforever\n    set volume to (50) %\n    play sound [Celebration v] until done\nend\n\nwhen flag clicked\nwait (3) seconds\nhide\nwait until <<(Level) = [6]> and <(Player Touché?) = [oui]>>\nforever\n    create clone of (_myself_ v)\nend\n\nwhen flag clicked\nwait (3) seconds\nhide\nwait until <<(Level) = [6]> and <(Player Touché?) = [oui]>>\nforever\n    create clone of (_myself_ v)\nend\n\nwhen flag clicked\nwait (3) seconds\nhide\nwait until <<(Level) = [6]> and <(Player Touché?) = [oui]>>\nforever\n    create clone of (_myself_ v)\nend\n\nwhen flag clicked\nwait (3) seconds\nhide\nwait until <<(Level) = [6]> and <(Player Touché?) = [oui]>>\nforever\n    create clone of (_myself_ v)\nend\n\n@Scratch Cat\n\nwhen flag clicked\nhide\nwait (3) seconds\nwait until <<(Level) = [6]> and <(Player Touché?) = [oui]>>\ncreate clone of (_myself_ v)\ngo to x: (-122) y: (96)\npoint in direction (90)\nset size to (55) %\nclear graphic effects\nswitch costume to (1 v)\ngo to [front v] layer\nshow\nforever\n    wait (1) seconds\n    switch costume to (2 v)\n    wait (1) seconds\n    switch costume to (1 v)\nend\n\nwhen I start as a clone\ngo to x: (130) y: (96)\npoint in direction (90)\nset size to (55) %\nclear graphic effects\nswitch costume to (3 v)\ngo to [front v] layer\nshow\nforever\n    wait (1) seconds\n    switch costume to (4 v)\n    wait (1) seconds\n    switch costume to (3 v)\nend\n\n