Page 1 of 1

energy_source - how to access in control.lua

Posted: Sat Apr 09, 2016 6:27 pm
by RCSub
Hello everyone

has anyone found a way to read/write what is inside the energy_source part of an entity from within a control.lua script? Eg. for an accumulator at every tick?

Best regards
RCSub

Re: energy_source - how to access in control.lua

Posted: Sun Apr 10, 2016 1:01 am
by catarix7
I am really new but I think you are unable to change existed entities after game start. but you can create a few accumulator types and replace existed type with new one after research is finished

Re: energy_source - how to access in control.lua

Posted: Sun Apr 10, 2016 1:04 am
by Supercheese
The "energy" value is what you are looking for methinks: http://lua-api.factorio.com/0.12.30/Lua ... tml#energy