OFPEC Forum
Editors Depot - Mission Editing and Scripting => Arma2 - Editing/Scripting General => Topic started by: JamesF1 on 16 Mar 2010, 15:37:32
-
I've been looking at this issue for a little while now, but I'm a bit stumped. The only thread I found related to this issue is one I created a while back on a similar topic at the BIS forums :)
The only objects created when an explosion occurs in A2 are of the "CraterLong" class - however, there are numerous effects (such as crater textures, and scorch marks) that are created at the same time. My question is, is there a foolproof way to remove these as well as the crater (the crater is no problem)?
Thanks in advance, as usual, guys :)
-
Config or scripting wise?
Maybe you can find them with nearObjects?
-
Scripting-wise... nearObjects doesn't seem to appear to grab everything (at least, unless I'm missing something). I couldn't find a way to get rid of the ground scorching, for example.
-
If I recall correctly nearObjects will only find objects with classes, nearestObjects will detect all objects (with and without classes). To get a list of only objects without classes use the following code (not my invention, I have mooched it for years). Just change the radius as appropriate (10, 20, etc.), but the bigger the radius the more cpu intensive (10 is not much though):
(nearestObjects [player,[], 10]) - ((getPos player) nearObjects 10)
If the scorch marks are classlesss objects, when they are found they will be referred to by their object number and model name, something like: 156372: foo_bar.p3d. In order to extract the object ID for use you need to do some string manipulation.
Edit:
Is there a chance that the scorch mark is actually a texture that appears when the ground object is damaged?