[SOLVED] Method to remove a force
Posted: Fri May 27, 2016 8:28 pm
This is my first post, so I apologize if I didn't pick quite the right location for it.
Greetings! I'm starting to cut my teeth on Factorio modding. It's something I've been tempted to do a few times but up until now haven't touched on much. I have played with the in-game live scripting, which is fun. The fact that the data is all controllable through Lua is fun, and I've always really liked Lua.
My actual question for this post is: Is there a means by which to remove a force once created?
game.create_force("forcename") will happily create a force, no issues. However, there isn't a "remove_force" or equivalent that I can find. Setting game.forces["testforce"] to nil doesn't accomplish anything at all (which I think for the best, really).
An alternative would be an assessment of the harm of leaving lose forces about. Particularly, if I give every player their own force and then an offline player is removed, are the extra forces going to make much of an impact?
Cheers!
-XComp
Greetings! I'm starting to cut my teeth on Factorio modding. It's something I've been tempted to do a few times but up until now haven't touched on much. I have played with the in-game live scripting, which is fun. The fact that the data is all controllable through Lua is fun, and I've always really liked Lua.
My actual question for this post is: Is there a means by which to remove a force once created?
game.create_force("forcename") will happily create a force, no issues. However, there isn't a "remove_force" or equivalent that I can find. Setting game.forces["testforce"] to nil doesn't accomplish anything at all (which I think for the best, really).
An alternative would be an assessment of the harm of leaving lose forces about. Particularly, if I give every player their own force and then an offline player is removed, are the extra forces going to make much of an impact?
Cheers!
-XComp