Hello i am trying to create a beat em up style game but i have this big problem with making objects change from being in front of the character wen the character moves behind of it and being behind the charcter wen the character moves in front of it …here is an example of what i want to do
unfortunatly i dont know exactly the best way to do this …because the object also has to collide and stop the character wen he comes in contact with it. I would also like to note that i have zero experience making games, this is the first one im making so i dont understad a lot of what i am doing.
There is an example doing exactly that, create a new GD5 project and in the examples window search for “Z depth”
But the idea is to set the Z-order of every object = the bottom Y position of the object. An object that has the base Y position greater than other will get a greater Z-order and will be rendered over it.
hey wow! thanks a lot! i did exactly what you said and it worked …only problem now is this.
i can see his legs under the crate, what did i do wrong. Is it because i didn’t add the “at the begining of the scene” thingy
It could be that the origin point of your sprites are in the top left… So in the first picture your character’s y position is actually lower than the obstacle… If you put them at the bottom middle it should work…
alright thanks! ill try that right now!
any updates with your beat em up? can u share some insights?
im still at it but im making mostly artwork for it, mainly the maps for the game and character development …its an x rated game so i cant give much detail on it here.
All i can say is the character i used in the pictures above is not the real character i just used him for my example.