OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Kaneda on 08 Apr 2003, 06:50:32

Title: The command you put in ammo crates to add custom weapons ??
Post by: Kaneda on 08 Apr 2003, 06:50:32
Hi sry for n00b question but it has been a while since I have tooled with OFP and editing for that matter. But what is the syntax for adding weapons and ammo to soilders and crates.

Something like      remove all; add weapon "whatever"; add ammo "whatever"



 I just forgot the proper way.
Title: Re:The command you put in ammo crates to add custom weapons ??
Post by: Kaliyuga on 08 Apr 2003, 07:05:32
 It is :


this addweaponcargo ["weaponname",#]

and

this addmagazinecargo ["magazinename",#]  

for vehicles and crates and


this addmagazine "magazinename";
this addweapon "weaponname";
this addmagazine "magazinename";


for soldiers

:toocool:
Title: Re:The command you put in ammo crates to add custom weapons ??
Post by: Kaneda on 08 Apr 2003, 07:16:45
Thank's a lot m8 :)
Title: Re:The command you put in ammo crates to add custom weapons ??
Post by: Kaneda on 08 Apr 2003, 07:33:00
hmmm it comes up unknown operator..... im using resistance is there a different syntax ?



ah no sory i put both weapon and ammo in one crate...i see that is a  nono now :p

I got it i think )
Title: Re:The command you put in ammo crates to add custom weapons ??
Post by: Artak on 08 Apr 2003, 07:41:13
What did you put in and where when it gives you that error?

this addweaponcargo ["weaponname",#]

At the end of that line the # means the number of weapons you want to add. The same goes with the addmagazine command.
The 'this' part of the command refers to the unit in which init field the command is. So if you're using it in some other place than the units init field you must use  unitname addweapon...

[edit]
..right
[/edit]
Title: Re:The command you put in ammo crates to add custom weapons ??
Post by: Kaneda on 09 Apr 2003, 11:15:35
I put it in the edit unit screen in the ingame editor.