Page 1 of 1
Multiplayer Migration
Posted: Sun Jan 04, 2015 1:05 am
by Ranakastrasz
I am unsure how to manage recipie migration, specifically in Multiplayer. It gives an error when you load, using the default one.
game.player.force.resetrecipes()
Re: Multiplayer Migration
Posted: Sun Jan 04, 2015 2:42 am
by Degraine
Because there's more than one player force in multiplayer, you need to adjust your code to allow for that. Eg:
Code: Select all
for i, player in ipairs(game.players) do
player.force.resetrecipes()
player.force.resettechnologies()
end
This will iterate through every player and perform those two actions. Handily, it also works in single-player.
Re: Multiplayer Migration
Posted: Sun Jan 04, 2015 9:32 pm
by L0771
but the force is the same for all players, maybe if it is for one player work just as well