Home   Help Search Login Register  

Author Topic: faulty ammo crates  (Read 756 times)

0 Members and 1 Guest are viewing this topic.

Shodan

  • Guest
faulty ammo crates
« on: 26 May 2004, 19:56:40 »
this addWeaponCargo["M16", 3]; this addMagazineCargo["M16", 12];

according to Hotshots OFP commands manual , the above should put 3 M16 weapons and 12 M16 magazines into an ammo crate. It doesn't.  :P Any suggestions?

Offline General Barron

  • Former Staff
  • ****
  • Semper Fi!
Re:faulty ammo crates
« Reply #1 on: 26 May 2004, 20:31:45 »
It should work; I'm not sure what the problem is.

Some objects cannot hold weapons/ammo (people for example), and there is also a limit of how much an object can hold, so that may be your problem.

Are you getting an error message?
« Last Edit: 26 May 2004, 20:32:28 by General Barron »
HANDSIGNALS COMMAND SYSTEM-- A realistic squad-control modification for OFP
kexp.org-- The best radio station in the world, right here at home! Listen to John Richards!

Shodan

  • Guest
Re:faulty ammo crates
« Reply #2 on: 26 May 2004, 20:56:40 »
Quote
Some objects cannot hold weapons/ammo (people for example), and there is also a limit of how much an object can hold, so that may be your problem.
 

I know this is true, but crates should be able to have stuff put in.

According to the manual from hotshot, this should have put the aforementioned weapons and ammo into a crate I placed down. I used the exact words mentioned above, but when I preview, no M16 or ammo shows up in the pickup menu. :help:  The only thing that shows is a single measly grenade.

Offline h-

  • OFPEC Site
  • Administrator
  • *****
  • Formerly HateR_Kint
    • OFPEC
Re:faulty ammo crates
« Reply #3 on: 26 May 2004, 21:22:28 »
I think you need to have space in your pockets in order to get the 'pick up ammo action'...

 ???
« Last Edit: 26 May 2004, 21:24:17 by HateR_Kint »
Project MCAR   ---   Northern Fronts   ---   Emitter 3Ditor
INFORMATIVE THREAD TITLES PLEASE. "PLEASE HELP" IS NOT ONE..
Chuck Norris can divide by zero.

Offline oyman

  • Members
  • *
  • king of pings
Re:faulty ammo crates
« Reply #4 on: 26 May 2004, 23:56:27 »
I think you need to have space in your pockets in order to get the 'pick up ammo action'...

 ???
ya you do need a space between your brackets
so it should be like this
Code: [Select]
this addWeaponCargo ["M16", 3]; this addMagazineCargo ["M16", 12];
:)

Dubieman

  • Guest
Re:faulty ammo crates
« Reply #5 on: 27 May 2004, 00:23:16 »
Try removing allweapons from the ammocrate first.

this removeallweapons

Maybe....

Shodan

  • Guest
Re:faulty ammo crates
« Reply #6 on: 27 May 2004, 01:02:37 »
Quote
this removeallweapons

doesn't seem to recognise this command. ???

rearmammo1 addWeaponCargo ["M16", 10]

this worked, but it only put M16 magazines into the box. No rifle actually appeared in the pickup menu ::)

I did the exact same command except with ["LAWLauncher", 10] but nothing appeared at all.

I dunno, I'm pretty stuck.


Kaliyuga

  • Guest
Re:faulty ammo crates
« Reply #7 on: 27 May 2004, 01:48:55 »
to clear everything from an ammocrate/vehicle/etc  it's:

 clearweaponcargo this; clearmagazinecargo this

in the init line

and I really don't know why that line of code isn't working either..

straight from the command reference:

AddWeaponCargo
 
Description :
Adds weapons to a vehicle or ammo crate.
 
Syntax :
UnitName AddWeaponCargo ["WeaponType", Quantity]

Example :
MyCrate AddWeaponCargo ["M16", 3]

and Same thing for AddMagazineCargo


 
« Last Edit: 27 May 2004, 01:49:37 by Kaliyuga »

Shodan

  • Guest
Re:faulty ammo crates
« Reply #8 on: 27 May 2004, 02:27:15 »
 :hmm:
Right dudes, here's what's going down in groovetown today:

I've tried all the suggested methods above. I just need to make sure: I want a player to be able to approach some ammo crates and pick up a LAW Launcher weapon (Which they are not carrying beforehand). So far, I can put LAW Launcher ammo into the crate, but cannot get the player to pick up the weapon, only take ammo if they already have the launcher.

I can put a Launcher onto a player, but cannot  ::) put any ammo on them. They carry the launcher but have no ammo and can only get it when they pick some up at a crate.

Do I have to do something in the init.sqs file? If so, I'm screwed 'cos I have no idea how to use that file. No idea where to begin, really.

It isn't such a huge problem that I can't put ammo on a player, but it would help for future reference to know how to put a weapon and ammo on a player rather than toting an empty launcher :P
« Last Edit: 27 May 2004, 02:27:51 by Shodan »

Dubieman

  • Guest
Re:faulty ammo crates
« Reply #9 on: 27 May 2004, 04:02:08 »
Maybe try

removeallweapons this

on crate then add the stuff.


As for init lines for guys do this to add a LAw and one rocket.

this addmagazine "LAWLauncher"; this addweapon "LAWLauncher"

THere you go I hope. :)

TERA_Forrest

  • Guest
Re:faulty ammo crates
« Reply #10 on: 27 May 2004, 08:49:33 »
its way easyer to use chris's ofp script editor... it'll make briefings, overviews, description files, ammo crate fillers all for you with simple easy button clicking ;)

get it here..... http://www.chenderman.com/games_ofp.htm

make the "sqs file", your ammo crate... save it in your user/mission/mission your working on name folder, then in the initialization field of the ammo crate type this out:

[this] exec "custom_crate.sqs"

change "custom_crate" to whatever you've named the ammo crate filler.

hope this helps u :)
« Last Edit: 27 May 2004, 08:50:20 by TERA_Forrest »

Shodan

  • Guest
Re:faulty ammo crates
« Reply #11 on: 27 May 2004, 19:43:27 »
Thank you all!

I still haven't managed to get the player to have any ammo for a LAW Launcher, and cannot put weapons that can be picked up in a crate, but thanks to all of u  :D i can at least solve a few of my ammo box blues.

Cheers!:cheers: