*** Updated V1.3 ***
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.
Download:
CSL Weapon Switching V1.3 Courtesy Of Armaholic.comHosting:
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.
Full instructions are found in the readme.
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.