Home   Help Search Login Register  

Author Topic: Swimmer Keeps Weapons v1.1 (DELETED)  (Read 2374 times)

0 Members and 1 Guest are viewing this topic.

Offline Mr.Peanut

  • Former Staff
  • ****
  • urp!
Swimmer Keeps Weapons v1.1 (DELETED)
« on: 11 Sep 2008, 20:09:11 »
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.




« Last Edit: 27 Sep 2008, 16:26:45 by Mr.Peanut »
urp!

Offline hoz

  • OFPEC Site
  • Administrator
  • *****
Re: Swimmer Keeps Weapons v1.0
« Reply #1 on: 11 Sep 2008, 20:15:42 »
Nice one, I hate when the AI looses thier guns.
Xbox Rocks

Offline fleepee

  • Members
  • *
  • Enter the Matrix!
Re: Swimmer Keeps Weapons v1.0
« Reply #2 on: 11 Sep 2008, 21:18:48 »
I've tested it quickly, it's ok with players but not with AI (of my team)...

Offline Mr.Peanut

  • Former Staff
  • ****
  • urp!
Re: Swimmer Keeps Weapons v1.0
« Reply #3 on: 12 Sep 2008, 01:10:51 »
Never said it would work with AI... 
I hate AI so I actually never thought about it. It'll take a wee bit of reworking for AI, but I can do it. 

edit: updated to work with stinking AI 
« Last Edit: 27 Sep 2008, 16:27:22 by Mr.Peanut »
urp!