Jump to content
Sign in to follow this  
johnwilso007

detect that a map building has been destroyed

Recommended Posts

how can i get a trigger to detect that a building that is already on the map has been destroyed by my explosives. 3 satchels take out the warehouse on Rahmadi and its id is 486359.

i had a go with

GetDammage 486359 >= 1 but it didnt work

any ideas?

Share this post


Link to post
Share on other sites

Use nearestObject to refer to map objects. The position should be near the object.

eg. getDammage ([1232,2151,0] nearestObject 15235)

Share this post


Link to post
Share on other sites

It's a bit more complicated now with ArmA. Here's how I solved the problem:

Place a gamelogic nearby or on the object you want to check. In the initline of the logic type

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">ID486359=position this nearestObject 486359

With the variable ID486359 you now can check the status of the object. Like this:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">getDammage ID486359 > 1

Share this post


Link to post
Share on other sites

thanks w0lle that worked well. has the objective completed command changed also? as it doesnt seem to work?

Share this post


Link to post
Share on other sites

Nope, I still use "1" objstatus "done" to tick off the first objective. Nothing has changed here.

Share this post


Link to post
Share on other sites

How about grouping a trigger to it, and setting "staticobject" not present?

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×