Hi everybody!
I need a small script to give back weapons and ammo to AIs after their swimming...
I know one that works great with players, but not with AIs...
I've tried doing it myself, but definetely, i'm not a talented scripter!
Thanks!!
Here is what i've done as I don't care of the type of weapon, I just don't want to see unarmed AIs:
Created a trigger with in the activation line:
{[_x] exec "addweapons.sqs"} forEach units groupone
Then a small script:
? !isServer : exit
_unit = _this select 0
?!(_unit hasWeapon) then goto "add"
#add
_unit addweapon "AK74";
_unit addMagazine "30Rnd_545x39_AK";
_unit addMagazine "30Rnd_545x39_AK";
_unit addMagazine "30Rnd_545x39_AK";
_unit addMagazine "30Rnd_545x39_AK";
_unit addMagazine "30Rnd_545x39_AK";
_unit addMagazine "30Rnd_545x39_AK";
exit
And I've got that message: (see picture)
I really don't know why!
And when I test it, the AIs get the corect number of magazines...
Help!!