11aTony
Dec 15 2010, 22:30
Hi all!
I have a small coop mission for 6. One team leader and five subordinates. I have different loadout for each of them. Im using Bon's respawn with loadout (http://forums.bistudio.com/showthread.php?t=106140) script for players but it wont work if slot is controled by AI not human. So here is what I came up with. This is only for one unit. Please be patient with me I have nearly no experiance with this.
for [{bot2 != player}, {alive bot2}, {waitUntil {alive bot2}}] do
{
removeAllWeapons bot2;
//Primary
bot2 addMagazine "30Rnd_556x45_Stanag";
bot2 addMagazine "30Rnd_556x45_Stanag";
bot2 addMagazine "30Rnd_556x45_Stanag";
bot2 addMagazine "30Rnd_556x45_Stanag";
bot2 addMagazine "30Rnd_556x45_Stanag";
bot2 addWeapon "M4A3_CCO_EP1";
//Secondary
bot2 addMagazine "MAAWS_HEAT";
bot2 addMagazine "MAAWS_HEAT";
bot2 addWeapon "MAAWS";
//Equipment
bot2 addMagazine "Laserbatteries";
bot2 addWeapon "Laserdesignator";
bot2 addWeapon "NVGoggles";
bot2 selectWeapon "M4A3_CCO_EP1";
sleep 10;
};
I run this via init.sqf.
It apears to be working, however I was wondering if there is better, more efficient way to do it becouse I have more units with different gear. Or just if there is potential fail in this.
I have a small coop mission for 6. One team leader and five subordinates. I have different loadout for each of them. Im using Bon's respawn with loadout (http://forums.bistudio.com/showthread.php?t=106140) script for players but it wont work if slot is controled by AI not human. So here is what I came up with. This is only for one unit. Please be patient with me I have nearly no experiance with this.
for [{bot2 != player}, {alive bot2}, {waitUntil {alive bot2}}] do
{
removeAllWeapons bot2;
//Primary
bot2 addMagazine "30Rnd_556x45_Stanag";
bot2 addMagazine "30Rnd_556x45_Stanag";
bot2 addMagazine "30Rnd_556x45_Stanag";
bot2 addMagazine "30Rnd_556x45_Stanag";
bot2 addMagazine "30Rnd_556x45_Stanag";
bot2 addWeapon "M4A3_CCO_EP1";
//Secondary
bot2 addMagazine "MAAWS_HEAT";
bot2 addMagazine "MAAWS_HEAT";
bot2 addWeapon "MAAWS";
//Equipment
bot2 addMagazine "Laserbatteries";
bot2 addWeapon "Laserdesignator";
bot2 addWeapon "NVGoggles";
bot2 selectWeapon "M4A3_CCO_EP1";
sleep 10;
};
I run this via init.sqf.
It apears to be working, however I was wondering if there is better, more efficient way to do it becouse I have more units with different gear. Or just if there is potential fail in this.