OFPEC Forum

Editors Depot - Mission Editing and Scripting => ArmA - Editing/Scripting General => Topic started by: bardosy on 10 May 2007, 09:15:33

Title: How I force the AI to put a mine?
Post by: bardosy on 10 May 2007, 09:15:33
I know how could I force the AI to put a pipebomb:
Code: [Select]
unitname Fire ["pipebombmuzzle", "pipebombmuzzle", "pipebomb"];
but how could I force the AI to put a mine?

I tried these:

Code: [Select]
unitname Fire ["minemuzzle", "minemuzzle", "MineE"];

unitname Fire ["put", "minemuzzle", "MineE"];

unitname Fire ["put", "MineE"];

but didn't work... :(
Title: Re: How I force the AI to put a mine?
Post by: Planck on 10 May 2007, 14:35:16
Try plain old Mine........or.....failing that MineMine.

I would try but , I'm a little busy right now.   :D


Planck

Title: Re: How I force the AI to put a mine?
Post by: bardosy on 10 May 2007, 14:58:45
It's not too realistic in ArmA, but Mine and MineMine explode only by OPFOR. If you put Mine or MineMine and get in an Abrams, you can drive through and back on the mine safely. I want use MineE, because I want stop a BLUEFOR armor.
Title: Re: How I force the AI to put a mine?
Post by: h- on 10 May 2007, 19:07:05
Code: [Select]
unitname fire "MineEMuzzle"or
Code: [Select]
unitname fire ["MineEMuzzle","MineEMuzzle"]
The problem is that the unit will not play the anim for putting the mine, the mine just appears on the ground..
Me thinks a bug :scratch:
Title: Re: How I force the AI to put a mine?
Post by: JasonO on 11 May 2007, 19:35:29
You could always simulate it with playmove or switchmove :)
Title: Re: How I force the AI to put a mine?
Post by: h- on 11 May 2007, 19:39:28
Yes, but the AI should do it automaticly.
I see no reason what so ever why it shouldn't..
Title: Re: How I force the AI to put a mine?
Post by: Mr.Peanut on 11 May 2007, 21:58:40
It's not a bug; it's a feature!  Exactly the same feature as in OFP. Think of all the freedom it gives you to play any animation you want whilest your AI places a mine!!! AWESOME!
Title: Re: How I force the AI to put a mine?
Post by: The-Architect on 11 Aug 2008, 03:23:12
Sorry for digging this up.

When I use the syntax above to get an AI unit to place a mine, he doesn't.

Has the command been changed in a patch?
Title: Re: How I force the AI to put a mine?
Post by: Spooner on 11 Aug 2008, 11:24:01
Both of the suggestions made by h- work fine for me.
Title: Re: How I force the AI to put a mine?
Post by: The-Architect on 11 Aug 2008, 11:43:13
That is odd.

I am using the VTE mod however and I am using removemagazine commands to make space in the inventory and adding the mine magazine after that. I'll try again later.
Title: Re: How I force the AI to put a mine?
Post by: Spooner on 11 Aug 2008, 13:12:43
Try using a regular BIS mine first (this addMagazine "mine"; this fire "MineMuzzle") and see if that works. If it does, then you are probably trying to use the wrong muzzle name for the 3rd party mine you want.
Title: Re: How I force the AI to put a mine?
Post by: The-Architect on 11 Aug 2008, 23:30:16
Ok, I got it working with a VTE Engineer.

The problem must have been something to do with the way I added the weapon (BIS MineE) to the init line. Strange.