Jump to content
Sign in to follow this  
HateDread

Halting Equipment Loss in Water? Patrols?

Recommended Posts

Hey guys,

How do I stop my men from losing their equipment after long periods of swimming? I want to be able to spend as long as I like in the water without losing equipment.

Also, how do I set a unit to patrol between a few points? IE. between P1 and P2?

Cheers,

- HateDread.

Share this post


Link to post
Share on other sites

Correct. I remember it from vanilla ArmA - it seems to take much longer in ACE.

Share this post


Link to post
Share on other sites

Seems to happen instantly when spawning an armed player direction into water at mission start - AI don't seem to be effected this way?

Any help?

Share this post


Link to post
Share on other sites

I think it has to do with player speed.

The faster you swim, the faster you will lose equipment. It might help to set their speed lower.

Share this post


Link to post
Share on other sites

Thing is, I need the players to be able to swim at normal speed, which is already very slow.

I'm looking for a script that stops this from happening. :/

Share this post


Link to post
Share on other sites

Maybe a work around would be to let the weapons disappear and rearm your units once they get to shore?

Just a thought.

Best, Splicer.

Share this post


Link to post
Share on other sites

Ok just looking at this a different way, haven't tested or anything, and not sure how it would go with the backpack of ace.

What if you adapted these scripts to create a pack gear into waterproof plastic bag/container script using an add action. Then swim your river, after getting out of the river have another addaction to take your gear out of the imaginary plastic bag and rearm?

http://forums.bistudio.com/showthread.php?t=76731&highlight=save+gear

Just a thought.

Edited by blakeace

Share this post


Link to post
Share on other sites

Thing is, we're talking about assault rifles, which would be hard to place in plastic bags, wouldn't they?

Also, if I spawn the weapons on the players when they hit the shore, it's going to be obvious - they lose the actual physical model when swimming, then it appears in their hands on shore?

Isn't there some sort of command to control this? It seems it takes longer in ACE, as if they found a variable that they could change?

Cheers,

- HateDread.

Share this post


Link to post
Share on other sites
Thing is, we're talking about assault rifles, which would be hard to place in plastic bags, wouldn't they?

I don't think so. If I were going to need my weapon I'd look for the biggest plastic I could get/buy! :D

Seriously, pragmatically speaking plastic bags will never be a show stopper for a military operation where rifles need to be wrapped up.

My 2 cents. :D

Best, Splicer.

Share this post


Link to post
Share on other sites

Well, alright, I knew someone would take me up on that :P

I just don't have the faintest idea where to begin scripting that sort of thing. :/

Share this post


Link to post
Share on other sites
Thing is, we're talking about assault rifles, which would be hard to place in plastic bags, wouldn't they?

Also, if I spawn the weapons on the players when they hit the shore, it's going to be obvious - they lose the actual physical model when swimming, then it appears in their hands on shore?

Isn't there some sort of command to control this? It seems it takes longer in ACE, as if they found a variable that they could change?

Cheers,

- HateDread.

Plastic container/Plastic bag was just something to give meaning to the action. You could say secure gear before swimming, So you don't lose every thing.

Visually can't help you. Unless you use a boat instead ;)

More seriously, possibly you could get fancy with using the attachto script to pin the weapon to your back?

Edited by blakeace

Share this post


Link to post
Share on other sites

No, I like your bag idea.

Problem is, how do I even go about adding the action to the menu, then remembering what the player had, and restoring it once they're out of the water? That just boggles my mind.

Share this post


Link to post
Share on other sites
No, I like your bag idea.

Problem is, how do I even go about adding the action to the menu, then remembering what the player had, and restoring it once they're out of the water? That just boggles my mind.

Ok this is just an adaptation of Xeno's code in the link in a previous post of mine.

Not tested on a Dedi. Just quickly tested local.

If you are using revive or respawn you will loose all your gear if shot while swimming unless they are set to giving you the gear you had at the start.

Place this in your players init line

actionId = this addAction ["Secure Gear", "SecureGear.sqf", ["", 8], 1,     false, true,"", " _target == player"];

SecureGear.sqf

_p = _this select 0;
  weapons = weapons _p;
  magazines = magazines _p;


   removeAllItems _p;
   removeAllWeapons _p;

_p removeaction actionid;
actionId = _p addAction ["UnSecure Gear", "UnSecureGear.sqf", ["", 8], 1,     false, true,"" , " _target == player"];

