Hello, we are gonna make a platformer.
So we start.
-
Get a character and a tile block
-
In the character’s code, make a variable. Put [Set (X) to ((self) X position)]
And do the same with the y so it looks like
Also as you see, do
[when game is playing
[Set position to (x) (y)]
Step 2. Make new vars called x speed and y speed. Put in code [Increase (x) by (x speed) and Increase (y) by (y speed)
And do increase (y speed) by (-1)
The character is all done. We will move onto the tiles. I start with the collision but it is too hard to go through with you.
So I start with making a clone by doing [when game starts] repea
Now, we make a clone for how many objects. Take a custom rule purple block thing and name it, [Level Data]. Inside it, I put what will happen to the clone, not what happens to it. For me, I put repeat times (fhfbvb) create a clone. Now when I go to level data. I make it so that when object is cloned and the clone index it (5) then set a new variable called [block] to 5. Or the index number of your clone.
Then, make a new custom rule block called tile data. If my clone index is 3, I put here,
When block=3
[Set position x (bleh) y (bleh]
[Set width (bleh) height (bleh)]
[Set (collision)* = 1]
*this comes in the collisions code.
And you’re done. You do this for all of the clones you have or want. And you get a platformer!
Here is an example and where to get your collisions code