if (instance_exists(obj_battlecontroller)) depth = obj_battlecontroller.depth;