UnSecureGear.sqf

    _p = _this select 0;
   removeAllItems _p;
   removeAllWeapons _p;
   {_p addMagazine _x} forEach magazines;
   {_p addWeapon _x} forEach weapons;
   _primw = primaryWeapon _p;
   if (_primw != "") then {
       _p selectWeapon _primw;
       // Fix for weapons with grenade launcher
       _muzzles = getArray(configFile>>"cfgWeapons" >> _primw >> "muzzles");
       _p selectWeapon (_muzzles select 0);
   };
_p removeaction actionid;
actionId = _p addAction ["Secure Gear", "SecureGear.sqf", ["", 8], 1,     false, true,"" , " _target == player"];

Edited by blakeace

Share this post


Link to post
Share on other sites

Just tried it - works once, but then fails when I try and secure gear a second time.

This happen to you?

Share this post


Link to post
Share on other sites
Just tried it - works once, but then fails when I try and secure gear a second time.

This happen to you?

Yep sorry I was on the phone while doing this and didn't really test it. It seems to be the choice of variables, which I just changed from local to global. I forgot to rename them as they are reserved words. Works multiple time now sorry.

This one should work, though I am no scripting guru so no promises.

SecureGear.sqf

_p = _this select 0;

  weapons1 = weapons _p;
  magazines1 = magazines _p;


   removeAllItems _p;
   removeAllWeapons _p;

_p removeaction actionid;
actionId = _p addAction ["UnSecure Gear", "UnSecureGear.sqf", ["", 8], 1,     false, true,"" , " _target == player"];

UnsecureGear.sqf

_p = _this select 0;
   removeAllItems _p;
   removeAllWeapons _p;
   {_p addMagazine _x} forEach magazines1;
   {_p addWeapon _x} forEach weapons1;
   _primw = primaryWeapon _p;
   if (_primw != "") then {
       _p selectWeapon _primw;
       // Fix for weapons with grenade launcher
       _muzzles = getArray(configFile>>"cfgWeapons" >> _primw >> "muzzles");
       _p selectWeapon (_muzzles select 0);
   };
_p removeaction actionid;
actionId = _p addAction ["Secure Gear", "SecureGear.sqf", ["", 8], 1,     false, true,"" , " _target == player"];

Try that, as I said I haven't tried on a dedicated. But I think it should be ok as the action would be performed local.:butbut:

Share this post


Link to post
Share on other sites

After running it for a while, attempting to unsecure results in problem opening the gun's pbo, and in the cases where that doesn't occur, the gun is not restored. This is running for a min or two on x4 speed.

Ideas?

Share this post


Link to post
Share on other sites

And, I tried using ACE Ruck Sacks as an idea - they completely disappear alongside the other gear :/

Share this post


Link to post
Share on other sites
After running it for a while, attempting to unsecure results in problem opening the gun's pbo, and in the cases where that doesn't occur, the gun is not restored. This is running for a min or two on x4 speed.

Ideas?

No idea, I am not a scripting guru sorry, but just took Xeno's code and just changed when each part kicked in. Instead of when you die, let you choose when to save and restore your gear.

So I really have no idea about this, and would have to bump it up the knowledge chain sorry.

Re ACE stuff, even more out of my range sorry.

Oh well was worth a try. Sorry it didn't solve your problem.

Share this post


Link to post
Share on other sites

It's all good, mate, this is a tough one. Thanks for trying! (:

Refresher; I need to get my troops to swim from far out at sea, into the shore, without losing their equipment.

Any ideas, anyone?

Share this post


Link to post
Share on other sites

Wasn't this "Feature" of dropping inventory while swimming removed in Vanilla patch 1.03 or something? There should be a way of preventing the game from doing this in the first place, let alone trying to restore the inventory after the game removes it.

I'm with you. I made a mission where I HALO'd into an objective, landed in the water, and after a few breaststrokes lost everything except for my sidearm. Lost the ACE2 backpack with the explosives, lost my NV goggles, ug!

This has been a problem since Arma 1 days.

Also, what is it about a pistol, radio, compass, GPS and map that prevent those items from washing away into the water? Can the unremovable quality of those items be applied to all inventory items? Or are they not removed because of their position in the inventory? For example a glow stick or IR strobe seems to be just as small as a pistol or GPS receiver. But those two items are washed away in water. But maybe it isn't because of their size, it's because of where they sit in the inventory (in those larger boxes).

Edited by Feint

Share this post


Link to post
Share on other sites

Has anybody found a fix for this yet? I'm making a seal campaign and i can assure you seals don't drop there gear.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×