OFPEC Forum

Editors Depot - Mission Editing and Scripting => Arma2 - Editing/Scripting General => Topic started by: ZapBrannigan on 11 Nov 2009, 18:15:51

Title: sweeping machine gun fire
Post by: ZapBrannigan on 11 Nov 2009, 18:15:51
how can i make machine gunners fire in a sweeping arc, to cover a wide area not just point by point. also they shouldnt stop firing just because they dont have a line of sight to the enemy.

at the same time, how can i make soldiers prepare for an assault by moving to some sandbags, then taking cover behind them until it is time for the attack, then all of them rushing at the same time.  there is a big open area and if they stop in it they will all die so i need them to run thru to the other side without stopping.
Title: Re: sweeping machine gun fire
Post by: mikey on 12 Nov 2009, 13:15:24
All you need is a firing script that makes the AI fire its weapon, and a script that turns the unit's weapon around. You could make your own firing script, or you can search for inkompetents simple firing script (inko_sfs).
To change the gun direction, use the setFormDir command, which I've used in the past for moving searchlights around, but you could also use it for a gun direction of static weapons.