if (instance_exists(obj_mainchara)) xcurrent = obj_mainchara.x;