OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: The-Architect on 08 Oct 2003, 18:53:00
-
Hi, it's me again.
I'm having trouble with getting weapons in the weapon select screen in the briefing. I've put everything in the description.ext, here's a look.
class aksks
{
name = "aksks";
sound[] = {"aksks.ogg", db+20, 1.0};
titles[] =
{
0, $STRM_aksks
};
};
class weapons
{
class m16
{
count = 4;
};
};
class magazines
{
class handgrenade
{
count = 20;
};
class m16
{
count = 30
};
};
I'm getting nothing when I look.
???
-
im not very good at making description files... but... i think you need to put customweapons=1
-
where?
-
A good thing to do would be to de-pbo a mission, find the description.ext and check it against yours ;)
-
That's exactly what I did. What I want is someone to look at what I've posted and see if there are any mistakes.
-
Don't waste time checking your code for mistakes, unless you enjoy it. Go the Ed Depot and get hold of the Tutorial Mission (under Tutes - Getting STarted.) Copy and paste from the description.ext tht's in there and just change the weapon names. The mission is open source so you don't even need to unpbo it.
Do you need quotes round the names? Can't remember.
-
A copy of my working description.ext:
class Weapons
{
class M4
{
count = 1;
};
class M16GrenadeLauncher
{
count = 1;
};
class G36a
{
count = 1;
};
class Steyr
{
count = 1;
};
class XMS
{
count = 1;
};
class LAWLauncher
{
count = 1;
};
};
class Magazines
{
class GrenadeLauncher
{
count = 3;
};
class M4
{
count = 8;
};
class M16
{
count = 4;
};
class LAWLauncher
{
count = 3;
};
class G36aMag
{
count = 8;
};
class SteyrMag
{
count = 8;
};
};
Remember that when dealing with C++ style code, it might be case sensitive. Not sure though, but better safe than sorry.
-
OFP script in general is not case sensitive. (There have been bugs with the odd command or something.)