OFPEC Forum

Editors Depot - Mission Editing and Scripting => Arma2 - Editing/Scripting General => Topic started by: CaptainBravo on 28 Jul 2009, 11:42:52

Title: How to detect a bridge/building being blown up?
Post by: CaptainBravo on 28 Jul 2009, 11:42:52
Hi,
I have searched but could not find an asnwer to this specific question. I want a mission to end when a bridge/building is destroyed. The challange is how do you detect that in a trig since it is building in the map?

Thanks for your help.
Title: Re: How to detect a bridge/building being blown up?
Post by: laggy on 28 Jul 2009, 16:01:59
Code: [Select]
damage (position player nearestObject 274849) >= 1Where the number sequence is the id number of the object in the editor. Just replace my "274849" sequence with your wanted id number and it should work. The nearestObject thing is a needed workaround in Armed Assault, not sure if they fixed this in ArmAII or not. In that case the old OFP solution should work as well, but I doubt it.
Code: [Select]
damage (Object 274849) >= 1
Laggy