how i can explode shells at given times? What is the command?
There is no command to do this. But it is possible to have airburst ammo in ArmA. I'm currently testing some for the Vulcan. Here's what I did:
Step #1: Create a new ammo typeThe original ammo for the Vulcan has no
explosionTime set. So I created a new ammo type that explodes immediately after creation.
...
class CfgAmmo {
class B_20mm_AA;
class B_20mm_AA_Burst : B_20mm_AA {
explosionTime = 0.00001; // zero won't work properly!
};
};
...
Step #2: Replace the fired bullet via scriptIt goes like this:
- Detect when the gun is fired (via the "Fired" event handler)
- Find all bullets near the gun (via
nearObjects).
- There may be "foreign" bullets around so find all bullets that were fired from this gun (comparison of two vectors: bullet
velocity and
weaponDirection).
- If the bullet was fired from the gun, start a tiny "fuse script" that waits and then replaces the old bullet (the non-exploding one) with the new one (that explode immediately after creation).
This approach works pretty well considering the high RPM rate of the M168. I'll try to create example mission so you can have a look at it. Just give me a day or two.