/c local nauvis2 = game.surfaces["nauvis2"] if nauvis2 then game.delete_surface("nauvis2") end local cam1_position = {x = 335.70703125, y = -291.15625} if not nauvis2 or nauvis2.valid then local mgs = { autoplace_controls = {}, autoplace_settings = {}, default_enabled_all_autoplace_controls = false, starting_area = 1, starting_points = { { x = 0, y = 0 } }, terrain_segmentation = 1, water = 6, } mgs.seed = 2741212186 nauvis2 = game.create_surface("nauvis2", mgs) nauvis2.request_to_generate_chunks(cam1_position, 4) nauvis2.force_generate_chunk_requests() end local player = game.player local screen = player.gui.screen local camera_name = "camera" local camera2_name = "camera2" local create = true for k, v in pairs(screen.children) do if v.name == camera_name or v.name == camera2_name then v.destroy() end end if create then local width = 1920 * .8 local height = 1080 * .8 local scaled_width = width / player.display_scale local scaled_height = height / player.display_scale player.zoom = 1 local camera = screen.add{name = camera_name, type = "camera", position = cam1_position, surface_index = nauvis2.index, zoom = 1} camera.location = {(player.display_resolution.width / 2 - width / 2), (player.display_resolution.height / 2 - height / 2)} camera.style.width = scaled_width camera.style.height = scaled_height camera.ignored_by_interaction = true local width = 640 local height = 480 local scaled_width = width / player.display_scale local scaled_height = height / player.display_scale local camera2 = screen.add{name = camera2_name, type = "camera", position = player.position, surface_index = player.surface.index, zoom = 1} camera2.location = {(player.display_resolution.width / 2 - width / 2), (player.display_resolution.height / 2 - height / 2)} camera2.style.width = scaled_width camera2.style.height = scaled_height camera2.ignored_by_interaction = true camera2.entity = player.character end