Page 1 of 1

Multiplayer Script:Can someone please fix this simple Script

Posted: Fri Jul 08, 2016 8:53 pm
by StoneLegion
So my friend togy and I and the next person to get me NMS, would like to play factorio again. The biggest script we been using since I think 0.11 was this force script that allows us to have our own team but it also makes it so that our turrets only attack biters. Sadly this script is not working right for 0.13 even after fixing a couple little things. Our own research / map / buildings work just fine. But the turrets now attack each others forces.

Code: Select all

/c local pforces = {}; for _, player in pairs(game.players) do local fname = "player_" .. player.name; local force = game.forces[fname] or game.create_force(fname); player.force = force; for _, pforce in pairs(pforces) do pforce.set_cease_fire(force.name, false); force.set_cease_fire(pforce.name, false) end; pforces[#pforces+1] = force end
Also is there any way yet to be able to access each others buildings even if separate force? That would be nice. Right now we sort of play on our own bases share the same map but a bit more co-op but being separate would be better.

Re: Multiplayer Script:Can someone please fix this simple Script

Posted: Fri Jul 08, 2016 8:54 pm
by Quickbowjob
This would be so awesome +1!

Re: Multiplayer Script:Can someone please fix this simple Script

Posted: Fri Jul 08, 2016 8:58 pm
by prg
Maybe don't pass false to set_cease_fire?

Re: Multiplayer Script:Can someone please fix this simple Script

Posted: Fri Jul 08, 2016 9:03 pm
by StoneLegion
prg wrote:Maybe don't pass false to set_cease_fire?
This is how it's been since 0.11 I think it be something else I could be wrong.