Category: Objects/Status Since engine version: 4.6.5.0 CP (extended in 4.9.6.0 CR)
Description
Adjusts the energy value of an object. Energy signifies electrical energy in buildings and life energy in living beings.
Syntax
bool DoEnergy
(int iChange, object pObj, bool fExakt, int iEngType, int iCausedBy);
Parameters
iChange:
Change of the energy value (positive or negative) in percent of the maximum value. 100% correspond to the maximum physical
value of 100,000.
pObj:
[optional] Object of which to change the energy value. Can be 0 in local calls.
fExakt:
[optional] If true, iChange is applied to the exact energy value (0 to value of Physical "Energy").
iEngType:
[optional] Damage cause specification which is to be passed to Fx*Damage callbacks of effects (see effect documentation). Default is FX_Call_EngScript.
iCausedBy:
[optional] Number of the player who has caused the damage, plus one.