Home   Help Search Login Register  

Author Topic: Deleting Craters & Effects  (Read 2414 times)

0 Members and 1 Guest are viewing this topic.

Offline JamesF1

  • Editors Depot Staff
  • *****
    • JamesBurgess.co.uk
Deleting Craters & Effects
« 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 :)
« Last Edit: 16 Mar 2010, 15:52:02 by JamesF1 »

Offline kju

  • Members
  • *
    • PvPScene - The ArmA II multiplayer community
Re: Deleting Craters & Effects
« Reply #1 on: 18 Mar 2010, 07:54:58 »
Config or scripting wise?

Maybe you can find them with nearObjects?

Offline JamesF1

  • Editors Depot Staff
  • *****
    • JamesBurgess.co.uk
Re: Deleting Craters & Effects
« Reply #2 on: 18 Mar 2010, 16:17:50 »
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.

Offline Loyalguard

  • Former Staff
  • ****
Re: Deleting Craters & Effects
« Reply #3 on: 18 Mar 2010, 18:27:20 »
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):


Code: [Select]
(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?
« Last Edit: 18 Mar 2010, 20:37:19 by Loyalguard »