Author Topic: sweeping machine gun fire  (Read 490 times)

0 Members and 1 Guest are viewing this topic.

Offline ZapBrannigan

  • Members
  • *
sweeping machine gun fire
« 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.

Offline mikey

  • Former Staff
  • ****
  • Whitespace Whore
Re: sweeping machine gun fire
« Reply #1 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.