Page 1 of 3 123 LastLast
Results 1 to 10 of 25

Thread: Using BAF IED's via scripting.

  1. #1

    Using BAF IED's via scripting.

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

    IED Classnames and Muzzlenames:
    Code:
    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:
    Code:
    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):
    Code:
    placingUnit Fire ["BAF_ied_v2_muzzle"]
    To explode an IED:
    Code:
    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:

    Last edited by kylania; Aug 29 2010 at 22:13. Reason: Demo mission added.

  2. #2
    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

  3. #3
    First Lieutenant kylania's Avatar
    Join Date
    May 20 2009
    Posts
    5,979
    Author of the Thread
    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!
    Last edited by kylania; Aug 29 2010 at 18:38.

  4. #4
    First Lieutenant Manzilla's Avatar
    Join Date
    May 30 2007
    Location
    In the lab cooking up some serious s#%t!
    Posts
    5,118
    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!
    (God damn bananas..... again)

    Join the most rootin', tootin'est crew on these here forums! That's right folks we're darn tootin'.

    Mike Tyson's ode to Manzilla's SP playing style:
    My style is impetuous. My defense is impregnable and I'm just ferocious.... I want your heart, I want to eat his children! Praise be to Allah!

  5. #5
    Quote Originally Posted by kylania View Post
    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.

  6. #6
    @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

  7. #7
    First Lieutenant kylania's Avatar
    Join Date
    May 20 2009
    Posts
    5,979
    Author of the Thread
    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

  8. #8
    @ 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

  9. #9
    First Lieutenant kylania's Avatar
    Join Date
    May 20 2009
    Posts
    5,979
    Author of the Thread
    Quote Originally Posted by meade95 View Post
    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.

  10. #10

Page 1 of 3 123 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •