How to temporarily disable player actions?

Place to get help with not working mods / modding interface.
User avatar
Gergely
Filter Inserter
Filter Inserter
Posts: 641
Joined: Sun Apr 10, 2016 8:31 pm
Contact:

How to temporarily disable player actions?

Post by Gergely »

I need a short script to make all players temporarily unable to interact with anything but their inventory, crafting queue, and gui. That is, without assigning them to another force or character. Can someone help me with this? I am out of ideas.
User avatar
eradicator
Smart Inserter
Smart Inserter
Posts: 5211
Joined: Tue Jul 12, 2016 9:03 am
Contact:

Re: How to temporarily disable player actions?

Post by eradicator »

Create a new permissions group and assign them to that. Assign them back to their old groups when finished?

http://lua-api.factorio.com/latest/LuaP ... roups.html

You can also use /permissions ingame to get an overview over possible actions.
Author of: Belt Planner, Hand Crank Generator, Screenshot Maker, /sudo and more.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.
Post Reply

Return to “Modding help”