°Animation Platformer° #games
@Stage\n\nwhen flag clicked\nswitch backdrop to (platformer v)\nwait (1) seconds\nforever\n    next backdrop\n    wait (2) seconds\nend\n\nwhen flag clicked\nforever\n    play sound [SON v] until done\nend\n\n@Player\n\nwhen flag clicked\nhide\nwait (1) seconds\nswitch costume to (2 v)\nbroadcast (Green Flag v) and wait\nbroadcast (Play Game v) and wait\n\nwhen I receive [green flag v]\nhide\ngo to [front v] layer\n\nwhen I receive [play game v]\nshow\nset [level v] to [1]\nforever\n    broadcast (Reset v) and wait\n    broadcast (Setup v) and wait\n    Game On\n    repeat until <(Exit) > [50]>\n        Tick\n        broadcast (Tick v) and wait\n    end\n    Game Die\n    set [ghost v] effect to (0)\nend\n\ndefine Game On\nset [x v] to [0]\nset [y v] to [0]\nset [sy v] to [0]\nset [in air v] to [0]\nset [exit v] to []\nshow\n\ndefine Tick\nif <key (left arrow v) pressed?> then\n    Change Player x by [-8]\n    switch costume to (1 v)\nend\nif <key (right arrow v) pressed?> then\n    Change Player x by [8]\n    switch costume to (2 v)\nend\nif <<key (up arrow v) pressed?> or <key (space v) pressed?>> then\n    if <(In air) < [4]> then\n        change [sy v] by (6.5)\n    end\nend\nchange [sy v] by (-2)\nChange Player y by (sy)\nset [scroll x v] to (x)\nPosition\nif <(y) < [-195]> then\n    switch costume to (2 v)\n    set [exit v] to [die]\nend\n\ndefine Change Player y by (sy)\nchange [y v] by (sy)\nchange [in air v] by (1)\nPosition\nTest - Die\nrepeat until <not <touching (platforms v)?>>\n    if <(sy) > [0]> then\n        change [y v] by (-1)\n    else\n        change [y v] by (1)\n        set [in air v] to [0]\n    end\n    Position\n    set [sy v] to [0]\nend\n\ndefine Position\ngo to x: ((x) - (Scroll x)) y: ((y) - (Scroll y))\n\ndefine Change Player x by (sx)\nchange [x v] by (sx)\nPosition\nTest - Die\nif <touching (platforms v)?> then\n    repeat (12)\n        change [y v] by (1)\n        Position\n        if <not <touching (platforms v)?>> then\n            stop [this script v]\n        end\n    end\n    change [y v] by (-12)\n    repeat until <not <touching (platforms v)?>>\n        if <(sx) > [0]> then\n            change [x v] by (-1)\n        else\n            change [x v] by (1)\n        end\n        Position\n    end\nend\n\ndefine Game Die\nset [exit v] to []\nrepeat (25)\n    change [ghost v] effect by (4)\nend\n\ndefine Test - Die\nif <touching color (#ff2d21)?> then\n    set [exit v] to [die]\nend\n\n@Platforms\n\nwhen I receive [green flag v]\nshow\n\nwhen I receive [tick v]\nposition ((x) - (Scroll x)) ((y) - (Scroll y))\n\nwhen I receive [setup v]\nset [x v] to [0]\nset [y v] to [0]\nswitch costume to (0 1 v)\ncreate clone of (_myself_ v)\nchange [x v] by (600)\nnext costume\ncreate clone of (_myself_ v)\nchange [x v] by (565)\nnext costume\ncreate clone of (_myself_ v)\nchange [x v] by (550)\nnext costume\ncreate clone of (_myself_ v)\nchange [x v] by (575)\nnext costume\ncreate clone of (_myself_ v)\nchange [x v] by (505)\nnext costume\ncreate clone of (_myself_ v)\nchange [x v] by (400)\nnext costume\ncreate clone of (_myself_ v)\nchange [x v] by (500)\nnext costume\n\ndefine position (x) (y)\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\nelse\n    hide\nend\n\nwhen I receive [reset v]\ndelete this clone\n\nwhen flag clicked\ndelete this clone\n\n
Bonjour, voilà mon troisième platformer !!\nMerci à kodiak77-77 pour le codage de l'arrière-plan qui bouge et le codage du sprite !!\nBon il est pas génial ... Mais je suis plus forte pour faire des animations !\nC'est un peu court, mais bon je savais pas quoi faire d'autres ...\n#games #Charles2199\nLike et fave de @Soroban08