OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: AnarCHy on 15 Aug 2004, 22:33:29

Title: Dammaged AT ALL
Post 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
Title: Re:Dammaged AT ALL
Post by: Mud_Spike on 15 Aug 2004, 22:54:22
Code: [Select]
GetDammage object <objectId> > 0where objectId is the number of the fuel station seen by hitting the 'Show IDs' button in the editor.
Title: Re:Dammaged AT ALL
Post by: Zombie on 16 Aug 2004, 03:17:48
or getdammage unitname if it is a truck
Title: Re:Dammaged AT ALL
Post by: dmakatra on 16 Aug 2004, 10:08:39
A better way is the Eventhandler "Hit", as getdammage is filled with bugs.

:beat: *Gets Shot* :beat:
Title: Re:Dammaged AT ALL
Post by: KTottE on 16 Aug 2004, 12:00:29
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.