OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting Multiplayer => Topic started by: KingBuffalo on 20 Mar 2005, 19:30:11

Title: Ammo in crates
Post by: KingBuffalo on 20 Mar 2005, 19:30:11
For MP play I am using a custom crate load-out where all the weapons/magazines are first removed, then replaced with my custom loadout.  I found the script on this site.   Here is the problem.  Some one runs to crate, grabs the weapon, grabs the ammo for it, then when they try to use it, it is not loaded, they have to reload.  Is this normal? Or is this a script problem?
Title: Re:Ammo in crates
Post by: sharkyjoe on 21 Mar 2005, 23:39:23
When I have played with Ammo-crates, I have found that the Weapons are not loaded and you need to pick up the ammo to go with it. So i dont think your script is wrong for Ammo-Crates.
However maybe your thinking of this example, if you coded in a guys Intial Feild: removeweapon this; this Addmagazine "m16"; this addweapon "m16";
Then the M16-gun would be loaded once picked up.
I think it of as Gun saftey-- How would ya really shipp guns in ammo in the real world. I know its a game but thats how I have fun and not get frustarated with the game. Yes i've been shot trying to get ammo out a crate and into my weapon. If ya unsure about crates being scripted right, try Chris' OFP Script Editor here in Ed Depot. It has a Crate maker Wizzard. Just pick, choose and Very East to use.  :)
Title: Re:Ammo in crates
Post by: StonedSoldier on 22 Mar 2005, 21:48:20
make sure you put the magazines into the crate before the weapons, eg

ammocrate addmagazinecargo ["m16",10]
ammocrate addweaponcargo ["m16",2]