Rawhide 2 Posted August 11, 2008 Hi, I'm making a weapon rearm script that is ment to be using at the start of the mission. The idea is to have one script that gives different types of weapons and ammunition depending on whay type of soldier it is. Therefore should the script be used on every man. I know I must make one #Soldiertype for each soldier. I have not included every type in this example to simplify the overlook. The problem is that I haven't found a way to define the soldier classes within the script. This is the line I need help with: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">?typeOf _unit = "SoldierWB" : goto "SoldierWB"; I have had these more or less ambitious attemps: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">?_class = typeOf "SoldierWB" : goto "SoldierWB"; ?_unit typeof vehicle "SoldierWB" : goto "SoldierWB"; ?_unit = typeOf "SoldierWB" : goto "SoldierWB" ?typeOf _unit = "SoldierWB" : goto "SoldierWB"; ?_unit is Vehicle = "SoldierWB" : goto "SoldierWB";None seem to work. This is the whole script (to give you an overview): <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">_unit = _this RemoveAllWeapons _this; _this addMagazine "15Rnd_9x19_M9SD"; _this addMagazine "15Rnd_9x19_M9SD"; _this addMagazine "15Rnd_9x19_M9SD"; _this addMagazine "15Rnd_9x19_M9SD"; _this addMagazine "15Rnd_9x19_M9SD"; _this addMagazine "15Rnd_9x19_M9SD"; _this addWeapon "M9SD"; _this addWeapon "NVGoggles"; _this addWeapon "Binocular"; _this addMagazine "SmokeShellRed"; _this addMagazine "SmokeShellGreen"; _this addMagazine "SmokeShell"; ~0.1 ?typeOf _unit = "SoldierWB" : goto "SoldierWB"; ~0.1 ?typeOf _unit = "SoldierWG" : goto "SoldierWG"; ~0.1 ?typeOf _unit = "SoldierWMedic" : goto "SoldierWMedic"; ~0.1 #SoldierWB _this addMagazine "30Rnd_556x45_Stanag"; _this addMagazine "30Rnd_556x45_Stanag"; _this addMagazine "30Rnd_556x45_Stanag"; _this addMagazine "30Rnd_556x45_Stanag"; _this addMagazine "HandGrenade"; _this addWeapon "M16A4_ACG"; Goto "The_end" #SoldierWG _this addMagazine "30Rnd_556x45_Stanag"; _this addMagazine "30Rnd_556x45_Stanag"; _this addMagazine "30Rnd_556x45_Stanag"; _this addMagazine "30Rnd_556x45_Stanag"; _this addMagazine "1Rnd_HE_M203"; _this addMagazine "1Rnd_HE_M203"; _this addMagazine "1Rnd_HE_M203"; _this addMagazine "1Rnd_HE_M203"; _this addMagazine "1Rnd_HE_M203"; _this addMagazine "1Rnd_HE_M203"; _this addWeapon "M16A4_ACG_GL"; Goto "The_end" #SoldierWMedic _this addMagazine "30Rnd_556x45_Stanag"; _this addMagazine "30Rnd_556x45_Stanag"; _this addMagazine "30Rnd_556x45_Stanag"; _this addMagazine "30Rnd_556x45_Stanag"; _this addMagazine "30Rnd_556x45_Stanag"; _this addMagazine "HandGrenade"; _this addMagazine "HandGrenade"; _this addMagazine "HandGrenade"; _this addMagazine "HandGrenade"; _this addWeapon "M16A4_ACG"; Goto "The_end" #The_end exit; The script is named addWeapons.sqs, and is being launched via the units init: this exec "addWeapons.sqs". Resources: Soldier types: http://community.bistudio.com/wiki/ArmA:_Infantry Armes & ammo: http://community.bistudio.com/wiki/ArmA:_Weapons#Personal_Weapons_3 Any help would be much appreciated! Best regards, -Rawhide Share this post Link to post Share on other sites
Messiah 2 Posted August 11, 2008 if you script is executed like this: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">[this] exec "addWeapons.sqs" then the script would start: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">_unit = _this select 0 ?(typeof _unit = "soldierwb") : goto "SoldierWB" etc the best thing to do is add debuggers into a script to help you work out where things get unstuck. Simple hints will suffice at each stage. SoliderWB may also be a restricted name to use, so try something else to 'goto'. I'd probably quickly make sure the synthax works as expected by doing adding this to a soldierwb type soldier: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">[unit] exec "test.sqs" and then <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> _unit = _this select 0 ?(typeof _unit = "soldierwb") : goto "itworks" exit #itworks hint "It works" exit Share this post Link to post Share on other sites
Rawhide 2 Posted August 11, 2008 Great! I will try it out later and report back. If that did the whole trick, you will have the complete script presented later this week. Thanks Messiah! -Rawhide Share this post Link to post Share on other sites
Rawhide 2 Posted September 16, 2008 Forgot to give you the finished script. It should have been .sqf, but that was to difficult for me. If anyone would like to transform it - go ahead. Name the script addWeapons.sqs and launch via init on player: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">[this] exec "addWeapons.sqs" Script: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> ;;This script replaces your units standard weapon loadout with whatever defined below. ;;PS! Script only made for west soldiers. Queens Gambits west types are included. ;;Load script from the unit: [this] exec "addWeapons.sqs". ;;Weapons: http://community.bistudio.com/wiki/ArmA:_Weapons#Personal_Weapons_3 ;;Thanks to Igor and NoBrainer at NoPryl and Messiah at UKF ;;Script by [ACAT]Rawhide ~0.5 ~(random 1) _unit = _this select 0 Removeallweapons _unit ;;Exceptions: exchange the *'s with a unit name (don't add ") and remove the;;'s in the beginning. ;;Add ammo specs at the bottom of the script. ;;?(_unit == *******) : goto "Exception1" ;;?(_unit == *******) : goto "Exception2" ;;?(_unit == *******) : goto "Exception3" ;;?(_unit == *******) : goto "Exception4" ;;?(_unit == *******) : goto "Exception5" ;;?(_unit == *******) : goto "Exception6" ;;Define what soldiertype: ?(typeof _unit == "SoldierWB") : goto "Rifleman" ?(typeof _unit == "SoldierWG") : goto "Grenadier" ?(typeof _unit == "SoldierWMedic") : goto "Medic" ?(typeof _unit == "SoldierWNOG") : goto "Rifleman2" ?(typeof _unit == "SoldierW") : goto "Grenadier2" ?(typeof _unit == "SoldierWAR") : goto "AutomaticRifleman" ?(typeof _unit == "SoldierWMG") : goto "Machinegunner" ?(typeof _unit == "SoldierWAT") : goto "ATSpecialist" ?(typeof _unit == "SoldierWAA") : goto "AASpecialist"    ?(typeof _unit == "SoldierWSniper") : goto "Sniper" ?(typeof _unit == "SoldierWSaboteur") : goto "SFSabouteur0" ?(typeof _unit == "SoldierWSaboteurPipe") : goto "SFSaboteur" ?(typeof _unit == "SoldierWSaboteurPipe2") : goto "SFSaboteur2" ?(typeof _unit == "SoldierWSaboteurRecon") : goto "SFRecon" ?(typeof _unit == "SoldierWSaboteurAssault") : goto "SFAssault" ?(typeof _unit == "SoldierWSaboteurMarksman") : goto "SFMarksman" ?(typeof _unit == "SoldierWMiner") : goto "Engineer" ?(typeof _unit == "SquadLeaderW") : goto "SquadLeader" ?(typeof _unit == "TeamLeaderW") : goto "TeamLeader" ?(typeof _unit == "OfficerW") : goto "Officer" ?(typeof _unit == "SoldierWPilot") : goto "Pilot" ?(typeof _unit == "SoldierWCrew") : goto "Crewman" ?(typeof _unit == "BISCamelPilot") : goto "CamelPilot" ?(typeof _unit == "SoldierMMG") : goto "MercenaryMG" ?(typeof _unit == "SoldierMR") : goto "MercenaryRepair" ?(typeof _unit == "SoldierMS") : goto "MercenarySniper" ?(typeof _unit == "SoldierMD") : goto "MercenaryDemolition" ?(typeof _unit == "SoldierMG") : goto "MercenaryGrenadier" ?(typeof _unit == "SoldierMTeamLeader") : goto "MercenaryTeamLeader" ;;Debugger: hint "addWeapons.sqs does not work" exit ;;Types of soldiers and adding different ammo: #Rifleman ;;hint "Riflemen" _unit addMagazine "30Rnd_556x45_Stanag" _unit addMagazine "30Rnd_556x45_Stanag" _unit addMagazine "30Rnd_556x45_Stanag" _unit addMagazine "30Rnd_556x45_Stanag" _unit addMagazine "30Rnd_556x45_Stanag" _unit addMagazine "30Rnd_556x45_Stanag" _unit addMagazine "SmokeShellRed" _unit addMagazine "SmokeShellGreen" _unit addMagazine "SmokeShell" _unit addMagazine "SmokeShell" _unit addMagazine "HandGrenade" _unit addMagazine "HandGrenade" _unit addWeapon "M16A4_ACG" _unit addWeapon "NVGoggles" _unit addWeapon "Binocular" _unit selectweapon "M16A4_ACG" goto "PistolM9SD" #Grenadier ;;hint "Grenadier" _unit addMagazine "30Rnd_556x45_Stanag" _unit addMagazine "30Rnd_556x45_Stanag" _unit addMagazine "30Rnd_556x45_Stanag" _unit addMagazine "30Rnd_556x45_Stanag" _unit addMagazine "30Rnd_556x45_Stanag" _unit addMagazine "30Rnd_556x45_Stanag" _unit addMagazine "30Rnd_556x45_Stanag" _unit addMagazine "30Rnd_556x45_Stanag" _unit addMagazine "SmokeShellRed" _unit addMagazine "SmokeShellGreen" _unit addMagazine "SmokeShell" _unit addMagazine "SmokeShell" _unit addMagazine "1Rnd_HE_M203" _unit addMagazine "1Rnd_HE_M203" _unit addMagazine "1Rnd_HE_M203" _unit addMagazine "1Rnd_HE_M203" _unit addMagazine "1Rnd_HE_M203" _unit addMagazine "1Rnd_HE_M203" _unit addMagazine "1Rnd_HE_M203" _unit addMagazine "1Rnd_HE_M203" _unit addWeapon "M16A4_ACG_GL" _unit addWeapon "NVGoggles" _unit addWeapon "Binocular" _unit selectweapon "M16Muzzle" exit #Medic ;;hint "Medic" _unit addMagazine "30Rnd_556x45_StanagSD" _unit addMagazine "30Rnd_556x45_StanagSD" _unit addMagazine "30Rnd_556x45_StanagSD" _unit addMagazine "30Rnd_556x45_StanagSD" _unit addMagazine "SmokeShellRed" _unit addMagazine "SmokeShellGreen" _unit addMagazine "SmokeShell" _unit addMagazine "SmokeShell" _unit addWeapon "M4A1SD" _unit addMagazine "15Rnd_9x19_M9SD" _unit addMagazine "15Rnd_9x19_M9SD" _unit addMagazine "15Rnd_9x19_M9SD" _unit addMagazine "15Rnd_9x19_M9SD" _unit addWeapon "M9SD" _unit addWeapon "NVGoggles" _unit addWeapon "Binocular" _unit selectweapon "M4A1SD" exit #Rifleman2 _unit addMagazine "30Rnd_556x45_Stanag" _unit addMagazine "30Rnd_556x45_Stanag" _unit addMagazine "30Rnd_556x45_Stanag" _unit addMagazine "30Rnd_556x45_Stanag" _unit addMagazine "30Rnd_556x45_Stanag" _unit addMagazine "30Rnd_556x45_Stanag" _unit addMagazine "SmokeShellRed" _unit addMagazine "SmokeShellGreen" _unit addMagazine "SmokeShell" _unit addMagazine "SmokeShell" _unit addMagazine "HandGrenade" _unit addMagazine "HandGrenade" _unit addWeapon "M16A4_ACG" _unit addWeapon "NVGoggles" _unit addWeapon "Binocular" _unit selectweapon "M16A4_ACG" goto "PistolM9SD" #Grenadier2 _unit addMagazine "30Rnd_556x45_Stanag" _unit addMagazine "30Rnd_556x45_Stanag" _unit addMagazine "30Rnd_556x45_Stanag" _unit addMagazine "30Rnd_556x45_Stanag" _unit addMagazine "30Rnd_556x45_Stanag" _unit addMagazine "30Rnd_556x45_Stanag" _unit addMagazine "30Rnd_556x45_Stanag" _unit addMagazine "30Rnd_556x45_Stanag" _unit addMagazine "SmokeShellRed" _unit addMagazine "SmokeShellGreen" _unit addMagazine "SmokeShell" _unit addMagazine "SmokeShell" _unit addMagazine "1Rnd_HE_M203" _unit addMagazine "1Rnd_HE_M203" _unit addMagazine "1Rnd_HE_M203" _unit addMagazine "1Rnd_HE_M203" _unit addMagazine "1Rnd_HE_M203" _unit addMagazine "1Rnd_HE_M203" _unit addMagazine "1Rnd_HE_M203" _unit addMagazine "1Rnd_HE_M203" _unit addWeapon "M16A4_ACG_GL" _unit addWeapon "NVGoggles" _unit addWeapon "Binocular" _unit selectweapon "M16Muzzle" exit #AutomaticRifleman _unit addMagazine "200Rnd_556x45_M249" _unit addMagazine "200Rnd_556x45_M249" _unit addMagazine "200Rnd_556x45_M249" _unit addMagazine "200Rnd_556x45_M249" _unit addMagazine "SmokeShellRed" _unit addMagazine "SmokeShellGreen" _unit addMagazine "SmokeShell" _unit addMagazine "SmokeShell" _unit addWeapon "M249" _unit addWeapon "NVGoggles" _unit addWeapon "Binocular" _unit selectweapon "M249" goto "PistolM9SD" #Machinegunner _unit addMagazine "100Rnd_762x51_M240" _unit addMagazine "100Rnd_762x51_M240" _unit addMagazine "100Rnd_762x51_M240" _unit addMagazine "100Rnd_762x51_M240" _unit addMagazine "SmokeShellRed" _unit addMagazine "SmokeShellGreen" _unit addMagazine "SmokeShell" _unit addMagazine "SmokeShell" _unit addWeapon "M240" _unit addWeapon "NVGoggles" _unit addWeapon "Binocular" _unit selectweapon "M240" goto "PistolM9SD" #ATSpecialist _unit addMagazine "30Rnd_9x19_MP5" _unit addMagazine "30Rnd_9x19_MP5" _unit addMagazine "30Rnd_9x19_MP5" _unit addMagazine "30Rnd_9x19_MP5" _unit addMagazine "SmokeShellRed" _unit addMagazine "SmokeShellGreen" _unit addWeapon "MP5A5" _unit addMagazine "JAVELIN" _unit addWeapon "JAVELIN" _unit addWeapon "NVGoggles" _unit addWeapon "Binocular" _unit selectWeapon "MP5A5" goto "PistolM9SD" #AASpecialist _unit addMagazine "30Rnd_9x19_MP5" _unit addMagazine "30Rnd_9x19_MP5" _unit addMagazine "30Rnd_9x19_MP5" _unit addMagazine "30Rnd_9x19_MP5" _unit addMagazine "SmokeShellRed" _unit addMagazine "SmokeShellGreen" _unit addWeapon "MP5A5" _unit addMagazine "STINGER" _unit addWeapon "STINGER" _unit addWeapon "NVGoggles" _unit addWeapon "Binocular" _unit selectWeapon "MP5A5" goto "PistolM9SD" #Sniper _unit addMagazine "10Rnd_127x99_M107" _unit addMagazine "10Rnd_127x99_M107" _unit addMagazine "10Rnd_127x99_M107" _unit addMagazine "10Rnd_127x99_M107" _unit addMagazine "10Rnd_127x99_M107" _unit addMagazine "10Rnd_127x99_M107" _unit addMagazine "10Rnd_127x99_M107" _unit addMagazine "10Rnd_127x99_M107" _unit addMagazine "SmokeShellRed" _unit addMagazine "SmokeShellGreen" _unit addMagazine "SmokeShell" _unit addMagazine "SmokeShell" _unit addWeapon "M107" _unit addWeapon "NVGoggles" _unit addWeapon "Binocular" _unit selectweapon "M107" goto "PistolM9SD" #SFSabouteur0 _unit addMagazine "30Rnd_556x45_StanagSD" _unit addMagazine "30Rnd_556x45_StanagSD" _unit addMagazine "30Rnd_556x45_StanagSD" _unit addMagazine "30Rnd_556x45_StanagSD" _unit addMagazine "PipeBomb" _unit addMagazine "PipeBomb" _unit addMagazine "PipeBomb" _unit addMagazine "PipeBomb" _unit addWeapon "M4A1SD" _unit addWeapon "NVGoggles" _unit addWeapon "Binocular" _unit selectWeapon "M4A1SD" goto "PistolM9SD" #SFSaboteur _unit addMagazine "30Rnd_556x45_StanagSD" _unit addMagazine "30Rnd_556x45_StanagSD" _unit addMagazine "30Rnd_556x45_StanagSD" _unit addMagazine "30Rnd_556x45_StanagSD" _unit addMagazine "PipeBomb" _unit addMagazine "PipeBomb" _unit addMagazine "PipeBomb" _unit addMagazine "PipeBomb" _unit addWeapon "M4A1SD" _unit addWeapon "NVGoggles" _unit addWeapon "Binocular" _unit selectWeapon "M4A1SD" goto "PistolM9SD" #SFSaboteur2 _unit addMagazine "30Rnd_556x45_StanagSD" _unit addMagazine "30Rnd_556x45_StanagSD" _unit addMagazine "30Rnd_556x45_StanagSD" _unit addMagazine "30Rnd_556x45_StanagSD" _unit addMagazine "PipeBomb" _unit addMagazine "PipeBomb" _unit addMagazine "PipeBomb" _unit addMagazine "PipeBomb" _unit addWeapon "M4A1SD" _unit addWeapon "NVGoggles" _unit addWeapon "Binocular" _unit selectWeapon "M4A1SD" goto "PistolM9SD" #SFRecon _unit addMagazine "5Rnd_762x51_M24" _unit addMagazine "5Rnd_762x51_M24" _unit addMagazine "5Rnd_762x51_M24" _unit addMagazine "5Rnd_762x51_M24" _unit addMagazine "5Rnd_762x51_M24" _unit addMagazine "5Rnd_762x51_M24" _unit addMagazine "5Rnd_762x51_M24" _unit addMagazine "5Rnd_762x51_M24" _unit addMagazine "SmokeShellRed" _unit addMagazine "SmokeShellGreen" _unit addMagazine "SmokeShell" _unit addMagazine "SmokeShell" _unit addWeapon "M24" _unit addWeapon "NVGoggles" _unit addWeapon "Binocular" _unit selectWeapon "M24" goto "PistolM9SD" #SFAssault _unit addMagazine "30Rnd_556x45_Stanag" _unit addMagazine "30Rnd_556x45_Stanag" _unit addMagazine "30Rnd_556x45_Stanag" _unit addMagazine "30Rnd_556x45_Stanag" _unit addMagazine "30Rnd_556x45_Stanag" _unit addMagazine "30Rnd_556x45_Stanag" _unit addMagazine "30Rnd_556x45_Stanag" _unit addMagazine "HandGrenade" _unit addMagazine "HandGrenade" _unit addMagazine "HandGrenade" _unit addMagazine "HandGrenade" _unit addMagazine "HandGrenade" _unit addWeapon "M16A4" _unit addWeapon "NVGoggles" _unit addWeapon "Binocular" _unit selectWeapon "M16A4" goto "PistolM9" #SFMarksman _unit addMagazine "5Rnd_762x51_M24" _unit addMagazine "5Rnd_762x51_M24" _unit addMagazine "5Rnd_762x51_M24" _unit addMagazine "5Rnd_762x51_M24" _unit addMagazine "5Rnd_762x51_M24" _unit addMagazine "5Rnd_762x51_M24" _unit addMagazine "5Rnd_762x51_M24" _unit addMagazine "5Rnd_762x51_M24" _unit addMagazine "SmokeShellRed" _unit addMagazine "SmokeShellGreen" _unit addMagazine "SmokeShell" _unit addMagazine "SmokeShell" _unit addWeapon "M24" _unit addWeapon "NVGoggles" _unit addWeapon "Binocular" _unit selectWeapon "M24" goto "PistolM9SD" #Engineer _unit addMagazine "30Rnd_556x45_StanagSD" _unit addMagazine "30Rnd_556x45_StanagSD" _unit addMagazine "30Rnd_556x45_StanagSD" _unit addMagazine "30Rnd_556x45_StanagSD" _unit addMagazine "Mine" _unit addMagazine "Mine" _unit addMagazine "Mine" _unit addMagazine "Mine" _unit addWeapon "M4A1SD" _unit addWeapon "NVGoggles" _unit addWeapon "Binocular" _unit selectWeapon "M4A1SD" goto "PistolM9SD" #SquadLeader _unit addMagazine "30Rnd_556x45_Stanag" _unit addMagazine "30Rnd_556x45_Stanag" _unit addMagazine "30Rnd_556x45_Stanag" _unit addMagazine "30Rnd_556x45_Stanag" _unit addMagazine "30Rnd_556x45_Stanag" _unit addMagazine "30Rnd_556x45_Stanag" _unit addMagazine "SmokeShellRed" _unit addMagazine "SmokeShellGreen" _unit addMagazine "SmokeShell" _unit addMagazine "SmokeShell" _unit addMagazine "HandGrenade" _unit addMagazine "HandGrenade" _unit addWeapon "M16A4_ACG" _unit addWeapon "NVGoggles" _unit addWeapon "Binocular" _unit selectWeapon "M16A4_ACG" goto "PistolM9SD" #TeamLeader _unit addMagazine "30Rnd_556x45_Stanag" _unit addMagazine "30Rnd_556x45_Stanag" _unit addMagazine "30Rnd_556x45_Stanag" _unit addMagazine "30Rnd_556x45_Stanag" _unit addMagazine "30Rnd_556x45_Stanag" _unit addMagazine "30Rnd_556x45_Stanag" _unit addMagazine "SmokeShellRed" _unit addMagazine "SmokeShellGreen" _unit addMagazine "SmokeShell" _unit addMagazine "SmokeShell" _unit addMagazine "HandGrenade" _unit addMagazine "HandGrenade" _unit addWeapon "M16A4_ACG" _unit addWeapon "NVGoggles" _unit addWeapon "Binocular" _unit selectWeapon "M16A4_ACG" goto "PistolM9SD" #Officer _unit addMagazine "30Rnd_556x45_Stanag" _unit addMagazine "30Rnd_556x45_Stanag" _unit addMagazine "30Rnd_556x45_Stanag" _unit addMagazine "30Rnd_556x45_Stanag" _unit addMagazine "30Rnd_556x45_Stanag" _unit addMagazine "30Rnd_556x45_Stanag" _unit addMagazine "SmokeShellRed" _unit addMagazine "SmokeShellGreen" _unit addMagazine "SmokeShell" _unit addMagazine "SmokeShell" _unit addMagazine "HandGrenade" _unit addMagazine "HandGrenade" _unit addWeapon "M16A4_ACG" _unit addWeapon "NVGoggles" _unit addWeapon "Binocular" _unit selectWeapon "M16A4_ACG" goto "PistolM9SD" #Pilot _unit addMagazine "30Rnd_9x19_MP5" _unit addMagazine "30Rnd_9x19_MP5" _unit addMagazine "30Rnd_9x19_MP5" _unit addMagazine "30Rnd_9x19_MP5" _unit addMagazine "30Rnd_9x19_MP5" _unit addMagazine "30Rnd_9x19_MP5" _unit addMagazine "SmokeShellRed" _unit addMagazine "SmokeShellGreen" _unit addMagazine "SmokeShell" _unit addMagazine "SmokeShell" _unit addMagazine "HandGrenade" _unit addMagazine "HandGrenade" _unit addWeapon "MP5A5" _unit addWeapon "NVGoggles" _unit addWeapon "Binocular" _unit selectWeapon "MP5A5" goto "PistolM9SD" #Crewman _unit addMagazine "30Rnd_9x19_MP5" _unit addMagazine "30Rnd_9x19_MP5" _unit addMagazine "30Rnd_9x19_MP5" _unit addMagazine "30Rnd_9x19_MP5" _unit addMagazine "30Rnd_9x19_MP5" _unit addMagazine "30Rnd_9x19_MP5" _unit addMagazine "SmokeShellRed" _unit addMagazine "SmokeShellGreen" _unit addMagazine "SmokeShell" _unit addMagazine "SmokeShell" _unit addMagazine "HandGrenade" _unit addMagazine "HandGrenade" _unit addWeapon "MP5A5" _unit addWeapon "NVGoggles" _unit addWeapon "Binocular" _unit selectWeapon "MP5A5" goto "PistolM9SD" #CamelPilot _unit addMagazine "30Rnd_9x19_MP5" _unit addMagazine "30Rnd_9x19_MP5" _unit addMagazine "30Rnd_9x19_MP5" _unit addMagazine "30Rnd_9x19_MP5" _unit addMagazine "30Rnd_9x19_MP5" _unit addMagazine "30Rnd_9x19_MP5" _unit addMagazine "SmokeShellRed" _unit addMagazine "SmokeShellGreen" _unit addMagazine "SmokeShell" _unit addMagazine "SmokeShell" _unit addMagazine "HandGrenade" _unit addMagazine "HandGrenade" _unit addWeapon "MP5A5" _unit addWeapon "NVGoggles" _unit addWeapon "Binocular" _unit selectWeapon "MP5A5" goto "PistolM9SD" #MercenaryMG  _unit addMagazine "200Rnd_556x45_M249" _unit addMagazine "200Rnd_556x45_M249" _unit addMagazine "200Rnd_556x45_M249" _unit addMagazine "200Rnd_556x45_M249" _unit addMagazine "SmokeShellRed" _unit addMagazine "SmokeShellGreen" _unit addMagazine "SmokeShell" _unit addMagazine "SmokeShell" _unit addWeapon "M249" _unit addWeapon "NVGoggles" _unit addWeapon "Binocular" _unit selectWeapon "M249" goto "PistolM9SD" #MercenaryRepair  _unit addMagazine "30Rnd_556x45_Stanag" _unit addMagazine "30Rnd_556x45_Stanag" _unit addMagazine "30Rnd_556x45_Stanag" _unit addMagazine "30Rnd_556x45_Stanag" _unit addMagazine "30Rnd_556x45_Stanag" _unit addMagazine "30Rnd_556x45_Stanag" _unit addMagazine "SmokeShellRed" _unit addMagazine "SmokeShellGreen" _unit addMagazine "SmokeShell" _unit addMagazine "SmokeShell" _unit addMagazine "HandGrenade" _unit addMagazine "HandGrenade" _unit addWeapon "M16A4_ACG" _unit addWeapon "NVGoggles" _unit addWeapon "Binocular" _unit selectWeapon "M16A4_ACG" goto "PistolM9SD" #MercenarySniper _unit addMagazine "5Rnd_762x51_M24" _unit addMagazine "5Rnd_762x51_M24" _unit addMagazine "5Rnd_762x51_M24" _unit addMagazine "5Rnd_762x51_M24" _unit addMagazine "5Rnd_762x51_M24" _unit addMagazine "5Rnd_762x51_M24" _unit addMagazine "5Rnd_762x51_M24" _unit addMagazine "5Rnd_762x51_M24" _unit addMagazine "SmokeShellRed" _unit addMagazine "SmokeShellGreen" _unit addMagazine "SmokeShell" _unit addMagazine "SmokeShell" _unit addWeapon "M24" _unit addWeapon "NVGoggles" _unit addWeapon "Binocular" _unit selectWeapon "M24" goto "PistolM9SD" #MercenaryDemolition _unit addMagazine "30Rnd_556x45_StanagSD" _unit addMagazine "30Rnd_556x45_StanagSD" _unit addMagazine "30Rnd_556x45_StanagSD" _unit addMagazine "30Rnd_556x45_StanagSD" _unit addMagazine "PipeBomb" _unit addMagazine "PipeBomb" _unit addMagazine "PipeBomb" _unit addMagazine "PipeBomb" _unit addWeapon "M4A1SD" _unit addWeapon "NVGoggles" _unit addWeapon "Binocular" _unit selectWeapon "M4A1SD" goto "PistolM9SD" #MercenaryGrenadier _unit addMagazine "30Rnd_556x45_Stanag" _unit addMagazine "30Rnd_556x45_Stanag" _unit addMagazine "30Rnd_556x45_Stanag" _unit addMagazine "30Rnd_556x45_Stanag" _unit addMagazine "30Rnd_556x45_Stanag" _unit addMagazine "30Rnd_556x45_Stanag" _unit addMagazine "30Rnd_556x45_Stanag" _unit addMagazine "30Rnd_556x45_Stanag" _unit addMagazine "SmokeShellRed" _unit addMagazine "SmokeShellGreen" _unit addMagazine "SmokeShell" _unit addMagazine "SmokeShell" _unit addMagazine "1Rnd_HE_M203" _unit addMagazine "1Rnd_HE_M203" _unit addMagazine "1Rnd_HE_M203" _unit addMagazine "1Rnd_HE_M203" _unit addMagazine "1Rnd_HE_M203" _unit addMagazine "1Rnd_HE_M203" _unit addMagazine "1Rnd_HE_M203" _unit addMagazine "1Rnd_HE_M203" _unit addWeapon "M16A4_ACG_GL" _unit addWeapon "NVGoggles" _unit addWeapon "Binocular" _unit selectWeapon "M16Muzzle" exit #MercenaryTeamLeader _unit addMagazine "30Rnd_556x45_Stanag" _unit addMagazine "30Rnd_556x45_Stanag" _unit addMagazine "30Rnd_556x45_Stanag" _unit addMagazine "30Rnd_556x45_Stanag" _unit addMagazine "30Rnd_556x45_Stanag" _unit addMagazine "30Rnd_556x45_Stanag" _unit addMagazine "SmokeShellRed" _unit addMagazine "SmokeShellGreen" _unit addMagazine "SmokeShell" _unit addMagazine "SmokeShell" _unit addMagazine "HandGrenade" _unit addMagazine "HandGrenade" _unit addWeapon "M16A4_ACG" _unit addWeapon "NVGoggles" _unit addWeapon "Binocular" _unit selectWeapon "M16A4_ACG" goto "PistolM9SD" ;;Adding handguns: #PistolM9 _unit addMagazine "15Rnd_9x19_M9" _unit addMagazine "15Rnd_9x19_M9" _unit addMagazine "15Rnd_9x19_M9" _unit addMagazine "15Rnd_9x19_M9" _unit addMagazine "15Rnd_9x19_M9" _unit addMagazine "15Rnd_9x19_M9" _unit addMagazine "15Rnd_9x19_M9" _unit addMagazine "15Rnd_9x19_M9" _unit addWeapon "M9" exit #PistolM9SD _unit addMagazine "15Rnd_9x19_M9SD" _unit addMagazine "15Rnd_9x19_M9SD" _unit addMagazine "15Rnd_9x19_M9SD" _unit addMagazine "15Rnd_9x19_M9SD" _unit addMagazine "15Rnd_9x19_M9SD" _unit addMagazine "15Rnd_9x19_M9SD" _unit addMagazine "15Rnd_9x19_M9SD" _unit addMagazine "15Rnd_9x19_M9SD" _unit addWeapon "M9SD" exit ;;Adding exceptions: #Exception1 _unit addMagazine "30Rnd_556x45_StanagSD" _unit addMagazine "30Rnd_556x45_StanagSD" _unit addMagazine "30Rnd_556x45_StanagSD" _unit addMagazine "30Rnd_556x45_StanagSD" _unit addMagazine "SmokeShellRed" _unit addMagazine "SmokeShellGreen" _unit addMagazine "SmokeShell" _unit addMagazine "SmokeShell" _unit addWeapon "M4A1SD" _unit addMagazine "15Rnd_9x19_M9SD" _unit addMagazine "15Rnd_9x19_M9SD" _unit addMagazine "15Rnd_9x19_M9SD" _unit addMagazine "15Rnd_9x19_M9SD" _unit addWeapon "M9SD" _unit addWeapon "NVGoggles" _unit addMagazine "Laserbatteries" _unit addWeapon "Laserdesignator" _unit selectWeapon "M4A1SD" exit #Exception2 _unit addMagazine "30Rnd_556x45_StanagSD" _unit addMagazine "30Rnd_556x45_StanagSD" _unit addMagazine "30Rnd_556x45_StanagSD" _unit addMagazine "30Rnd_556x45_StanagSD" _unit addMagazine "SmokeShellRed" _unit addMagazine "SmokeShellGreen" _unit addMagazine "SmokeShell" _unit addMagazine "SmokeShell" _unit addWeapon "M4A1SD" _unit addMagazine "15Rnd_9x19_M9SD" _unit addMagazine "15Rnd_9x19_M9SD" _unit addMagazine "15Rnd_9x19_M9SD" _unit addMagazine "15Rnd_9x19_M9SD" _unit addWeapon "M9SD" _unit addWeapon "NVGoggles" _unit addMagazine "Laserbatteries" _unit addWeapon "Laserdesignator" _unit selectWeapon "M4A1SD" exit #Exception3 _unit addMagazine "10Rnd_127x99_M107" _unit addMagazine "10Rnd_127x99_M107" _unit addMagazine "10Rnd_127x99_M107" _unit addMagazine "10Rnd_127x99_M107" _unit addMagazine "10Rnd_127x99_M107" _unit addMagazine "10Rnd_127x99_M107" _unit addMagazine "10Rnd_127x99_M107" _unit addMagazine "10Rnd_127x99_M107" _unit addMagazine "SmokeShellRed" _unit addMagazine "SmokeShellGreen" _unit addMagazine "SmokeShell" _unit addMagazine "SmokeShell" _unit addWeapon "M107" _unit addWeapon "NVGoggles" _unit addWeapon "Binocular" _unit selectWeapon "M107" goto "PistolM9SD" #Exception4 _unit addMagazine "10Rnd_127x99_M107" _unit addMagazine "10Rnd_127x99_M107" _unit addMagazine "10Rnd_127x99_M107" _unit addMagazine "10Rnd_127x99_M107" _unit addMagazine "10Rnd_127x99_M107" _unit addMagazine "10Rnd_127x99_M107" _unit addMagazine "10Rnd_127x99_M107" _unit addMagazine "10Rnd_127x99_M107" _unit addMagazine "SmokeShellRed" _unit addMagazine "SmokeShellGreen" _unit addMagazine "SmokeShell" _unit addMagazine "SmokeShell" _unit addWeapon "M107" _unit addWeapon "NVGoggles" _unit addWeapon "Binocular" _unit selectWeapon "M107" goto "PistolM9SD" #Exception5 ;; fill inn here... ... ;; End with: exit OR goto "PistolM9" OR goto "PistolM9SD" #Exception6 ;; fill inn here... ... ;; End with: exit OR goto "PistolM9" OR goto "PistolM9SD" ;;SCRIPT ENDS HERE ;;------------------------------ ;;EXAMPLES OF DIFFERENT LOADOUTS: #Example1 ;;Example: sniper has M107 instead of the M24 rifle: _unit addMagazine "10Rnd_127x99_M107" _unit addMagazine "10Rnd_127x99_M107" _unit addMagazine "10Rnd_127x99_M107" _unit addMagazine "10Rnd_127x99_M107" _unit addMagazine "10Rnd_127x99_M107" _unit addMagazine "10Rnd_127x99_M107" _unit addMagazine "10Rnd_127x99_M107" _unit addMagazine "10Rnd_127x99_M107" _unit addMagazine "SmokeShellRed" _unit addMagazine "SmokeShellGreen" _unit addMagazine "SmokeShell" _unit addMagazine "SmokeShell" _unit addWeapon "M107" _unit addWeapon "NVGoggles" _unit addWeapon "Binocular" goto "PistolM9SD" #Example2 ;;Example heavy AT with two Javelins and no other weapon: _unit addMagazine "JAVELIN" _unit addMagazine "JAVELIN" _unit addWeapon "JAVELIN" _unit addWeapon "NVGoggles" _unit addWeapon "Binocular" goto "PistolM9SD" #Example3 ;;Example: AK74 and laserdesignator with a laserbattery: _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" _unit addMagazine "SmokeShellRed" _unit addMagazine "SmokeShellGreen" _unit addMagazine "SmokeShell" _unit addMagazine "SmokeShell" _unit addMagazine "HandGrenade" _unit addMagazine "HandGrenade" _unit addWeapon "Laserdesignator" _unit addMagazine "Laserbatteries" _unit addWeapon "AK74" _unit addWeapon "NVGoggles" _unit selectWeapon "AK74" goto "PistolM9SD" Best regards, -Rawhide Share this post Link to post Share on other sites