Jump to content
Sign in to follow this  
mark82101

How to Check destroyed map objects?

Recommended Posts

How I Check destroyed map object, for example in a trigger?

example:

-)for checking bmp dead I write this lines in condition in a trigger:

not(alive bmp)

Every object in map have IDs, we can see these by pressing the button "Show IDs" in advanced options in editor.

Some months ago, with the help of my friend Xenom (father of the atomic bomb in OFP), I was able to check destroyed objects in map, writing some lines in a trigger...

But I've lost the paper with these lines sad_o.gif

Can someone help me?!  icon_rolleyes.gif

Share this post


Link to post
Share on other sites

In ArmA, nearestObject id is used (OFP used the object command). You must give a position near the desired object for it to work.

example:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> _enemyBuilding = [15204,30620,0] nearestObject 572348

If you can't be bothered finding the position of the object, place something near it (many people use gameLogics for this):

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> _enemyBuilding = position _objectFinder nearestObject 572348

Share this post


Link to post
Share on other sites
In ArmA, nearestObject id is used (OFP used the object command). You must give a position near the desired object for it to work.

example:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> _enemyBuilding = [15204,30620,0] nearestObject 572348

If you can't be bothered finding the position of the object, place something near it (many people use gameLogics for this):

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> _enemyBuilding = position _objectFinder nearestObject 572348

thanks fasad smile_o.gif

Then, if I want to check in a trigger the death of, for example, a radio station with ID 219162, what I've to write in the trigger lines? icon_rolleyes.gif

help.gif

Share this post


Link to post
Share on other sites

put an invisible H, name it "H_invisible" in the position of the tower, than in the trigger condition write:

(position H_invisible (nearestObject 219162)) getDamage > 0.9

smile_o.gif

Share this post


Link to post
Share on other sites
put an invisible H, name it "H_invisible" in the position of the tower, than in the trigger condition write:

(position H_invisible (nearestObject 219162)) getDamage > 0.9

smile_o.gif

Hey LINKER  biggrin_o.gif

(position H_invisible *(nearestObject 219162)) getDamage > 0.9

I put "*" where ArmA says me to put ")"

Why?

icon_rolleyes.gif

Share this post


Link to post
Share on other sites

The correct commands are either getDammage (two m's!) or if you prefer english rather than czechlish, use damage.

This works:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">damage ((position H_invisible) nearestObject 219162) > 0.9

Share this post


Link to post
Share on other sites
The correct commands are either getDammage (two m's!wink_o.gif or if you prefer english rather than czechlish, use damage.

This works:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">damage ((position H_invisible) nearestObject 219162) > 0.9

It WOOORKS! biggrin_o.gif

Thanks a lot mate notworthy.gif

I'm madeing a mission with 2nd MEF USMC and RHS Marines and VDV, and a lot of addons where the usmc have to disable an enemy radio station and two Scud (like Patrol Bravo Two Zero ^^) thumbs-up.gif

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  

×