World of Colors - A Scrolling Platformer  #games #challenging #fun #platformer 


@Stage\n\nwhen flag clicked\nbroadcast (Engine_Start v)\nforever\n    play sound [Restart - Subtact v] until done\nend\n\n@Player\n\nwhen I receive [engine_tick v]\nswitch costume to (PlayerLastC)\nif <(PlayerY) > [0]> then\n    switch costume to (jump v)\nelse\n    if <(PlayerY) < [0]> then\n        switch costume to (all v)\n    else\n        if <<<key (left arrow v) pressed?> or <key (a v) pressed?>> or <<key (right arrow v) pressed?> or <key (d v) pressed?>>> then\n            if <<[1] < (costume [number v])> and <[10] > (costume [number v])>> then\n                next costume\n            else\n                switch costume to (walk1 v)\n            end\n        else\n            switch costume to (stand v)\n        end\n    end\nend\nset [playerlastc v] to (costume [number v])\n\nwhen I receive [engine_start v]\nshow\npoint in direction (90)\ngo to x: (0) y: (90)\nset rotation style [left-right v]\ngo to [back v] layer\nset size to (80) %\nset [playerx v] to [0]\nset [playery v] to [-3]\nforever\n    set rotation style [all around v]\n    switch costume to (hitbox v)\n    change [playery v] by (-1)\n    if <<key (left arrow v) pressed?> or <key (a v) pressed?>> then\n        point in direction (-90)\n        change [playerx v] by (-1)\n    end\n    if <<key (right arrow v) pressed?> or <key (d v) pressed?>> then\n        point in direction (90)\n        change [playerx v] by (1)\n    end\n    set [playerx v] to ((PlayerX) * (0.9))\n    if <touching (ground v)?> then\n        set [playery v] to [0]\n        change y by (1)\n    end\n    if <touching (ground v)?> then\n        set [playery v] to [0]\n        change y by (1)\n    end\n    if <touching (ground v)?> then\n        set [playery v] to [0]\n        change y by (1)\n    end\n    if <touching (ground v)?> then\n        set [playery v] to [0]\n        change y by (1)\n    end\n    if <touching (ground v)?> then\n        change y by (-4)\n        change x by ((PlayerX) * (-1))\n        if <<key (up arrow v) pressed?> or <key (w v) pressed?>> then\n            set [playery v] to [15]\n            if <([abs v] of (PlayerX) ) = (PlayerX)> then\n                set [playerx v] to [-10]\n            else\n                set [playerx v] to [10]\n            end\n        else\n            set [playerx v] to [0]\n        end\n    end\n    change y by (PlayerY)\n    if <touching (ground v)?> then\n        change y by ((PlayerY) - ((PlayerY) * (2)))\n        set [playery v] to [0]\n    end\n    change y by (-1)\n    if <<<key (up arrow v) pressed?> or <key (w v) pressed?>> and <touching (ground v)?>> then\n        set [playery v] to [15]\n    end\n    change y by (1)\n    set x to (0)\n    set [all_sprite v] to (PlayerX)\n    if <<<<touching (_edge_ v)?> and <[-10] > (y position)>> or <key (r v) pressed?>> or <touching color (#686868)?>> then\n        switch costume to (stand v)\n        wait until <not <key (r v) pressed?>>\n        set [playerx v] to [0]\n        set [playery v] to [-3]\n        set [all_sprite v] to [-300]\n        point in direction (90)\n        set y to (0)\n    end\n    broadcast (engine_tick v) and wait\nend\n\n@Cover\n\nwhen flag clicked\ngo to [front v] layer\nset size to (100) %\nshow\nset [ghost v] effect to (0)\nwait (2) seconds\nrepeat (10)\n    change size by (10)\n    change [ghost v] effect by (10)\nend\nhide\n\nforever\n\n@Ground\n\nwhen I receive [engine_tick v]\nshow\nset [scrollx v] to ((ScrollX) + (ALL_SPRITE))\nif <(ScrollX) < [0]> then\n    set [scrollx v] to [0]\nend\ngo to x: ((PositionX) - (ScrollX)) y: (0)\n\nwhen I receive [engine_start v]\nhide\nset [positionx v] to [0]\nset [scrollx v] to [0]\nswitch costume to (part1 v)\nset [numberofparts v] to [57]\nrepeat ((NumberOfParts) - (1))\n    create clone of (_myself_ v)\n    next costume\n    change [positionx v] by (479)\nend\n\n@Border\n\nwhen I receive [engine_start v]\nwait (0.01) seconds\ngo to x: (0) y: (0)\ngo to [front v] layer\ngo [backward v] (1) layers\nshow\n\nwhen flag clicked\ngo to x: (0) y: (0)\nhide\n\n