View Full Version : Ammo Box Script Restricted by Class
Two Dogs
Aug 15 2011, 14:29
Hey Guys,
Trying to make an ammo box script, that restricts weapons and equipment according to a players "Class".
What I'm having trouble getting my head around is how to activate it every time a player goes into the box.
Any thoughts or links appreciated.
kylania
Aug 15 2011, 14:36
ACE does this at a config level for it's magic boxes. It's also a horrible idea, but if you just run a ammo crate filler script that should work since it's local.
sxp2high
Aug 15 2011, 16:08
// Variables
_Crate = _this select 0;
_Type = (typeOf player);
// Class arrays
_AT = ["US_Soldier_AT_EP1", "US_Soldier_AAT_EP1"];
// Add stuff for everyone
_Crate addWeaponCargo ["M4", 10];
// Add specific stuff
if (_Type in _AT) then {
_Crate addWeaponCargo ["Javelin", 10];
};
Self explaining :D
Class names here. (http://forums.bistudio.com/showthread.php?t=73241&page=2)
Two Dogs
Aug 15 2011, 16:20
Thanks, sxp2high. I'll try that tonight.
kylania,
ACE does this at a config level for it's magic boxes. It's also a horrible idea, but if you just run a ammo crate filler script that should work since it's local.
I'm looking to force rolls for in Unit training. To many choices in most boxes. And yes boxes are going to be local.
kylania
Aug 15 2011, 16:36
I'd do it more based on box. Have one box with just launchers in it or one box with just MGs in it.
That ways everyone knows what's in each box instead of someone saying "Grab the binocs from the box" and you forgot to give that class them and suddenly different people see different things in each box and no one knows what's where. That's just me I guess. :)
Also then if for whatever reason your AT soldier needed to pick up a MG he'd be able to go to the MG box instead of having to ask an MG soldier to pick one up and drop it for him or something equally troublesome.
Two Dogs
Aug 16 2011, 01:21
I'd do it more based on box. Have one box with just launchers in it or one box with just MGs in it.
The point is for Classes to equip according to class and not have assault units running around with big bore sniper weapons.
Also then if for whatever reason your AT soldier needed to pick up a MG he'd be able to go to the MG box instead of having to ask an MG soldier to pick one up and drop it for him or something equally troublesome.
We don't play that BS. Use teamwork to achieve goals and overcome obstacles.
Powered by vBulletin® Version 4.2.0 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.