OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: AnarCHy on 15 Aug 2004, 22:33:29
-
I know there is probably a thread somewhere covering this, and it is probably pretty basic, but I need to know one thing:
How can you detect if an object (default object on map) has been dammaged at all?
I am makin a mission where if you hit the fuel truck/fuel station the entire camp blows up (hehehe lgbx20).
Thanks,
AnarCHy
-
GetDammage object <objectId> > 0where objectId is the number of the fuel station seen by hitting the 'Show IDs' button in the editor.
-
or getdammage unitname if it is a truck
-
A better way is the Eventhandler "Hit", as getdammage is filled with bugs.
:beat: *Gets Shot* :beat:
-
Even better is eventHandler (http://www.ofpec.com/editors/comref.php?letter=3#Event%20handlers) "dammaged", as this detects any damage, not just weapon-inflicted damage.