OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Gron on 10 Apr 2005, 12:47:34

Title: Check health/damage
Post by: Gron on 10 Apr 2005, 12:47:34
Would like to know the simple line to put in a trigger to check if a unit is unharmed or not, in this case a chopper. Only find commands to give damage, but none to just check the damage.

Thanks in advance.
Title: Re:Check health/damage
Post by: THobson on 10 Apr 2005, 12:48:47
Try:
getDammage obj

Operand types:
obj: Object
Type of returned value:
Number
Description:
Object dammage in range 0 to 1

Example:
getDammage player
Title: Re:Check health/damage
Post by: bedges on 10 Apr 2005, 12:49:03
http://www.ofpec.com/editors/comref.php?letter=G#getDammage

edit - heh, beaten to it ;)