getDammage

From Bohemia Interactive Community

Jump to: navigation, search
Editors, please check Policy: Scripting Command Page Syntax.
Introduced in Operation Flashpoint version 1.00

Click on the images for descriptions

Introduced in

Game:
Operation Flashpoint
Version:
1.00

Description

Description:
Returns the object damage in the range from 0 to 1.

Syntax

Syntax:
Number = getDammage Object
Parameters:
Object
Return Value:
Number

Examples

Example 1:
_damage= getDammage player

Additional Information

Multiplayer:
Behaviour unknown.
See also:
damage, setDamage, setDammage

Notes

Notes

+ Add Note

Only post proven facts here. Use the talk page or the forums for discussions.

Notes

UNN
Vehicles repaired in game with the Repair trucks e.t.c never get completely repaired. After being repaired, rather than returning 0 when the damage command is called. They return a value equal to or less than 0.09.

Consequently any vehicle flagged as immobile (as indicated by the canMove command), remains so. At least as far as the AI are concerned. The AI will refuse to board an immobile vehicle or eject straight after boarding. Players remain unaffected and can drive the vehicle as normal. To circumvent this, use setDamage 0 on the vehicle in question, to allow the AI to board.

Ceeeb
In OFP 1.96, it is possible for a unit to be dead and still return a getDammage value well below 1. Use !alive to check if a unit is dead.

Bottom Section

Personal tools
Buy ArmA now!