UPDATED 15/09/2008
A simple little script, but good learning material for beginners.
Swimmer Keeps Weapons v1.1
by Mr.Peanut
15/09/2008
Description: A clan mate of mine was complaining about losing weapons whilst swimming in ArmA
so I wrote this little script. In ArmA you lose all weapons and ammo, except sidearms,
if you go for a long swim. This script will automatically restore all your weapons and ammo
as soon as you touch bottom again. If the player swims out to a boat and loses his weapons enroute,
his weapons will be restored when either the boat lands and he exits the boat, or if he swims
back to shore.
Usage: Copy smb_skw folder into your mission folder. In your init.sqf add the following:
unit call compile preprocessFileLineNumbers "SMB_SKW\SMB_SKW_init.sqf";
or in the unit's init field:
this call compile preprocessFileLineNumbers "SMB_SKW\SMB_SKW_init.sqf";
Requires: Kronzky's String Function Library v2.2.0, which is included in the smb_skw folder.
Automatically initialises the string functions if required.
MP: Respawn and JIP compatible with one exception; a player (re)spawns into an AI that has already
lost its weapons and has not yet had them restored.
Revisions:
1.1 12/09/2008 - Changed from global variables to vehicle stored variables so that script
would work on AI.
15/09/2008 - Updated documentation.