Hi, me again. Is there any way how to get energy satisfaction of entity in script?
For example if my small pump needs 100kW to work but my electrict network is bad and i can provide only 10kW, can i get somehow this information so i would slow down stuff i am doing in script?
Energy satisfaction
Re: Energy satisfaction
AFAIK:
Entity have 'energy' property.
The game tries to fill it according to entity demand from definition.
If you want to perform some custom actions not derived from base entity, you need
to decrease energy every tick.
If your entity want 60kw/sec then every tick the game will try to fill energy property with 1000w.
So if it's 1000, then you can perform your actions at 100% speed, if it's 500 then 50% speed and so on.
But don't forget to set energy to 0 on every tick when work was performed.
Entity have 'energy' property.
The game tries to fill it according to entity demand from definition.
If you want to perform some custom actions not derived from base entity, you need
to decrease energy every tick.
If your entity want 60kw/sec then every tick the game will try to fill energy property with 1000w.
So if it's 1000, then you can perform your actions at 100% speed, if it's 500 then 50% speed and so on.
But don't forget to set energy to 0 on every tick when work was performed.
Re: Energy satisfaction
thanks i will try that