This script allows you to easilly have a unit carry 2 primary weapons. For example, it will allow you to equip a sniper with both an M24 and an MP5SD5. It was originally made for the mission titled CO 1-2 Operation Shining Anvil to enable the player sniper to carry an MP5 as well as the sniper rifle. I thought that it would prove to be very useful for some people. As always, feedback, bug reports, etc are welcome. Features: This script will work regardless of addons used. Using this script will not give the players free rounds if they switch weapons before a magazine is empty. They will retain the magazine with the spent rounds. Animation and sound played when the player switches weapons. This script does not give the players extra ammo space, requiring them to carefully balance their ammunition selections. The player can pick up and drop weapons in either weapon slot at will. Supports Join in progress, teamswitching, and all respawning modes. Compatibility: Tested Armed Assault v1.08 compatible. Older Versions not tested. It should work on any later version. Multiplayer: 100% MP compatible. Issues: There are 3 known issues that can not or will not be corrected due to arma limitations. 1: The secondary weapon slot cannot be accessed inside the gear dialog on mission start. This is completely unchangable. I attempted to make an optional modified gear dialog for v1.1, but could not get arma to populate it. If you figure out a way to fix this somehow, be sure and let me know. 2: If you use the scripts on a very unusually sized unit, the algorithm to detect what posture the unit is in may fail. For example, a 50 foot giant would always return standing, and a 2 foot midget would always return prone. I consider this to be a minor issue. 3: It is possible to equip a large weapon (such a pk or m240) and an AT weapon at the same time using the following process. A: Switch to weapon slot you wish to arm with both heavy weapons. B: Pick up a machinegun or any weapon weapon considered to be large. C: Switch to the other weapon slot. D: Pick up the AT or AA weapon. E: Upon switching to the weapon slot with the large weapon, both the heavy weapons will be available. While this is a potential cheat, it is at least counterbalanced by the fact that these weapons have large bulky ammo. Since this script does not give the player extra ammo space, it will actually place a heavy handicap on the player that attempts to do this. The only way to fix this problem would be to require that all weapons be defined, which would make this script much less flexible. Home Page: http://colonelsanderslite.armaholic.net/scripts/WeaponSwitching/index.html Hosting: You can host this anywhere you want, but if you let me know via PM on the BIS forums, I'll add a link in the download thread and let you know if I patch it. I'd also prefer if you included a link back to the home page, as this is where I'll be posting updates, answering questions etc. Usage: It is strongly reccomended you view the demo missions before attempting to use this. First, copy CSL_WeaponSwitching and Third_Party out of the scripts folder in the archive into your mission folder. It is strongly reccomended you do not rename the files or folders. If you insist on renaming the files and folder, you will have to edit the scripts to reflect your changes. Next, In your mission folder, create a file called description.ext if it does not exist already. If your description.ext file is empty or does not have a CfgSounds section, insert this code: class CfgSounds { sounds[] = {}; class CSL_ReloadSound { name = "CSL_ReloadSound"; sound[] = {"M4_reload.wss", 1.0, 1.0}; titles[] = {0, ""}; }; }; If you do have a CfgSounds section already, modify it in keeping with the above example. You can rename CSL_ReloadSound to whatever you desire. You will also need to put the sound you desire to use in your mission's sound folder. In the demo, I used BIS's vanilla M4 Reload sound. Customise the units gear using a combination of the addWeapon, removeAllWeapons, removeWeapon, and addMagazine commands. For your convienience, The details of these commands can be found at: http://community.bistudio.com/wiki/removeAllWeapons http://community.bistudio.com/wiki/removeWeapon http://community.bistudio.com/wiki/addWeapon http://community.bistudio.com/wiki/addMagazine The BIS weapon and magazine names can all be found at: http://community.bistudio.com/wiki/ArmA:_Weapons Should you wish to specify an addon weapon, consult the documentation of said addon. Only one rifle/mg/smg type weapon should be added here, it will go in the primary weapon slot. Lastly, execute this script on the unit you wish to enable this on. In singlePlayer or multiplayer with either no respawn or group respawn, call the script like this (if you're using instant or base respawn in your mission, skip ahead to that section): ["UnitToRunScriptOn", "SecondaryWeaponName", "ReloadSound"] execVM "CSL_WeaponSwitching\CSL_WeaponSwitching_V1.3_Main.sqf"; In multiplayer with either instant or base respawn, you can choose between a couple of methods of handling gear. The first method gives the unit it's initial gear back on respawn (whatever that was). The second method, makes the units keep the gear they had when they died. Depending on your choice, you call the script in one of two ways. Reset Equipment Varient: ["UnitToRunScriptOn", "SecondaryWeaponName", "ReloadSound"] execVM "CSL_WeaponSwitching\CSL_WeaponSwitching_V1.3_RespawnResetEquipment.sqf"; Preserve Equipment Varient: ["UnitToRunScriptOn", "SecondaryWeaponName", "ReloadSound"] execVM "CSL_WeaponSwitching\CSL_WeaponSwitching_V1.3_RespawnPreserveEquipment.sqf"; I strongly reccomend you make this call in init.sqf if you're using it in a multiplayer environment. This is to support join in progress. Parameter Details: UnitToRunScriptOn Should be a *STRING* containing the unit name. If called through the soldiers initline, it should not be "this", but rather the proper name of the unit in string format. SecondaryWeaponName Should be a string identifying a weapon name. All the BIS weapon names can be found at: http://community.bistudio.com/wiki/ArmA:_Weapons ReloadSound Should be a string identifying a classname as it appears in your description.ext. Example - SP, Group or Side Respawn: ["MultiWeaponSoldier", "M24", "CSL_ReloadSound"] execVM "CSL_WeaponSwitching\CSL_WeaponSwitching_V1.3_Main.sqf"; Instant, or Base Respawn - Reset Equipment Varient: ["MultiWeaponSoldier", "M24", "CSL_ReloadSound"] execVM "CSL_WeaponSwitching\CSL_WeaponSwitching_V1.3_RespawnResetEquipment.sqf"; Instant, or Base Respawn - Preserve Equipment Varient: ["MultiWeaponSoldier", "M24", "CSL_ReloadSound"] execVM "CSL_WeaponSwitching\CSL_WeaponSwitching_V1.3_RespawnPreserveEquipment.sqf"; As a note, if you wish to customise how the gear works on respawn, you will have to edit CSL_WeaponSwitching_V1.3_RespawnResetEquipment.sqf or CSL_WeaponSwitching_V1.3_RespawnPreserveEquipment.sqf to make them do what you want them to do. This is not supported. Version History: V1.3: Fixed a save game related bug that slipped in probably in v1.1 but remained undetected for reasons unknown. Thanks to undeceived for reporting it. Fixed a small bug that nobody had yet reported. Would have caused problems when using the script on multiple units with teamswitching on. V1.2: Fixed a small mp bug involving running the script on a unit that doesn't exist due to the unit being disabled either by the player or the mission designer. Parameters simplified slightly. V1.1: Units now play the correct reloading animation per their stance thanks to Mandoble's function to detect it. A couple of scripts are now built in to handle respawning, so you don't have to do it yourself. One preserves the unit's current equipment on death, and respawns him with it. The other, resets his equipment to starting every time he respawns. V1.0: Release License: Unlimited rights (including editing and rereleasing) so long as it's non- commercial and adheres to the BIS terms of use. Any derivative work cannot be more restrictive than this with respect to what rights an end user has. Note that use of Mandoble's function must conform to his requirements, not mine. Credits: Special Ed for prompting me to write this script in the first place and helping with the MP testing. Mandoble - Wrote the function to get the unit's posture. Tack Of The 10th Mountain Division - Testing Super - Six Of The 10th Mountain Division - Testing Matt Rochelle - Bug Report, error when run on a disabled unit. undeceived - Bug Reprt, save game related.