DoDamage

Category: Objects / Status
Since engine version: 4.6.5.0 CP

Description

Adjusts the damage value of an object. If a change is made, the callback 'Damage' is made in the target object. In local calls the owner of the calling object is considered to have caused the damage.

Syntax

bool DoDamage (int iChange, object pTarget);

Parameters

iChange:
Change of damage value (positive or negative)
pTarget:
[opt] Object to adjust. Can be 0 in local calls.

Example

DoDamage(500, FindObject(TREE));
Fells a tree if it's not yet down.
See also: GetDamage
Sven2, November 2001