Possible Duplicate:
How should I sort images in an isometric game so that they appear in the correct order?
I'm starting work on a simple isometric engine. Everything thing is going great at the moment, but I think I've hit an issue everyone hits. I'm having difficulty getting sorting the depth of a cube.
This image shows the default view (character not near a cube)

This image shows the character behind a cube

The issue is here, when the character goes in front of the cube.

Is there a common solution to this? How would i go about it? Would i need to give a depth to EVERY cube, then somehow work out the current tile the character is on then apply the depth to him? I'm using game maker on a mac and I'm happy to upload the project somewhere if you need to check it out.
Thanks for any input.