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: Reloading GL - Specify Ammo  (Read 2046 times)

0 Members and 1 Guest are viewing this topic.

Offline Insanoblan

  • Members
  • *
  • Look! Im a chicken Marge!
Reloading GL - Specify Ammo
« on: 07 Mar 2007, 08:35:42 »
I am wondering what the code would be to make an OPFOR soldier load his AK74GL with the FlareWhite_GP25 from his inventory. I've been able to get him to fire the GL, but I don't know how to make him load the Flare, short of removing all of his grenades.
Hey kid, wanna see a dead body!?

Offline Mr.Peanut

  • Former Staff
  • ****
  • urp!
Re: Reloading GL - Specify Ammo
« Reply #1 on: 13 Mar 2007, 18:59:02 »
I would write a script to unload all his nade ammo and replace it with flare ammo and vise versa. I doubt that there is any other way to force this behaviour.�  What happened when you order the unit to fire including the muzzle, mode and magazine type? i.e. unit fire [muzzle, mode, magazine] with the magazine as a flare?

If it was for a cutscene I would fake it.
urp!

Offline Mandoble

  • Former Staff
  • ****
    • Grunt ONE and MandoMissile suite
Re: Reloading GL - Specify Ammo
« Reply #2 on: 13 Mar 2007, 19:46:12 »
To add a red flare to the unit (init field):
Code: [Select]
this removeMagazine "1Rnd_HE_GP25";this addMagazine "FlareRed_GP25"
To make it to fire it:
Code: [Select]
unitname fire ["GP25Muzzle", "GP25Muzzle", "FlareRed_GP25"]
Check this for Magazine Class Names