Welcome to the Iron Front Fan Forums!
Sign up Latest Topics
 
 
 


Reply
  Author   Comment  
shpagin

Avatar / Picture

Lieutenant
Registered:
Posts: 159
Reply with quote  #1 
Is there any way to give the AI heavy MG unlimited ammo?  thanks
0
[EVO] Dan

Sergeant
Registered:
Posts: 85
Reply with quote  #2 
you could write a script thats activated in their init that checks their ammo state every so often and then top them up to maximum ammo. Or you could just have them periodically refill automatically.

The periodic refill would be written a bit like this (no gaurantee this will work though):

Activate it by using:

0 = [this] execVM "scriptname.sqf";

_unit = this select 0;
if(isServer) then{
while{1} do {
sleep 60; // change this to whatever you like
_unit setVehicleAmmo 1;
};
};


Note this will only work on the heavy machine guns (statics). Also will work for anything classed as a vehicle (such as tanks)

Please post back here if you use the code and it works.
0
shpagin

Avatar / Picture

Lieutenant
Registered:
Posts: 159
Reply with quote  #3 
Thanks Dan will try it and report back. 

0
Joe98

Avatar / Picture

Captain
Registered:
Posts: 196
Reply with quote  #4 

If you want a weapon to have 6 magazines you would use this:

this addMagazine "20Rnd_762x51_B_SCAR"} forEach [1,2,3,4,5,6];

 .

If you want the weapon to have unlimited ammo perhaps go to 50 magazines
.

 

0
Previous Topic | Next Topic
Print
Reply

Quick Navigation:

Easily create a Forum Website with Website Toolbox.