Enable/Disable Beacons via scripting

Place to get help with not working mods / modding interface.
Elgskred
Manual Inserter
Manual Inserter
Posts: 4
Joined: Fri Apr 05, 2019 6:27 pm
Contact:

Enable/Disable Beacons via scripting

Post by Elgskred »

Is there a way to stop/start beacons emitting their effect?
I've tried using the LuaEnitity.active value, but all this does is stopping the animation of the beacon entity.

If there is no way to enable/disable, is it possible to change the effectivity, like LuaEnitity.effectivity_modifier for cars?
Elgskred
Manual Inserter
Manual Inserter
Posts: 4
Joined: Fri Apr 05, 2019 6:27 pm
Contact:

Re: Enable/Disable Beacons via scripting

Post by Elgskred »

The best way I found so far to get the same functionality is to:
call find_entities_filtered and iterate through the returned entities, setting .active=false on all of them.
Post Reply

Return to “Modding help”