OFPEC Forum

Editors Depot - Mission Editing and Scripting => ArmA - Editing/Scripting General => Topic started by: Ding on 18 Feb 2007, 09:38:41

Title: Object ID help
Post by: Ding on 18 Feb 2007, 09:38:41
In operation flashpoint if I wanted to make an object such as a tree or fence to be destroyed I would find the objects ID and then use the command

(Object XXXX) setdammage 1

when I tried doing the same in Armed assault nothing happened, is there some different way of doing this for AA? or have I just made some mistake?

thanks, ding :)

Edit: Looking at the Comref it says the Object command is only for OFP, Is there a new command or somthing else along those lines?
Title: Re: Object ID help
Post by: Mandoble on 18 Feb 2007, 10:17:46
us any of the nearest object commands with coordinates quite close to the object to want to use.
Title: Re: Object ID help
Post by: h- on 18 Feb 2007, 10:18:18
Strangely enough I tried to use that in a trigger and
Code: [Select]
(object 1090) setDamage 1caused an error saying missing )  ???
and using no () causes an error saying missing ;.....

I then tried
Code: [Select]
((position player) nearestObject 1090) setDamage 1And that seemed to destroy the object in question..

Don't know how far from the given position (player) it does that though. Tested from roughly 100 meters away and the object still got destroyed..
(the object was a bush)
Title: Re: Object ID help
Post by: messiahua on 19 Feb 2007, 13:26:35
From the BIKI:

http://community.bistudio.com/wiki/object
Quote
Since Armed Assault this command is no longer available due to terrain data streaming, you need to use extended variant of nearestObject instead.

http://community.bistudio.com/wiki/nearestObject_id
Quote
Position should be accurate, function is not guaranteed to find objects further than 50 m away.
Title: Re: Object ID help
Post by: h- on 19 Feb 2007, 22:52:09
Ah, that answers my 'wonderings' in another thread :P