Ultimate jump ( a platformer )
@Stage\n\nwhen flag clicked\nbroadcast (GO v)\n\nwhen I receive [go v]\nbroadcast (Fin de l'inrtoduction v)\nbroadcast (fin de l'introduction v)\n\n@player2\n\nwhen flag clicked\nforever\n    play sound [level2 v] until done\nend\n\nwhen flag clicked\nset [vitesse v] to [0]\nset [vitesse verticale v] to [0]\ndelete this clone\n\nwhen flag clicked\nhide variable [double jump v]\npoint in direction (90)\nforever\n    change y by (vitesse verticale)\n    if <touching (levels v)?> then\n        set [vitesse verticale v] to [0]\n    end\n    if <<<key (space v) pressed?> or <key (up arrow v) pressed?>> and <touching (levels v)?>> then\n        set [vitesse verticale v] to [22]\n        broadcast (Jump v)\n    else\n        if <not <touching (levels v)?>> then\n            change [vitesse verticale v] by (-1)\n        end\n    end\n    if <touching (levels v)?> then\n        change y by (8)\n    end\n    if <touching (levels v)?> then\n        change y by (8)\n    end\n    if <touching (levels v)?> then\n        change y by (8)\n    end\n    if <touching (levels v)?> then\n        change y by (8)\n    end\n    change y by (-8)\n    if <touching (levels v)?> then\n        change y by (2)\n    end\n    if <touching (levels v)?> then\n        change y by (2)\n    end\n    if <touching (levels v)?> then\n        change y by (2)\n    end\n    if <touching (levels v)?> then\n        change y by (2)\n    end\n    change y by (-2)\n    if <touching (levels v)?> then\n        change y by (1)\n    end\n    if <touching (levels v)?> then\n        change y by (1)\n    end\nend\n\nwhen I receive [début v]\ngo to x: (-160) y: (-10)\nwait until <[-179] > (y position)>\nbroadcast (début v)\nbroadcast (lose v)\n\nwhen I receive [début v]\nset size to (100) %\nset [vitesse verticale v] to [10]\nset [vitesse v] to [0]\nforever\n    if <key (right arrow v) pressed?> then\n        change [vitesse v] by (2)\n    end\n    if <key (left arrow v) pressed?> then\n        change [vitesse v] by (-2)\n    end\n    if <(vitesse) > [8]> then\n        set [vitesse v] to [8]\n    end\n    if <(vitesse) < [-8]> then\n        set [vitesse v] to [-8]\n    end\n    if <<(vitesse) > [0]> and <(à droite) = [0]>> then\n        change x by (vitesse)\n        change [vitesse v] by (-1)\n    end\n    if <<(vitesse) < [0]> and <(à gauche) = [0]>> then\n        change x by (vitesse)\n        change [vitesse v] by (1)\n    end\nend\n\nwhen I receive [début v]\nwait until <(x position) > [235]>\ngo to x: (-160) y: (-50)\nbroadcast (next level v)\nbroadcast (début v)\n\nwhen I receive [fin de l'inrtoduction v]\nswitch costume to (costume1 v)\nbroadcast (début v)\nshow\n\nwhen flag clicked\nhide\n\nwhen flag clicked\ngo to x: (-12) y: (-2)\nforever\n    wait until <touching (spikes v)?>\n    broadcast (début v)\n    broadcast (lose v)\nend\n\nwhen flag clicked\nhide\nforever\n    if <key (right arrow v) pressed?> then\n        switch costume to (droite v)\n    end\n    if <key (left arrow v) pressed?> then\n        switch costume to (gauche v)\n    end\nend\n\nwhen flag clicked\nforever\n    if <touching (levels v)?> then\n        set [double jump v] to [0]\n    end\nend\n\nwhen I receive [jump v]\npoint in direction (90)\nwait (0.2) seconds\nwait until <<key (space v) pressed?> or <key (up arrow v) pressed?>>\nset [vitesse verticale v] to [24]\nif <not <touching (levels v)?>> then\n    repeat (16)\n        if <(costume [number v]) = [1]> then\n            turn right (22.5) degrees\n        else\n            turn left (22.5) degrees\n        end\n        create clone of (_myself_ v)\n    end\n    point in direction (90)\nend\n\nwhen I start as a clone\nset [ghost v] effect to (0)\nrepeat (20)\n    change [ghost v] effect by (5)\n    change size by (-5)\nend\ndelete this clone\n\n@levels\n\nwhen flag clicked\ngo to x: (0) y: (0)\nswitch costume to (1 v)\nhide\n\nwhen I receive [next level v]\nnext costume\n\nwhen flag clicked\nrepeat (10)\n    go to [back v] layer\nend\n\nwhen I receive [fin de l'inrtoduction v]\ngo to [front v] layer\nshow\n\nwhen flag clicked\nforever\n    set [level v] to (costume [number v])\nend\n\nwhen I receive [caché v]\nhide\n\n@player 2\n\nwhen flag clicked\nhide\nwait (0.2) seconds\nset [clone v] to [1]\ncreate clone of (_myself_ v)\nwait (0.2) seconds\nset [clone v] to [2]\ncreate clone of (_myself_ v)\n\nwhen I start as a clone\nif <(clone) = [2]> then\n    forever\n        go to (player2 v)\n        change x by (-13)\n        change y by (2)\n        if <touching (levels v)?> then\n            set [vitesse v] to [3]\n            set [à gauche v] to [1]\n        else\n            set [à gauche v] to [0]\n        end\n    end\nend\n\nwhen I start as a clone\nif <(clone) = [1]> then\n    forever\n        go to (player2 v)\n        change x by (13)\n        change y by (2)\n        if <touching (levels v)?> then\n            set [vitesse v] to [-3]\n            set [à droite v] to [1]\n        else\n            set [à droite v] to [0]\n        end\n    end\nend\n\nwhen I start as a clone\nshow\nset [ghost v] effect to (100)\n\nwhen I receive [caché v]\nhide\n\n@spikes\n\nwhen I receive [next level v]\nnext costume\n\nwhen flag clicked\ngo to x: (0) y: (0)\nswitch costume to (1 v)\nshow\n\nwhen I receive [caché v]\nhide\n\n@jump V\n\nwhen I receive [next level v]\nchange [level v] by (1)\n\nwhen flag clicked\ngo to x: (0) y: (0)\nswitch costume to (1 v)\n\nwhen flag clicked\nhide\nswitch costume to (costume1 v)\n\nwhen I receive [fin de l'inrtoduction v]\ngo to [front v] layer\ncreate clone of (_myself_ v)\n\nwhen flag clicked\nset [level v] to [1]\n\nwhen I start as a clone\nshow\nswitch costume to (costume1 v)\nforever\n    wait until <touching (player 2 v)?>\n    go to [front v] layer\n    set [vitesse verticale v] to [30]\n    broadcast (Jump v)\n    switch costume to (costume1 v)\n    repeat (10)\n        next costume\n        if <(vitesse verticale) > [38]> then\n            set [vitesse verticale v] to [38]\n        end\n    end\nend\n\nwhen I start as a clone\nforever\n    go to [front v] layer\n    if <(level) = [1]> then\n        hide\n    end\n    if <(level) = [2]> then\n        hide\n    end\n    if <(level) = [3]> then\n        hide\n    end\n    if <(level) = [4]> then\n        hide\n    end\n    if <(level) = [5]> then\n        show\n        go to x: (19) y: (-115)\n    end\n    if <(level) = [6]> then\n        hide\n    end\n    if <(level) = [7]> then\n        hide\n    end\n    if <(level) = [8]> then\n        show\n        go to x: (-162) y: (-104)\n    end\n    if <(level) = [9]> then\n        show\n        go to x: (-162) y: (-104)\n    end\n    if <(level) = [10]> then\n        go to x: (-168) y: (-118)\n        set size to (150) %\n    end\n    if <(level) = [11]> then\n        set size to (200) %\n        hide\n    end\n    if <(level) = [12]> then\n        show\n        go to x: (6) y: (-116)\n    end\n    if <(level) = [13]> then\n        go to x: (-145) y: (-114)\n    end\nend\n\nwhen I receive [caché v]\nhide\n\n@Sprite3\n\nwhen flag clicked\nshow\nset [ghost v] effect to (0)\ngo to x: (0) y: (0)\nrepeat (20)\n    change [ghost v] effect by (5)\n    go to [front v] layer\nend\nforever\n    go to [front v] layer\nend\n\nwhen [a v] key pressed\nbroadcast (caché v)\n\nwhen I receive [caché v]\nstop [all v]\n\n@Sprite1\n\nwhen flag clicked\ngo to x: (-147) y: (-158)\nhide\n\nwhen I receive [fin de l'inrtoduction v]\nshow\nrepeat (10)\n    go to [front v] layer\nend\n\nwhen this sprite clicked\nif <not <(level) = [14]>> then\n    broadcast (next level v)\n    broadcast (début v)\nend\nrepeat (5)\n    change [color v] effect by (20)\nend\nrepeat (5)\n    change [color v] effect by (-20)\nend\n\nwhen I receive [caché v]\nhide\n\n@Sprite4\n\nwhen flag clicked\ngo to x: (-199) y: (-158)\nhide\n\nwhen this sprite clicked\nbroadcast (début v)\nrepeat (5)\n    change [color v] effect by (20)\nend\nrepeat (5)\n    change [color v] effect by (-20)\nend\n\nwhen I receive [fin de l'inrtoduction v]\nshow\nrepeat (10)\n    go to [front v] layer\nend\n\nwhen I receive [caché v]\nhide\n\n@Sprite5\n\nwhen flag clicked\nhide\nswitch costume to (costume1 v)\ngo to x: (0) y: (0)\n\nwhen I receive [lose v]\nswitch costume to (costume1 v)\nset [ghost v] effect to (100)\nshow\nrepeat (5)\n    go to [front v] layer\n    change [ghost v] effect by (-20)\nend\nbroadcast (début v)\nwait (0.1) seconds\nrepeat (5)\n    go to [front v] layer\n    change [ghost v] effect by (20)\nend\n\nwhen I receive [next level v]\ngo to [front v] layer\nswitch costume to (costume2 v)\nset [ghost v] effect to (100)\nshow\nrepeat (5)\n    go to [front v] layer\n    change [ghost v] effect by (-20)\nend\nwait (0.1) seconds\nrepeat (5)\n    change [ghost v] effect by (20)\n    go to [front v] layer\nend\n\nwhen I receive [caché v]\nhide\n\n
-----------------------------------------------------------------\nMy first plateformer is almost out...\nArrow key to move.\nSpace to jump ( double jump )\nBeat all the levels.\n-----------------------------------------------------------------