This is the basic coding for a platformer! Do whatever you want with it! For this code you need to make the obstacles and ground a seperate sprite and you have to specifically name the sprite ground as spelt there or change it in the code up to you
Thanks to @Pulljosh for helping me with this code and be sure to check him out! To change levels, name the ground costumes by numbers. Then make a new level and a variable called level. Then either make a sprite for the goal or set the y axis to the very edge of the project. If you used a sprite: When flag clicked, forever, if touching sprite, change level variable by 1. Then in the ground sprite, when flag clicked, forever, set costume to level variable. If you're making the goal the side of the screen: do the same thing with the variables but instead of touching sprite do if y position is (the side of the screen) and put that code in the character sprite. Same with the first example.