# DoEnergy

Objects
Status
4.6.5.0 CP4.9.6.0 CR
void
int change Change of the energy value (positive or negative) in percent of the maximum value. 100% correspond to the maximum physical value of 100,000.
bool exact If true, change is applied to the exact energy value (0 to value of Physical "Energy").
int damage_type Damage cause specification which is to be passed to Fx*Damage callbacks of effects (see effect documentation). Default is FX_Call_EngScript.
int caused_by Number of the player who has caused the damage.
Adjusts the energy value of an object. Energy signifies electrical energy in buildings and life energy in living beings.
GetCursor
(0)->DoEnergy(GetCursor(0)->GetPhysical("Energy")*50/100000);
Gives 50% more energy to the selected clonk.
GetEnergy
EnergyCheck
Sven2
2001-11
Clonkonaut
2008-04