OFPEC Forum

Addons & Mods Depot => OFP - Addons & Mods General => Topic started by: JasonO on 07 Jul 2006, 12:49:23

Title: Addon dosent apear in game editor
Post by: JasonO on 07 Jul 2006, 12:49:23
Hi
I just made a basic addon and I have been trying to get it apear in game. I have made addons apear in game before, but no it isnt working. The main thing i was thinking was my config so here it is.

Code: [Select]
class CfgPatches
{
class 1stob
{
units[] = {1stob};
weapons[] = {};
requiredVersion = 1.0;
};
};
class CfgVehicles
{
class All {};
class Static: All {};
class Building: Static {};
class NonStrategic: Building {};
class TargetTraining: NonStrategic {};
class TargetGrenade: TargetTraining {};

class Crate: TargetGrenade
{
model="\1stob\1stob";
armor=99999;
scope=2;
displayName="My First Object";
}
}

For some reason i cant find it.

I got this config from a tutorial for a static object. I thought this was suitale because the object i have made is also a static object.

Thanks for your help :)
Title: Re: Addon dosent apear in game editor
Post by: h- on 07 Jul 2006, 13:55:06
First one that quickly comes to mind is that you have two ; missing, from the two closing brackets at the end...

Quote
   class Crate: TargetGrenade
   {
      model="\1stob\1stob";
      armor=99999;
      scope=2;
      displayName="My First Object";
   };
};

EDIT:
Second is that you really should call the class something else than just Crate...
Tag it with an acronym, like JSNO_Crate (just made that up from JasonO :P )..
Title: Re: Addon dosent apear in game editor
Post by: Planck on 07 Jul 2006, 20:01:59
Also:

Code: [Select]
class CfgPatches
{
class 1stob
{
units[] = {Crate};
weapons[] = {};
requiredVersion = 1.0;
};
};


Planck
Title: Re: Addon dosent apear in game editor
Post by: klavan on 07 Jul 2006, 20:29:09
I dare to say:
Code: [Select]
model="\1stob\1stob.p3d";Klavan
Title: Re: Addon dosent apear in game editor
Post by: remcen on 07 Jul 2006, 21:47:35
I dare to say:
Code: [Select]
model="\1stob\1stob.p3d";Klavan

you needn't include the suffix, trust me.

apart from that... the object should appear ingame under objects as it's a subclass of targetgrenade. are you sure you haven't simply overlooked the crate?