Hutson-16AA- 0 Posted December 27, 2006 Hello, I'm trying to make a mission where you have to get to and destroy a bridge - however, I can't work out the code for the trigger - or, more specifically, how to reference the bridge. I am trying to use: (damage 4007)>0.999 or (damage BUILDINGID)>0.999 - However, it seems I'm not able to reference the building ID in this way. So, does anyone know how I go about setting a trigger to check whether a building or bridge is destroyed? Thanks in Advance, Paul Hutson Share this post Link to post Share on other sites
klavan 0 Posted December 27, 2006 Try: damage object (objectID) > 0.999 or !alive object (objectID) Klavan Share this post Link to post Share on other sites
Hutson-16AA- 0 Posted December 27, 2006 Nope, those two don't work - it doesn't like the object proword Share this post Link to post Share on other sites
klavan 0 Posted December 27, 2006 Try this then: ((damage object 14393) > 0.999) Replace number 14393 with the proper object ID for the bridge. I've tested this line in OFP and it works fine. It shouldn't be different for ArmA. Klavan Share this post Link to post Share on other sites
Deadfast 43 Posted December 27, 2006 Unfortunately there's quite a big difference as "object" has been replaced with "nearestObject" (changing quite short line to quite long one ) This should work 100% (as it's even used in campaign for bridge damage detection): <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">damage (position player nearestObject 123456) >= 1 (put inside "Condition" line of trigger and replace 123456 with ID number of bridge/object/building). Share this post Link to post Share on other sites
Hutson-16AA- 0 Posted December 27, 2006 Unfortunately there's quite a big difference as "object" has been replaced with "nearestObject" (changing quite short line to quite long one  )This should work 100% (as it's even used in campaign for bridge damage detection): <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">damage (position player nearestObject 123456) >= 1 (put inside "Condition" line of trigger and replace 123456 with ID number of bridge/object/building). That works a treat - thank you very much indeed everyone! Share this post Link to post Share on other sites
Heatseeker 0 Posted December 27, 2006 Uh, that doesnt make much sense, why change it to position player nearestObject 123456, nearest to what? . Share this post Link to post Share on other sites
Deadfast 43 Posted December 28, 2006 Hutson[16AA]: You're welcomed Heatseeker: Probably to player's position (?), dunno. I just know that it works this (silly) way . Share this post Link to post Share on other sites
kronzky 5 Posted December 28, 2006 The object command doesn't exist anymore in ArmA (see here). It's has to do with the new territory streaming (I guess that means that the engine doesn't really know anything about map objects in the middle of nowhere, unless there's a user-placed object close by it.) Share this post Link to post Share on other sites
klavan 0 Posted December 28, 2006 The object command doesn't exist anymore in ArmA (see here). I should had read better lol! Klavan Share this post Link to post Share on other sites