Working on a GUI at the moment for my game using object plains that have been locked to the screen. I need to be able to layer the plains so that specific elements appear above others. For example, the grey circle under the green rectangle in the image I attached should above the green rectangle. Below is the code I'm using to display the grey circle. I've tried adding/subtracting a small amount from the Z value to see if it would change what order it's drawn in but I had no success with that.
Thanks in advance for your help!
var_Screen_Position_Left# = SCREEN WIDTH() - SCREEN WIDTH() * 1.5
var_Screen_Position_Right# = SCREEN WIDTH() - SCREEN WIDTH() / 2.0
var_Screen_Position_Bottom# = SCREEN HEIGHT() - SCREEN HEIGHT() * 1.5
var_PositionZ# = (SCREEN HEIGHT() / 2.0) / TAN (con_Camera_FOV * 0.5)
`Objectives Background
var_InstanceID = FIND FREE OBJECT ()
MAKE OBJECT PLAIN var_InstanceID, 120, 120
TEXTURE OBJECT var_InstanceID, 500
var_PositionX# = var_Screen_Position_Left# + 70
var_PositionY# = var_Screen_Position_Bottom# + 70
POSITION OBJECT var_InstanceID, var_PositionX#, var_PositionY#, var_PositionZ#
SET OBJECT FILTER var_InstanceID, 0
LOCK OBJECT ON var_InstanceID
arr_GUI(0) = var_InstanceID
EDIT: Silly me. After trying a few different changes I found that the image number is what determines the draw order of locked objects.