Jump to content
Sign in to follow this  
kylania

Using BAF IED's via scripting.

Recommended Posts

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:

ieds.jpg

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).

IED Classnames and Muzzlenames:

CLASSNAME       MUZZLENAME
BAF_ied_v1      BAF_ied_v1_muzzle
BAF_ied_v2      BAF_ied_v2_muzzle
BAF_ied_v3      BAF_ied_v3_muzzle
BAF_ied_v4      BAF_ied_v4_muzzle

AMMOBOX:
BAF_IEDBox

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.

Bug Notes:

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:

L9XO2mIHNbY

Edited by kylania
Demo mission added.

Share this post


Link to post
Share on other sites

Hi,

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.

Regards

James

Share this post


Link to post
Share on other sites

If you get an AI to place an IED via the Action Command Menu, using the action touchoff command will get it to exploded. So we just need to figure out how to unit Fire these things! :)

Edit: Success!! First post updated with muzzle information!

Edited by kylania

Share this post


Link to post
Share on other sites

kylania,

Damn it my friend you are awesome! I don't know what some of us would do with out you in this section.

Thank you!

Share this post


Link to post
Share on other sites
If you get an AI to place an IED via the Action Command Menu, using the action touchoff command will get it to exploded. So we just need to figure out how to unit Fire these things! :)

Edit: Success!! First post updated with muzzle information!

Could you upload a practice mission where this works. So we could see it. One we can look at in the editor without having to unpack/PBO.

Share this post


Link to post
Share on other sites

@Kylania

Great news, well done.

But am I being blind I can't see the muzzle information you say you've updated in the 1st post, if you would be kind enough to let me know what it is that would be fantastic.

Regards

James

Share this post


Link to post
Share on other sites

Sorry for the delay, decided to do a more comprehensive explanation than just put the muzzle things up. :) Next up is figuring out how the IED backpack works. heh

Share this post


Link to post
Share on other sites

@ Kylania

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.

Regards

James

Share this post


Link to post
Share on other sites
Could you upload a practice mission where this works. So we could see it. One we can look at in the editor without having to unpack/PBO.

Demo added to the first post. :)

Share this post


Link to post
Share on other sites

Can I ask a silly question. What's the difference between OA pipebomb and BAF IED.

They seem actually the same.

Share this post


Link to post
Share on other sites

They are essentially, but instead of a small green package on the road, you'll see the new IED objects.

Share this post


Link to post
Share on other sites

Fantastic, now it's just a shame they can't work out to set off satchels for ambushes on their own

Obviously, easiest way to do it would simply be a set of waypoints to place it then a trigger to set it off based on activation.. I might script together something to do with needing to spot the target and the like

Share this post


Link to post
Share on other sites

This may be a dumb question, but...

Is anyone sending any of this feedback (and the stuff in Pte Frank [3para]'s thread) to BIS, maybe via dwarden?

I get the sense that either some things in the new IED objects aren't quite finished by BIS or this is the beginning of development of a new feature that they, hopefully, will continue to improve. Maybe letting them know about what the community want in this regard will actually inspire them to improve it.

Top of my list is the ability to easily add them via the editor and set a trigger to explode them when driven over/stepped on.

Share this post


Link to post
Share on other sites
Top of my list is the ability to easily add them via the editor and set a trigger to explode them when driven over/stepped on.

Like this? :)

Share this post


Link to post
Share on other sites

Yes, exactly like that. ;)

But we won't get if we don't ask BIS, right? Is someone asking them?

Dumb question number 2 (because I'm a complete incompetent at scripting and stuff)...

Is there some way to make Arma 2 think that the new IED is a mine, and therefore be triggered when driven over, but display the object as one of the new IEDs?

---------- Post added at 12:44 AM ---------- Previous post was at 12:34 AM ----------

Is anyone sending any of this feedback (and the stuff in Pte Frank [3para]'s thread) to BIS, maybe via dwarden?

Decided to take matters into my own hands and PMed Dwarden, inviting him to come in and have a look at this thread. Maybe it will help? ;)

Share this post


Link to post
Share on other sites

I'm assuming I could make a trigger so that if the AI that set it spots an Allied unit near the bomb they will trigger it? I'm thinking along the lines of the BAF campaign mission with the spotter in the house that you have to take out without him seeing you.

Share this post


Link to post
Share on other sites

Just logged in to say thanks for this amazing thread. I've been developing lots of custom EOD scripts and stuff..BAF just makes it a lot more juicy for me and I really needed this thread.

Keep it up, thanks ;)

Share this post


Link to post
Share on other sites

If they were that bad at hiding them IRL it sure would make things easier, any chance we could get one that looks like someone knew what they were doing?

Share this post


Link to post
Share on other sites
If they were that bad at hiding them IRL it sure would make things easier, any chance we could get one that looks like someone knew what they were doing?

If they're made and deployed by someone who knows what they're doing, you're not going to see anything. In Arma just setup a script with a Trigger on a random piece of ground :)

Anyway, for these ones mission-makers could use setpos beneath ground level etc and make it so only a fraction is visible.

Or if they're deployed in-game by players it seems easy to do it in ways that wont be seen by players anyway. Vegetation, between rocks, blind building corners, underneath parked or destroyed vehicles, beneath corpses, etc. That's the game of it.

Edited by Swedge

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×