OFPEC Forum

Editors Depot - Mission Editing and Scripting => Arma2 - Editing/Scripting General => Topic started by: bardosy on 12 Sep 2010, 10:44:38

Title: backpacks in weapon selection (description.ext)
Post by: bardosy on 12 Sep 2010, 10:44:38
Is it possible to add backpacks to weapon selection (description.ext)?
I can add backpack to a man in init.sqs, but I want to leave the choice to player, so I want add backpacks to weap selection. If it's possible, what is the keyword in the class? I guess it's not weapon nor magazine...
Title: Re: backpacks in weapon selection (description.ext)
Post by: kju on 12 Sep 2010, 11:44:06
should be not possible as backpacks are cfgVehicles type
Title: Re: backpacks in weapon selection (description.ext)
Post by: Wolfrug on 12 Sep 2010, 21:13:51
But how are backpacks added then to soldiers? There's a config entry for whether or not they can carry a backpack, but I'm unsure about where it says what kind if any of backpack they'll be carrying. If they are added with e.g. addweapon, then they're weapons, no? If they're added with their own command, then I'm not so sure about the description.ext.

Since you're a campaign scripter, have you tried manually adding backpacks (i.e. as the player go and drop a backpack or two into a crate) to an ammocrate, then saving the ammocrate to the campaign weapon/magazine pool, and then see if they show up in future missions? If they do, then there just HAS to be some way to add them to the pool, I'd say...

Wolfrug out.
Title: Re: backpacks in weapon selection (description.ext)
Post by: kju on 12 Sep 2010, 22:12:39
Code: [Select]
class CZ_Soldier_SL_DES_EP1: CZ_Soldier_base_EP1
{
..
backpack = "CZ_VestPouch_Sa58_EP1";

Rucks are no weapons, no.
Title: Re: backpacks in weapon selection (description.ext)
Post by: bardosy on 14 Sep 2010, 07:27:12
I added backpack as a weapon and don't work. :(

But wolfrug has a good idea! I'll try it.

If it's not working, I'll leave it alone... I think, BIS solve this backpack very badly. :no:
Title: Re: backpacks in weapon selection (description.ext)
Post by: kju on 15 Sep 2010, 08:01:08
Code: [Select]
   [73297]  New: addBackpackCargo script function
So now the campaign savegame approach may work.  :)
Title: Re: backpacks in weapon selection (description.ext)
Post by: Alwarren on 21 Sep 2010, 14:09:30
Is it possible to add backpacks to weapon selection (description.ext)?
I can add backpack to a man in init.sqs, but I want to leave the choice to player, so I want add backpacks to weap selection. If it's possible, what is the keyword in the class? I guess it's not weapon nor magazine...

You can just add them like weapons and magazines by putting this into your description.ext:

Code: [Select]
class Backpacks
{
    class US_Patrol_Pack_EP1    {count = 4; };
    class US_Assault_Pack_EP1    {count = 4; };
};

Hope this is what you are looking for.
Title: Re: backpacks in weapon selection (description.ext)
Post by: bardosy on 21 Sep 2010, 14:17:34
YES!  :clap: :good:

Thank you!
Title: Re: backpacks in weapon selection (description.ext)
Post by: Alwarren on 21 Sep 2010, 14:57:29
You're welcome  :)
Title: Re: backpacks in weapon selection (description.ext)
Post by: kju on 21 Sep 2010, 16:20:08
Good job mate  :good:

Added info to the BIKI:
http://community.bistudio.com/wiki?title=Description.ext&curid=1860&diff=58207&oldid=58189