Z
Zephyr Schwarzwolf
Guest
Hi everyone !
I have two objects :
- The first one is the one the player controls. Named "PLAYER".
- The second one is an object (rather a group of objects) distributed on several layers. Each layer has its own depth and each object from that group take the depth of the layer on which it has been set. Named "DEPTH_LEVEL".
When my first object collide with one of them, I want him to take their depth. But it doesn't work...
I tried that simple code :
Any ideas ? Thank in advance.
I have two objects :
- The first one is the one the player controls. Named "PLAYER".
- The second one is an object (rather a group of objects) distributed on several layers. Each layer has its own depth and each object from that group take the depth of the layer on which it has been set. Named "DEPTH_LEVEL".
When my first object collide with one of them, I want him to take their depth. But it doesn't work...
I tried that simple code :
Code:
if (place_meeting(x + hspd, y + vspd, DEPTH_LEVEL))
{
depth = DEPTH_LEVEL.depth;
}