Do you like things go boom? You’re in luck if you do, as in Arma 3 there are plenty of such things! Apart from mines and various explosive projectiles there is also a Demo Charge and a Satchel Charge available. Both can be placed by a soldier and either remote detonated or put on timer. The charges are part of inbuilt functionality of the game. Once you have added Demo/Satchel Charge magazine to your inventory (provided you have space), the option to place the charge becomes available from scroll action menu, and once placed you get option to detonate.

player addMagazine "DemoCharge_Remote_Mag"; player addMagazine "SatchelCharge_Remote_Mag";

If you placed 10 charges you will be able to detonate all 10 at once, there is no selective detonation, which kinda sucks. But this is not all. If you decide to place a charge by script alone, it gets even more complicated. I have spent a fair amount of time trying to figure out how to do it and finally found a way that works every time all the time. However this was after I submitted a feature request for scripted version of charges. My wish was eventually granted by the grand wizard of Configland, Lord Pettka.

So in order to place a charge with scripted solution alone, you need to select the correct muzzle, “fire” the magazine and then force reload because otherwise you won’t be able to fire again. Here is the working solution which is not too bad and I would have settled for it if my feature request wasn’t granted:

player playActionNow "PutDown"; player addMagazine "DemoCharge_Remote_Mag"; player selectWeapon "DemoChargeMuzzle"; player fire ["DemoChargeMuzzle", "DemoChargeMuzzle", "DemoCharge_Remote_Mag"]; player setWeaponReloadingTime [player, "DemoChargeMuzzle", 0];

If you read the ticket, it pretty much explains why the _Scripted class variation was needed. As you have noticed I asked only for “DemoCharge_Remote_Ammo_Scripted”, but Pettka also added a “SatchelCharge_Remote_Ammo_Scripted” out of kindness of his heart :) . On the following video you can see me testing new class by setting off a bunch of Demo Charges in sequence placing next charge above previous, which kinda looks like a missile launch.

Added benefit of scripted classes is that if you shoot them they will go boom. Maybe not too realistic, but it is a game after all. The main benefit however is that now you can select which charge to detonate. I just ran a quick test and made a video to demonstrate this principle:

Here is the code I used in the video:

c4 = []; player addAction ["Place Charge", { player playActionNow "PutDown"; _c4 = "DemoCharge_Remote_Ammo_Scripted" createVehicle position player; _n = count c4; c4 set [_n, _c4]; player addAction [format ["Detonate Charge #%1", _n + 1], { player removeAction (_this select 2); (c4 select (_this select 3)) setDamage 1; }, _n]; }];

Enjoy,
KK

EDIT: Just a small note. If you want to prevent your scripted charge from going off when shot or damaged, attach it to something with attachTo. You might need to detach it before setting damage 1 to it to set it off.

Scripted Charges V2