I did this by adding a variable called 'Priority' to the game object code. Its range was only 0-4 but provided the key which Laurent spoke of.
At render time, the sprites were drawn according to priority level, 0 being furthest away (first to be drawn), and 4 being the closest (last to be drawn).