Multiplayer Script:Can someone please fix this simple Script

Place to get help with not working mods / modding interface.
Post Reply
Kane
Filter Inserter
Filter Inserter
Posts: 666
Joined: Fri Sep 05, 2014 7:34 pm
Contact:

Multiplayer Script:Can someone please fix this simple Script

Post by Kane »

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.

Quickbowjob
Inserter
Inserter
Posts: 23
Joined: Mon Jun 27, 2016 6:39 pm
Contact:

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

Post by Quickbowjob »

This would be so awesome +1!

User avatar
prg
Filter Inserter
Filter Inserter
Posts: 947
Joined: Mon Jan 19, 2015 12:39 am
Contact:

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

Post by prg »

Maybe don't pass false to set_cease_fire?
Automatic Belt (and pipe) Planner—Automate yet another aspect of constructing your factory!

Kane
Filter Inserter
Filter Inserter
Posts: 666
Joined: Fri Sep 05, 2014 7:34 pm
Contact:

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

Post by Kane »

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.

Post Reply

Return to “Modding help”