Page 1 of 1

Multiplayer desyncs

Posted: Wed Oct 26, 2016 1:20 pm
by Oiltanker
I found a way (crapy one) to implement the server-client logic to factorio using global table:

Code: Select all

global.player_index = 0

local get_player_index = function()
	global.player_index = global.player_index + 1
	return global.player_index
end
and you need to execute this code for all (new) players:

Code: Select all

local player_index = get_player_index()
And you may also use another instance of global table to match player names with their indexes.