Farmer Worlds 2 | The Diamonds World | Platformer | #Games #All


@Stage\n\nwhen flag clicked\nforever\n    if <<(LV) = [1]> or <(LV) = [21]>> then\n        switch backdrop to (main v)\n    else\n        switch backdrop to (other v)\n    end\nend\n\nwhen flag clicked\nforever\n    play sound [Popsicle v] until done\nend\n\n@player\n\nwhen I receive [game v]\nforever\n    if <<[240] < (x position)> and <(dead?) = [0]>> then\n        broadcast (NAXT LEVEL v)\n        change [lv v] by (1)\n        Reset || Madrid2030\n    end\nend\n\nwhen flag clicked\nhide variable [xv v]\nhide variable [dead? v]\nhide variable [lv v]\nhide variable [yv v]\nhide\n\nwhen I receive [game v]\nset [dead? v] to [0]\nset [lv v] to [1]\nset size to (20) %\nReset || Madrid2030\nforever\n    go to [front v] layer\n    if <<<<key (right arrow v) pressed?> or <key (d v) pressed?>> or <<mouse down?> and <(mouse x) > (x position)>>> and <(dead?) = [0]>> then\n        switch costume to (1 v)\n        change [xv v] by (1)\n    end\n    if <<<<key (left arrow v) pressed?> or <key (a v) pressed?>> or <<mouse down?> and <(mouse x) < (x position)>>> and <(dead?) = [0]>> then\n        switch costume to (2 v)\n        change [xv v] by (-1)\n    end\n    set [xv v] to ((Xv) * (.9))\n    change x by (Xv)\n    if <touching (ground v)?> then\n        change y by (2)\n        if <touching (ground v)?> then\n            change y by (2)\n        end\n        if <touching (ground v)?> then\n            change y by (2)\n            if <touching (ground v)?> then\n                change y by (2)\n                if <touching (ground v)?> then\n                    change y by (2)\n                    if <touching (ground v)?> then\n                        change x by ((Xv) * (-2))\n                        change y by (-5)\n                        if <<key (up arrow v) pressed?> or <<key (w v) pressed?> or <<mouse down?> and <(mouse y) > ((y position) + (10))>>>> then\n                            if <(Xv) > [0]> then\n                                set [xv v] to [-5]\n                            else\n                                set [xv v] to [5]\n                            end\n                            set [yv v] to [13]\n                        else\n                            set [xv v] to [0]\n                        end\n                    end\n                end\n            end\n        end\n    end\n    change [yv v] by (-0.8)\n    change y by (Yv)\n    if <touching (ground v)?> then\n        change y by ((Yv) * (-1))\n        set [yv v] to [0]\n    end\n    change y by (-1)\n    if <touching (ground v)?> then\n        if <<key (up arrow v) pressed?> or <<key (w v) pressed?> or <<mouse down?> and <(mouse y) > ((y position) + (10))>>>> then\n            set [yv v] to [12]\n        end\n    end\n    change y by (1)\n    if <<touching (spike v)?> or <touching (acid v)?>> then\n        Dead || Madrid2030\n    end\n    if <(y position) < [-180]> then\n        Dead || Madrid2030\n    end\n    if <touching (bouncy v)?> then\n        start sound [Jump v]\n        set [yv v] to [20]\n    end\nend\n\nwhen I receive [game v]\nset [lv v] to [1]\nforever\n    create clone of (_myself_ v)\nend\n\ndefine Reset || Madrid2030\nclear graphic effects\npoint in direction (90)\ngo to x: (-201) y: (30)\nswitch costume to (1 v)\nset [dead? v] to [0]\nset [xv v] to [0]\nset [yv v] to [0]\nset size to (20) %\nshow\n\ndefine Dead || Madrid2030\nset [dead? v] to [1]\nrepeat (25)\n    change [ghost v] effect by (4)\n    change y by (4)\n    turn right (4) degrees\nend\nReset || Madrid2030\n\nwhen I start as a clone\nswitch costume to (3 v)\nrepeat (10)\n    change [ghost v] effect by (10)\n    change size by (-1.5)\nend\ndelete this clone\n\n@ground\n\nwhen I receive [game v]\ngo to [front v] layer\nshow\nforever\n    switch costume to (LV)\nend\n\nwhen I receive [game v]\nshow variable [time v]\nset [time v] to [0]\nrepeat until <(LV) = [21]>\n    wait (1) seconds\n    change [time v] by (1)\nend\n\nwhen flag clicked\nhide variable [time v]\n\n@Story\n\nwhen flag clicked\nhide variable [time v]\nshow\ngo to [front v] layer\nswitch costume to (costume1 v)\n\nwhen this sprite clicked\nif <not <(costume [number v]) = [4]>> then\n    repeat (10)\n        change [pixelate v] effect by (10)\n        change [brightness v] effect by (10)\n    end\n    next costume\n    repeat (10)\n        change [pixelate v] effect by (-10)\n        change [brightness v] effect by (-10)\n    end\nelse\n    repeat (10)\n        change [pixelate v] effect by (10)\n        change [brightness v] effect by (10)\n    end\n    broadcast (game v)\n    hide\nend\n\n@acid\n\nwhen flag clicked\nhide\n\nwhen I receive [game v]\ngo to [back v] layer\nshow\nforever\n    switch costume to (LV)\nend\n\nwhen I receive [game v]\nforever\n    set y to (([cos v] of ((timer) * (150)) ) * (7))\nend\n\n@bouncy\n\nwhen I receive [game v]\nshow\nforever\n    switch costume to (LV)\nend\n\nwhen flag clicked\nhide\n\n@spike\n\nwhen I receive [game v]\nshow\ngo to [front v] layer\nforever\n    switch costume to (LV)\nend\n\nwhen flag clicked\nhide\n\n@Text\n\nwhen flag clicked\nhide\n\nwhen I receive [game v]\nshow\nforever\n    go to [front v] layer\n    switch costume to (LV)\nend\n\n@TB\n\nwhen flag clicked\nset [lv v] to [1]\nforever\n    set [ghost v] effect to (100)\n    show\n    go to [front v] layer\nend\n\n