OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Bronski on 01 Oct 2002, 03:52:20
-
On the weapon/gear selection part of the notebook, how do you enable/disable the ability to select weapons?
Also, is it possible to make custom addon weapons availiable, like the HK pack or the Fliper's M4's?
-
Yes its possible, you need to know the weapon and ammo names for the weapons you want, and put them into a Description.ext file which goes into the mission directory.
Also, use notepad to create this, place the below in it, and when you save it, change to all files type, and put Description.ext
Heres an example of what you put for weapons.
Just alter as nessacary.
class Weapons
{
class AK74SU
{
count = 10;
};
class AK74
{
count = 10;
};
class AK74GrenadeLauncher
{
count = 10;
};
class PK
{
count = 10;
};
class SVDDragunov
{
count = 10;
};
class Binocular
{
count = 10;
};
class Bizon
{
count = 10;
};
class Flare
{
count = 60;
};
class HandGrenade
{
count = 60;
};
};
class Magazines
{
class AK74
{
count = 60;
};
class GrenadeLauncher
{
count = 30;
};
class PK
{
count = 30;
};
class BizonMag
{
count = 60;
};
class SVDDragunov
{
count = 60;
};
class Binocular
{
count = 60;
};
class Flare
{
count = 60;
};
class HandGrenade
{
count = 60;
};
};
-
The descritption.ext weapons will be in addition to the ones that are defaultly included with the unit. If you want the unit to start with different weapons, use this code in the inti field removeallweapons this; this addmagazine "m16mag"; this addmagazine "m16mag"; this addweapon "m16"
For a full weapons and ammo list see the Editors Depot.
-
There are good tutorials available in the Editors Depot on description.ext - it does other things as well.
When adding weapons in a unit's init line always add at least one magazine before you add the weapon to ensure that the weapon will be loaded at the start of the mission.