The new BAF IEDs work like Satchel Charges. You can place them and detonate them within 300m remotely. You can even command, via the Action Commands, a grouped AI to place and Touchoff a BAF IED. A demo mission showing these commands at work is available.
There are two types of IED in BAF - garbage (shells under garbage) and ground (buried IED). Each type has a large and small explosion version:
Satchel charges in A2 just need "pipebombmuzzle" to be used via scripting. BAF IEDs are slightly more complicated, with each IED having it's own muzzle name as shown here. An ammobox filled with IEDs is available under Empty -> Ammo -> Explosives Stash (or by using the BAF_IEDBox classname to create one).
In A2:BAF to get an AI to place an IED via scripting you use these commands:
To equip an AI with an IED:
this addMagazine "BAF_ied_v2";
To place an IED (replace the muzzle classname with the matching muzzle type for whatever class IED the unit has):
placingUnit Fire ["BAF_ied_v2_muzzle"]
To explode an IED:
anyUnit action ["TOUCHOFF", placingUnit];
The action command TOUCHOFF can use any unit to set off the IED. Even if the placing unit is dead.
IEDs can be set to explode via timer as well, just like a satchel charge.
Players will see incorrect labels in their action menu for these IEDs. They will see "Put IED (ground large)" for the V3 version which is actually just "ground", the small charge.
V1 (garbage small) is also broken to various degrees. Players won't even get the option to place it. If you use the action commands to tell an AI to place it your action will be blank and he'll set it to 30 seconds automatically. Thankfully it's a small bang!
Video of the demo mission:
Last edited by kylania; Aug 29 2010 at 23:13.
Reason: Demo mission added.
Sorry I can't help you, but I've spent the best part of a day working along the same lines as you, I feel I've tried every command (except the correct one) to make an AI person just take an IED out of his inventory and put it on the ground, I too have noticed v1 has problems, so I've used v2 for my tests.
I feel should we get an AI to place one the touchoff/timer part will be as piece of cake with the action you describe, as I've used in the past to have the AI blow stuff up.
With out the ability to open the pbo's (my 1st port of call was and always has been to see how BIS use them in there missions) I have now given up till we get some further info.
The thing that bothers me is, in the BAF campaign (I'm only on the 3rd mission) for an IED in a market they have a pipebomb or timebomb not the new type IED's, so is it not possible they arn't usable by the AI or scripting.
Also have you noticed that giving an AI OPFOR the IED backpack results in an IED being created at his feet & stays there when he moves.
I can only conclude there is far more to this IED part than meets the eye or it's just non functional in the way I/We are trying to use it.
It's a shame I was looking forward to AI OPFOR or CIVS runing around placing IED's and setting timers etc.
On a side note is there any way to touchoff or set a timer on a created Pipebomb/Timebomb by scripting or the AI, that could be a workround.
If I come up with any more I'll add it to this topic.
Just seen your updated post, Wow, havn't read it yet but will be in a couple of seconds. You certainly seem to have given all the required info, thank a lot, due to you I can now get on with the rest of my mission making.