Jump to content
Sign in to follow this  
Chaos

object ID setdamage

Recommended Posts

hello, can anybody tell me what i must do (in ArmA) to destroy a object on the map ? I will destroy a tree. But with the old OFP kind:

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

object (ID) setdammage 1 or with "setdamage"

- doesn´t works

crazy_o.gif

Share this post


Link to post
Share on other sites

The old way like you described it doesn't work in ArmA anymore, due to the streaming IIRC.

It's a bit more complicated now, here's how I do it:

Place a gamelogic close to the object you want have destroyed, give a unique name like "obj1234".

In a trigger (or script) use this command:

</span><table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">position obj1234 nearestObject 1234 setDamage 1<span id='postcolor'>

In above example 1234 is the ObjectID you want to have destroyed.

And this should be in ArmA - Mission Editing & Scripting. wink_o.gif

Share this post


Link to post
Share on other sites

Perhaps someone should make a pinned topic explaining to everyone before they post with the same problems that that the object ID command must be replaced with nearestObject ID in ArmA.

Share this post


Link to post
Share on other sites

I actually think a lot of these topics should be pinned because they are extremely helpful. It would almost be better if they were catalogued in a pinned topic and just linked to within that topic.

Share this post


Link to post
Share on other sites

Actually I think the wiki should be updated instead with this "doesn't work as before due to streaming" for the relevant commands. "See the following example instead how it is supposed to be done".

Frankly, I love the wiki, but I find the provided examples often very lacking (as a newbie to this weird scripting language).

Share this post


Link to post
Share on other sites

We could rename and transfer one of the stickies that already exist into a ArmA editing FAQ. Trasporting over content from the OFP ME FAQ (only if things are still working of course) should already give a great start. If we add all things that have already been found out in the new Arma ME thread it would certainly give a good start for newbies, still it wouldn´t hold some from posting the same questions over and over again, as they are not able to use the search properly (placing the checkmark at "and older" seems to be something really complicated) or simply do not search at all.

Anyway, I guess transforming the "New to Armed Assault editing" into Arma editing FAQ should be a good start.

Share this post


Link to post
Share on other sites

When we want to delete a vehicle we use the code

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

car is the name of the object.

What if i want to delete an ID from the map?

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  

×