La forêt aux nampignons || Un platformer
@Stage\n\nwhen flag clicked\nset [level v] to [0]\n\nwhen I receive [start v]\nforever\n    switch backdrop to (join [level ] (level))\nend\n\nwhen I receive [start v]\nforever\n    play sound [0097 v] until done\nend\n\nwhen I receive [start v]\nforever\n    play sound [Podington_Bear_-_Starling v] until done\nend\n\nwhen I receive [start v]\nset [level v] to [1]\n\n@Nampi\n\ndefine touch ground <up?>\nchange [falling v] by (1)\nrepeat until <<<not <touching color (#cd0000)?>> and <not <touching color (#cc6900)?>>> and <<not <touching color (#ccaa00)?>> and <not <touching color (#6b4e38)?>>>>\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    set [v - y v] to [0]\nend\n\nwhen flag clicked\nhide\n\ndefine walk\nset rotation style [left-right v]\nif <<key (right arrow v) pressed?> or <(right arrow) = [1]>> then\n    set [pressed arrow v] to [right]\n    point in direction (90)\n    set [v - x v] to [5]\nend\nif <<key (left arrow v) pressed?> or <(left arrow) = [1]>> then\n    set [pressed arrow v] to [left]\n    point in direction (-90)\n    set [v - x v] to [-5]\nend\nchange x by (v - x)\nchange [v - x v] by ((0) - ((v - x) / (5)))\nset [slope v] to [0]\nrepeat until <<(slope) = [8]> or <<<not <touching color (#cd0000)?>> and <not <touching color (#cc6900)?>>> and <<not <touching color (#ccaa00)?>> and <not <touching color (#6b4e38)?>>>>>\n    change y by (1)\n    change [slope v] by (1)\nend\nif <(slope) = [8]> then\n    set [v - x v] to [0]\n    if <(pressed arrow) = [right]> then\n        change x by (-5)\n    end\n    if <(pressed arrow) = [left]> then\n        change x by (5)\n    end\n    change y by ((0) - (slope))\nend\n\nwhen I receive [start v]\nshow\n\nwhen I receive [start v]\ngo to x: (-200) y: (-30)\nforever\n    if <touching (level end v)?> then\n        change [level v] by (1)\n        go to x: (-200) y: (-30)\n    end\nend\n\nwhen I receive [start v]\nforever\n    if <color (#bb7d4b) is touching (#69583f)?> then\n        set [v - y v] to [20]\n        wait until <not <color (#bb7d4b) is touching (#69583f)?>>\n    end\nend\n\nwhen I receive [start v]\nforever\n    if <<color (#bb7d4b) is touching (#862121)?> or <(y position) < [-180]>> then\n        set [v - x v] to [0]\n        set [v - y v] to [0]\n        go to x: (-200) y: (-30)\n        wait until <<not <color (#bb7d4b) is touching (#862121)?>> and <not <(y position) = [-180]>>>\n    end\nend\n\nwhen I receive [start v]\nforever\n    if <<<<key (up arrow v) pressed?> or <key (space v) pressed?>> or <(jump button) = [1]>> and <(falling) < [3]>> then\n        set [v - y v] to [12]\n    end\nend\n\nwhen I receive [start v]\nset [v - y v] to [0]\nforever\n    switch costume to (collisions v)\n    set [touching ground v] to [0]\n    if <<(v - y) < [4]> or <<<key (up arrow v) pressed?> or <key (space v) pressed?>> or <(jump button) = [1]>>> then\n        change [v - y v] by (-1)\n    else\n        change [v - y v] by (-2)\n    end\n    change y by (v - y)\n    touch ground <(v - y) > [0]>\n    if <(v - y) > [1]> then\n        switch costume to (costume2 v)\n    else\n        if <(v - y) < [-1]> then\n            switch costume to (costume3 v)\n        else\n            switch costume to (costume1 v)\n        end\n    end\nend\n\nwhen I receive [start v]\nset [v - x v] to [0]\nforever\n    set [pressed arrow v] to [0]\n    walk\nend\n\nwhen I receive [jump v]\nset [jump button v] to [1]\nwait (0.01) seconds\nset [jump button v] to [0]\n\nwhen flag clicked\nset [jump button v] to [0]\nset [left arrow v] to [0]\nset [right arrow v] to [0]\n\nwhen I receive [left v]\nset [left arrow v] to [1]\nwait (0.01) seconds\nset [left arrow v] to [0]\n\nwhen I receive [right v]\nset [right arrow v] to [1]\nwait (0.01) seconds\nset [right arrow v] to [0]\n\nset [level v] to [1]\n\nchange [level v] by (1)\n\n@Level end\n\nwhen flag clicked\nhide\n\nwhen I receive [start v]\nforever\n    if <(level) < [15]> then\n        show\n    else\n        hide\n    end\nend\n\n@Leaves\n\nwhen flag clicked\nhide\n\nwhen I start as a clone\nshow\nset [ghost v] effect to (25)\nrepeat (100)\n    change y by (-1)\n    change [ghost v] effect by (0.75)\nend\ndelete this clone\n\nwhen I receive [start v]\nset rotation style [left-right v]\nforever\n    switch costume to (pick random (1) to (2))\n    point in direction (pick random (-90) to (90))\n    go to x: (pick random (-240) to (240)) y: (pick random (0) to (150))\n    create clone of (_myself_ v)\n    wait (0.5) seconds\nend\n\n@Thumbail\n\nwhen flag clicked\nhide\n\n@intro\n\ndefine Intro\nset [intro end v] to [0]\nset [zoom v] to [0]\nhide\nset [clone v] to [1]\ncreate clone of (_myself_ v)\nwait (0.5) seconds\nset [clone v] to [2]\ncreate clone of (_myself_ v)\n\nwhen I start as a clone\nset [clone # v] to (clone)\nshow\nif <(clone #) = [1]> then\n    point in direction (90)\n    go to x: (0) y: (0)\n    set size to (100) %\n    switch costume to (background 1 v)\n    go to [back v] layer\n    start sound [KK_Island v]\nend\nif <(clone #) = [2]> then\n    point in direction (90)\n    go to x: (10) y: (-10)\n    set size to (50) %\n    switch costume to (circle v)\n    go to [front v] layer\n    set [ghost v] effect to (100)\n    show\n    repeat (20)\n        change [ghost v] effect by (-5)\n    end\n    set [clone v] to [3]\n    create clone of (_myself_ v)\n    glide (0.1) secs to x: (0) y: (0)\n    wait (0.1) seconds\n    set [clone v] to [4]\n    create clone of (_myself_ v)\n    wait (0.25) seconds\n    start sound [smw_fireball v]\nend\nif <(clone #) = [3]> then\n    point in direction (90)\n    go to x: (10) y: (-10)\n    set [ghost v] effect to (25)\n    set size to (50) %\n    switch costume to (shadow v)\n    go to [front v] layer\n    go [backward v] (1) layers\n    show\nend\nif <(clone #) = [4]> then\n    point in direction (180)\n    go to x: (0) y: (0)\n    set size to (50) %\n    set [ghost v] effect to (100)\n    switch costume to (lezard v)\n    go to [front v] layer\n    show\n    repeat (20)\n        change [ghost v] effect by (-5)\n    end\nend\nif <(clone #) = [5]> then\n    point in direction (90)\n    go to x: (0) y: (0)\n    set size to (100) %\n    set [ghost v] effect to (100)\n    switch costume to (samuelbenoit v)\n    go to [front v] layer\n    wait (0.5) seconds\n    show\n    repeat (20)\n        change [ghost v] effect by (-5)\n    end\n    wait (0.25) seconds\n    set [intro end v] to [1]\n    wait (1) seconds\n    repeat (20)\n        change [ghost v] effect by (5)\n    end\n    delete this clone\nend\n\nwhen flag clicked\nIntro\n\nwhen I start as a clone\nif <(clone #) = [4]> then\n    repeat (10)\n        turn left (9) degrees\n    end\n    wait (0.5) seconds\n    set [zoom v] to [1]\nend\n\nwhen I start as a clone\nif <(clone #) = [2]> then\n    wait until <(zoom) = [1]>\n    repeat (40)\n        switch costume to (size hack v)\n        change size by (zoom speed)\n        switch costume to (circle v)\n    end\n    wait until <(zoom) = [0]>\n    delete this clone\nend\nif <(clone #) = [3]> then\n    wait until <(zoom) = [1]>\n    repeat (40)\n        switch costume to (size hack v)\n        change size by (zoom speed)\n        switch costume to (shadow v)\n    end\n    wait until <(zoom) = [0]>\n    delete this clone\nend\nif <(clone #) = [4]> then\n    wait until <(zoom) = [1]>\n    set [zoom speed v] to [0]\n    repeat (40)\n        switch costume to (size hack v)\n        change size by (zoom speed)\n        switch costume to (lezard v)\n        change [zoom speed v] by (0.5)\n    end\n    set [zoom v] to [0]\n    delete this clone\nend\nif <(clone #) = [1]> then\n    wait until <(zoom) = [1]>\n    wait until <(zoom) = [0]>\n    switch costume to (background 2 v)\n    set [clone v] to [5]\n    create clone of (_myself_ v)\nend\n\nwait until <(intro end) = [1]>\nwait (1) seconds\nrepeat (20)\n    change [ghost v] effect by (5)\nend\n\nwhen I start as a clone\nif <(clone #) = [1]> then\n    wait until <(intro end) = [1]>\n    wait (1) seconds\n    repeat (100)\n        change volume by (-1)\n    end\n    stop all sounds\n    broadcast (START v)\n    delete this clone\nend\n\nwhen I start as a clone\nforever\n    if <(intro end) = [2]> then\n        stop all sounds\n        delete this clone\n    end\nend\n\nwhen flag clicked\nforever\n    if <key (space v) pressed?> then\n        set [intro end v] to [2]\n        broadcast (START v)\n        stop [this script v]\n    end\nend\n\n@left arrow\n\nwhen flag clicked\nhide\n\nwhen I receive [start v]\nshow\nforever\n    if <<touching (mouse-pointer v)?> and <mouse down?>> then\n        set [ghost v] effect to (40)\n        broadcast (left v)\n    else\n        set [ghost v] effect to (50)\n    end\nend\n\n@right arrow\n\nwhen flag clicked\nhide\n\nwhen I receive [start v]\nshow\nforever\n    if <<touching (mouse-pointer v)?> and <mouse down?>> then\n        set [ghost v] effect to (40)\n        broadcast (right v)\n    else\n        set [ghost v] effect to (50)\n    end\nend\n\n@jump\n\nwhen flag clicked\nhide\n\nwhen I receive [start v]\nshow\nforever\n    if <<touching (mouse-pointer v)?> and <mouse down?>> then\n        set [ghost v] effect to (40)\n        broadcast (jump v)\n    else\n        set [ghost v] effect to (50)\n    end\nend\n\n
Flèches gauche et droite pour se déplacer.\nFlèche du haut / Espace pour sauter.\n\nUne fois que tu as fini le jeu, il faut cliquer sur le petit coeur et la petite étoile au-dessous de l'écran du jeu, puis sur mon profil et enfin "Suivre". x)\n\nLeft and right arrows to move.\nUp arrow / Space to jump.\n\nOnce you have finished the game, click on the little heart and the little star below the game screen, then on my profile and finally "Follow". x)