Warning: include(/var/www/html/forum/Sources/../../../includes/depot_files/OFPEC_get_header_image.inc.php): failed to open stream: No such file or directory in /var/www/html/forum/Sources/Load.php(2272) : eval()'d code on line 146

Warning: include(): Failed opening '/var/www/html/forum/Sources/../../../includes/depot_files/OFPEC_get_header_image.inc.php' for inclusion (include_path='.:/usr/local/lib/php') in /var/www/html/forum/Sources/Load.php(2272) : eval()'d code on line 146

Notice: Undefined index: OFPEC in /var/www/html/forum/Sources/Load.php(2272) : eval()'d code on line 152

Notice: Trying to access array offset on value of type null in /var/www/html/forum/Sources/Load.php(2272) : eval()'d code on line 152

Notice: Trying to access array offset on value of type null in /var/www/html/forum/Sources/Load.php(2272) : eval()'d code on line 152
    Home   Help Login Register  

Author Topic: sweeping machine gun fire  (Read 2869 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.