OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Hank Hill on 20 Aug 2002, 05:21:13

Title: Removing Ammo From Crates
Post by: Hank Hill on 20 Aug 2002, 05:21:13
as you know, a ammo crate comes with default m16 mags, some hand grenades and some laws. how can i make one compley empty?
Title: Re:Removing Ammo From Crates
Post by: SFG on 20 Aug 2002, 05:22:44
Type in the init line: removeallweapons this
Title: Re:Removing Ammo From Crates
Post by: danbryant4 on 20 Aug 2002, 05:23:13
Type this in it's INIT field -> this clearWeaponCargo; this clearMagazineCargo; <-.

Daniel J Bryant
Title: Re:Removing Ammo From Crates
Post by: snYpir on 20 Aug 2002, 05:27:25
Hank Hill: please make sure you click on the 'solve' button when your query has been answered.

This will lock the thread, and provide a visual indicator for the ed depot guys who will move your thread to the FAQ.

 8)
Title: Re:Removing Ammo From Crates
Post by: LCD on 20 Aug 2002, 05:27:32
hey every1 were r ur manners  ;)  ;D

Welcome 2 da new forums m8s  ;)  ;D

LCD OUT
Title: Re:Removing Ammo From Crates
Post by: Wolf on 20 Aug 2002, 05:27:41
danbryant4 had got it, that's the way to remove them from crates, the other is for units.
Title: Re:Removing Ammo From Crates
Post by: Hank Hill on 20 Aug 2002, 05:28:50
hey thanks for the welcome, but anywho, i dont want the crates completely empty, see i want to have my own weapons, just no m16, handgrennys or laws
Title: Re:Removing Ammo From Crates
Post by: LCD on 20 Aug 2002, 05:31:08
first use da clear command 2 make it empty nd den use

this addweaponcargo ["nameofweapon",numofweapons] nd this addmagazinecargo ["nameofmag",numofmag]

2 fill it wid wat u want

LCD OUT
Title: Re:Removing Ammo From Crates
Post by: Wolf on 20 Aug 2002, 05:31:34
Quote
how can i make one compley empty?  
 
That's what you asked, but anyway, just use
This addweaponcargo ["yourweapon", Number]
This addmagazinecargo ["yourweapon", number]
Title: Re:Removing Ammo From Crates
Post by: SFG on 20 Aug 2002, 05:32:09
Ahh I dont mess with crates much ;)
Title: Re:Removing Ammo From Crates
Post by: Hank Hill on 20 Aug 2002, 05:32:52
right i wasnt to clear i that i spose, but the

this clearWeaponCargo; this clearMagazineCargo

didnt work! GWAH!
Title: Re:Removing Ammo From Crates
Post by: danbryant4 on 20 Aug 2002, 05:33:24
Do what I said earlier to clear it, then add your own weapons by typing this after the other commands in the INIT field -> this addWeaponCargo ["weapon-name",X]; this addMagazineCargo ["magazine-name",X]; <-

Where X = number of mags/guns to be placed in.

Daniel J Bryant

PS: Make sure you do that after the other part, else you'll just remove everything you just put in.
Title: Re:Removing Ammo From Crates
Post by: LCD on 20 Aug 2002, 05:36:34
i answered his q first  :P

BTW da clearing commands didnt work cuz u have em messed up u should use


clearWeaponCargo this; clearMagazineCargo this

LCD OUT
Title: Re:Removing Ammo From Crates
Post by: Hank Hill on 20 Aug 2002, 05:38:13
Thanks everyone for your help, and welcome back OFPEC. Finally i can make cool missions again!  :P