Jump to content
Sign in to follow this  
Vilman

Backpacks in ammoboxes ?

Recommended Posts

Hi guys, i wonder about this :

Can i put backpacks into ammoboxes by scripting ? I wanna put 2 Tripod bags and 4 of hcpookie's Fagot rocket bags into an ammobox. When i launched the game, everythig was in there, except the bags.

I mean i tried that with ArmA Edit but it did not work. Here is the script :

; ****************************************************************
; Custom crate script for Armed Assault
; Created with ArmA Edit - Version 1.3.4000
; HELP: Run this script from the INITIALIZATION box of the crate.
; CODE: [this] exec "Fagot.sqs"
; ****************************************************************

; Get the crate parameter given
_crate = _this select 0

; Remove the stock items from the crate
clearMagazineCargo _crate
clearWeaponCargo _crate

; Add the items to the crate
_crate addWeaponCargo ["AKM", 2]
_crate addMagazineCargo ["30Rnd_762x39_AK47", 20]
_crate addWeaponCargo ["Binocular", 2]
_crate addMagazineCargo ["SmokeShell", 10]
_crate addMagazineCargo ["HandGrenade", 10]
_crate addWeaponCargo ["Tripod_bag", 2]
_crate addWeaponCargo ["BRDM2IMP_Fagot_Bag_AT4_East", 4]
_crate addWeaponCargo ["RPG7V", 1]
_crate addMagazineCargo ["PG7V", 10]
_crate addMagazineCargo ["PG7VR", 5]
_crate addWeaponCargo ["NVGoggles", 2]

Exit

So if it is possible than how to script it ? :confused:

Thanks !

Edited by Vilman

Share this post


Link to post
Share on other sites

You may want to try addBackpackCargo or addBackpackCargoGlobal (Meant for MP, everyone will see the bp in cargo).

Be careful still, most of the ammo crates have a very very limited space for backpacks (5 or 10 in total). Bug or design? i dno :)

Share this post


Link to post
Share on other sites

Hey, its working with "addBackpackCargo" !!!

Thanks Benny. !!!

:)

Edited by Vilman

Share this post


Link to post
Share on other sites
You may want to try "addBackpackCargo" or "addBackpackCargoGlobal" (Meant for MP, everyone will see the bp in cargo).

Be careful still, most of the ammo crates have a very very limited space for backpacks (5 or 10 in total). Bug or design? i dno :)

How can I prevent the amount of backpacks incrementing each time my script runs?

I can clear the weapons and ammo with clearWeaponCargo and clearMagazineCargo but "clearBackpackCargo" doesn't appear to do anything. As a result, my script which runs ever 30 mins to re-stock the ammo crate just keeps adding to the current backpack total everytime it runs.

Surely there must be a way to prevent this? But please keep it as simple as possible as I'm an UTTER noob to scripting.

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  

×