Page 1 of 1

How to change map gen settings on event without desync?

Posted: Wed Aug 16, 2023 7:07 am
by Atraps003
I'm trying to change map gen settings after an amount of chunks have been generated. It causes desync. Any tips?

Code: Select all

local chunk_count = 0
local apply_map_gen_2 = false
local on_chunk_generated = function(event)
	chunk_count = chunk_count + 1
	if (chunk_count == 1600) then
	apply_map_gen_2 = true
	end
end


local on_sector_scanned = function(event)
	if (apply_map_gen_2 == true) then
	map_gen_2()
	apply_map_gen_2 = false
	end
end

Re: How to change map gen settings on event without desync?

Posted: Wed Aug 16, 2023 10:33 am
by Deadlock989

Re: How to change map gen settings on event without desync?

Posted: Thu Aug 17, 2023 6:46 am
by Atraps003
I understand my error now. Thanks.