Platformer Engine #Games
@Stage\n\nwhen flag clicked\nbroadcast (Run Platformer v)\n\nwhen I receive [run platformer v]\nforever\n    play sound [Ever Warmer v] until done\nend\n\n@Player\n\nwhen I receive [run platformer v]\nforever\n    if <<[240] < (x position)> and <(dead?) = [0]>> then\n        broadcast (NAXT LEVEL v)\n        change [level v] by (1)\n        Reset - Setup\n    end\nend\n\nwhen flag clicked\nhide variable [xv v]\nhide variable [dead? v]\nhide variable [level v]\nhide variable [yv v]\nhide\n\nwhen I receive [run platformer v]\nset [dead? v] to [0]\nset [level v] to [1]\nset size to (100) %\nReset - Setup\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 (spikes v)?> then\n        set size to (100) %\n        go to x: (-201) y: (0)\n        play sound [A Elec Bass v] until done\n    end\n    if <(y position) < [-180]> then\n        go to x: (-201) y: (0)\n    end\n    if <touching (bouncy v)?> then\n        set [yv v] to [15]\n    end\nend\n\nwhen I receive [run platformer v]\nset [level v] to [1]\nforever\n    create clone of (_myself_ v)\nend\n\ndefine Reset - Setup\nset [dead? v] to [0]\nset [xv v] to [0]\nset [yv v] to [0]\npoint in direction (90)\ngo to x: (-201) y: (30)\nclear graphic effects\nswitch costume to (1 v)\nset size to (100) %\nshow\n\nwhen I start as a clone\nrepeat (1)\n    if <(costume [number v]) = [2]> then\n        switch costume to (clone2 v)\n        repeat (1)\n            change [ghost v] effect by (10)\n        end\n    end\nend\nwait (0.09) seconds\ndelete this clone\n\nwhen flag clicked\nforever\n    if <touching (respawn  v)?> then\n        set size to (100) %\n        go to x: (-201) y: (0)\n    end\nend\n\nwhen I receive [hide! v]\ngo to x: (-201) y: (0)\n\nwhen I receive [bounce  v]\nchange [yv v] by (0.05)\n\nwhen flag clicked\nforever\n    if <touching (smaller  v)?> then\n        set size to (150) %\n    end\nend\n\nwhen I receive [naxt level v]\nset size to (100) %\n\n@ground\n\nwhen I receive [run platformer v]\nshow\nforever\n    switch costume to (Level)\nend\n\nwhen flag clicked\nhide\n\n@Spikes\n\nwhen flag clicked\nhide\n\nwhen I receive [run platformer v]\nshow\nforever\n    switch costume to (Level)\nend\n\nwhen flag clicked\nforever\n    go to x: (0) y: (0)\n    wait (1) seconds\n    change y by (2)\n    wait (1) seconds\nend\n\n@bouncy\n\nwhen flag clicked\nswitch costume to (1 v)\nforever\n    if <touching (player v)?> then\n        play sound [Jump v] until done\n        broadcast (bounce  v)\n    end\nend\n\nwhen I receive [naxt level v]\nnext costume\n\n@Letter\n\nwhen flag clicked\nhide\n\nwhen I receive [run platformer v]\nshow\nforever\n    switch costume to (Level)\nend\n\n@Respawn \n\nwhen flag clicked\ngo to [back v] layer\nforever\n    if <touching (player v)?> then\n        broadcast (HIDE! v)\n        play sound [Oops v] until done\n    end\nend\n\nwhen I receive [naxt level v]\nnext costume\n\nwhen flag clicked\nswitch costume to (costume1 v)\n\n@Smaller \n\nwhen flag clicked\nswitch costume to (costume1 v)\n\nwhen I receive [naxt level v]\nnext costume\n\n@Thumbnail \n\nwhen flag clicked\nforever\n    go to [front v] layer\n    reset timer\n    hide\nend\n\nwhen [timer v] > (0)\ngo to [front v] layer\ngo to x: (0) y: (0)\nset [ghost v] effect to (100)\nshow\nrepeat (100)\n    change [ghost v] effect by (-1)\nend\n\n
PART 2 IS OUT!!!!!!!!!!!!!!\n\nPART 2\nLINK: https://scratch.mit.edu/projects/591854273\n\n\n   —~~Welcome to CANDY VALLEY~~—\n\nControls- Arrow keys, or finger if on mobile \n\n‼️‼️‼️‼️‼️TOP LOVED OMMMMMMMGGGGGGGG XD ‼️‼️‼️‼️‼️‼️‼️‼️‼️‼️‼️‼️‼️‼️‼️‼️‼️‼️\nfirst time getting top loved or on all\n‼️‼️‼️‼️‼️‼️Top remixed xdxdxdxxd‼️‼️‼️‼️‼️‼️‼️\n\nMaybe to remixed\n\n500 loves and I’ll count to 500 with my voice XD\nTaken a while cuz I’m busy xd\nGoal- To take a journey in candy Valley \n\nYou may see cloud made out of cotton candy and the floor made of sugar and you are now in Candy Valley\n\nIf you liked it give a love, fav and maybe follow, thanks\n\nIf you get stuck talking to people do this\n1. Click the screen \n2. Now you can move \n3. Finish what the person is saying \n4. When there is no text box left you can go \n5. Thanks for playing my game\n\nSo.... part 2 is goin to take awhile cuz I almost deleted all the code in THIS game not part 2 so I was a little stressed \n\n\n100 LOVES and 100 Favs for PART 2  XD\n*already gets 100 on one day* XD\nREMIX This To try to make it better\n\nOther notes\n.there is a boss \n. About 20 levels \n. Took me a long time to make\n.hope you have fun\n.please say in the comments how you think about the game and if there is any glitches, thanks\n. I hope this gets featured\n. 100% possible and 100% cool XD\n                      Hope you Have a great day