OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: The-Architect on 08 Oct 2003, 18:53:00

Title: weapons selection
Post 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.
 ???
Title: Re:weapons selection
Post by: _hammy_ on 08 Oct 2003, 23:39:34
im not very good at making description files... but... i think you need to put customweapons=1
Title: Re:weapons selection
Post by: The-Architect on 09 Oct 2003, 13:50:29
where?
Title: Re:weapons selection
Post by: B-2-0 on 09 Oct 2003, 13:52:54
A good thing to do would be to de-pbo a mission, find the description.ext and check it against yours ;)
Title: Re:weapons selection
Post by: The-Architect on 10 Oct 2003, 02:29:45
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.
Title: Re:weapons selection
Post by: macguba on 11 Oct 2003, 11:13:42
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.
Title: Re:weapons selection
Post by: Jus on 12 Oct 2003, 03:12:27
A copy of my working description.ext:

Code: [Select]
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.
Title: Re:weapons selection
Post by: macguba on 12 Oct 2003, 18:30:17
OFP script in general is not case sensitive.   (There have been bugs with the odd command or something.)