xx = sprite_width if (x > (room_width + xx)) x = 0 - xx x += 1