@GaReb: Have you tried the sample mission in the 1st post? It has an ammo truck example, and you can see how the script was called for that.
For an armored vehicle, it might look funny for missles to be flying out of it while its burning though...
Which type of armored vehicle are you using? If you tell me, I will try a quick test on that particular vehicle.
Edit: I have tested with armored vehicle, and there is definitely a problem. Thanks for reporting this. I am now looking into this, but it make take a few days, as I am buried with job and real life right now.Edit2: I know what the problem is.
The problem is that I am using a Mine object as a marker object around which to center the explosions:
_marker = "MINE" createvehicle _orig_pos;
As we all know, armored vehicles set off mines, so the object is destroyed, which makes this script not work for armored vehicles.
I needed an object other than the original object to serve as a marker because ammo boxes did not burn very long, and I needed to create and replace them with new ammo box objects. An object is also needed by the modelToWorld commands used later for random placement of explosions:
_pos = _marker modelToWorld [-5 + floor (random 10), -5 + floor(random 10),.2];
_obj="B_25mm_HE" createvehicle _pos;
I have tried using other objects as markers, like the HeliHEmpty and RoadCone, but the engine incorrectly places these objects a few meters away from the original object's center (probably to avoid object collision). This results in the effects being centered in the wrong position.
To fix this I have 2 options:
1. Find another small or invisible object that the engine will place precisely under the vehicle (rather than engine choosing to offset the placement). Or...
2. Significantly re-write the code to not use marker objects.
I don't have time for option 2, so I am hoping to find another small or invisible object that can be created under a vehicle via this command:
_marker = "smallObjectName" createvehicle _orig_pos;
Any ideas anyone? What about the crater burn object...anybody know the name for that?