OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Blanco on 15 Jan 2004, 22:31:50

Title: Q about crates & the weapons in it
Post by: Blanco on 15 Jan 2004, 22:31:50
Is there command that return the weapons in a crate ?

I tried

hint format ["%1",weapons crate]

It returns an empty array.

Is there a way?

Title: Re:Q about crates & the weapons in it
Post by: General Barron on 15 Jan 2004, 23:04:33
I believe the command is "weaponcargo object"
Also there is "magazinecargoobject"

Not exactly sure if that's correct though.
Title: Re:Q about crates & the weapons in it
Post by: macguba on 16 Jan 2004, 01:53:37
I believe weaponcargo doesn't work on ammo crates.   I was trying to solve this one a while ago and gave up.    I did consider creating a test mission to discover the exact contents of every official type of ammo crate and publishing the results as a wee tutorial reference, but it turned out I didn't care enough.

If somebody was public spirited enough to do such a thing I'm sure the community would be very grateful.

If there is a command, so much the better.

Title: Re:Q about crates & the weapons in it
Post by: General Barron on 17 Jan 2004, 00:28:44
Here, I'll save everybody some time and find this the simple way. I lifted this from BIS's commented configs (off the Breath site). These are the contents of the ammo crates and heavy ammo crates. To find the contents of the addons ammo crate, you'd have to depbo "abox.pbo" and look at its cpp. If somebody felt like doing that, adding it to these and maybe formatting this nicely, I suppose it may be worth submitting to the ed depot.

 All ammo crates:
Max Weapons: 500
Max Magazines: 2000

Ammo Crates (camo):
Magazine Cargo:
(Type, Count)

WEST

M16,  30
M60,  5
HandGrenade,  10
M21,  10
LAWLauncher,  3
GrenadeLauncher,  3

EAST

AK74,  30
PK,  5
HandGrenade,  10
SVDDragunov,  10
RPGLauncher,  3
GrenadeLauncher,  3

RESISTANCE

AK47,  30
HandGrenade,  10
PK,  5
LAWLauncher,  3
GrenadeLauncher,  3

Ammo Crates (grey box):
Magazine Cargo:
(Type, Count)

WEST

M16,  20
HandGrenade,  10
GrenadeLauncher,  10
LAWLauncher,  8
AALauncher,  3
Mortar,  6
PipeBomb,  6
Mine,  6
CarlGustavLauncher,  3

EAST

AK74,  20
HandGrenade,  10
GrenadeLauncher,  10
RPGLauncher,  8
9K32Launcher,  3
PipeBomb,  6
Mine,  6
AT4Launcher,  3

RESISTANCE

AK47,  20
HandGrenade,  10
GrenadeLauncher,  10
RPGLauncher,  8
9K32Launcher,  3
PipeBomb,  6
Mine,  6
AT4Launcher,  3

   One last note, there is a neat little ammo box that you can make by editing the mission.sqm. Its called "MachineGunBox", and it can hold 1 weapon and 2 magazines. It normally contains an m60 and 2 mags, and it looks like the little box sitting in the corner of the "small shed".