OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Serial Killer on 07 Sep 2005, 16:37:53

Title: Making A.I. to fire?
Post by: Serial Killer on 07 Sep 2005, 16:37:53
How can I make A.I. to fire without aiming anything? I just need to make him fire with his gun.

Sometimes DoFire command doesn't work, so I have no idea how to do this...
Title: Re:Making A.I. to fire?
Post by: macguba on 07 Sep 2005, 16:45:29
loon1 fire "M16"
Title: Re:Making A.I. to fire?
Post by: 456820 on 07 Sep 2005, 17:24:04
theres also another fire command in the comref the fire one suggested by Macguba there should make the unit fire up into the air you can use dowatch and dotarget to make him target something and one more thing with this command it makes him usually fire a 3 shot burst same with machine gunners
so if you want just one shot fired i think you might need the other fire command in the comref wich can also make him fire his 40mm grenadeds from the 203

anyway hope that may help in anyway
Title: Re:Making A.I. to fire?
Post by: paddy on 08 Sep 2005, 13:51:42
I dont like the multiple array version of the fire comand.  It makes units fire in the air (big glitch) and even when i use dowatch and dotarget it doesn't seem to work.

If i were u stick to _unit fire "weapon name"

P.S. if you want to find out other weapon names, look at the official COMREF.  For addons, most addon makers will supply documentation where u can find the weapon names.

On the other hand look in the editors depot for event handler tutorials, these could help you as well especially the 'fired' one.