Z order is different to spawning objects on the wrong layer. If you are choosing the wrong layer then I can't help with that. For Z order you can have actions which are 'object move to top of layer', you list the actions in order from bottom to top, so if you want object A to appear at the top above object B then actions look like this :
object B move to top of layer
object A move to top of layer