You can use the SetGlobal3DDepth() command:
SetWindowSize(800,480,0)
SetVirtualResolution(800,480)
// create a sprite and give it a depth of 1
createSprite(1,0)
setSpriteSize(1,150,150)
SetSpriteColor(1,0,255,0,255)
SetSpritePositionByOffset(1,350,200)
SetSpriteDepth(1,1)
// create another sprite and give it a depth of 200
createSprite(2,0)
setSpriteSize(2,150,150)
SetSpriteColor(2,255,0,0,255)
SetSpritePositionByOffset(2,450,280)
SetSpriteDepth(2,200)
// the the depth at which 3D objects are drawing to 100
// then create a box, the box will appear between the two sprites
SetGlobal3DDepth(100)
CreateObjectBox(1,10,10,10)
SetObjectDepthWrite(1,1)
SetCameraPosition(1,0,20,-40)
SetCameraLookAt(1,0,0,0,0)
CreateLightDirectional(1,0.5,-1,0.75,255,255,255)
do
RotateObjectGlobalY(1,0.5)
sync()
loop
I've not used the command before so I don't really know much more than this but I'm guessing it sets the depth for all 3D objects so I'd assume you could not have a sprite appear between two different 3D objects.