OFPEC Forum
Addons & Mods Depot => OFP - Addons & Mods General => Topic started by: Serial Killer on 16 Jun 2005, 20:14:06
-
I'm trying to make random faces for units, so I writed this on my addon's config.
class CfgModels
{
class Default
{
sections[] = {};
sectionsInherit="";
};
class Head: Default
{
sections[] =
{
"osobnost",
"brejle"
};
};
class rkap1: Default
{
sections[] =
{
"head injury","body injury",
"l arm injury","r arm injury","p arm injury",
"l leg injury","r leg injury","p leg injury",
"medic",
"hlava",
"krk",
"zasleh"
};
sectionsInherit=Head;
};
};
Ok, it works fine. But here's the problem:
When I'm trying to add there one more unit (rkap2), I cant see those units in editor anymore. :o
Here's the edited config with that other unit:
class CfgModels
{
class Default
{
sections[] = {};
sectionsInherit="";
};
class Head: Default
{
sections[] =
{
"osobnost",
"brejle"
};
};
class rkap1: Default
class rkap2: Default
{
sections[] =
{
"head injury","body injury",
"l arm injury","r arm injury","p arm injury",
"l leg injury","r leg injury","p leg injury",
"medic",
"hlava",
"krk",
"zasleh"
};
sectionsInherit=Head;
};
};
Help me! :(
-
Try:
class CfgModels
{
class Default
{
sections[] = {};
sectionsInherit="";
};
class Head: Default
{
sections[] = {"osobnost","brejle"};
};
class rkap1: Default
{
sections[] ={"head injury","body injury","l arm injury","r arm injury","p arm injury","l leg injury","r leg injury","p leg injury","medic","hlava","krk","zasleh"};
sectionsInherit=Head;
};
class rkap2: rkap1 {};
};
Planck
-
Now that one what worked already wont work, and that one what didn't work works now. What the f*ck? :o ::)
Here's thw hole config if it helps:
// some basic defines
#define TEast 0
#define TWest 1
#define TGuerrila 2
#define TCivilian 3
#define TSideUnknown 4
#define TEnemy 5
#define TFriendly 6
#define TLogic 7
#define true 1
#define false 0
// type scope
#define private 0
#define protected 1
#define public 2
#define WeaponNoSlot 0// dummy weapons
#define WeaponSlotPrimary 1// primary weapons
#define WeaponSlotSecondary 16// secondary weapons
#define WeaponSlotItem 256// items
#define WeaponSlotBinocular 4096// binocular
#define WeaponHardMounted 65536
class CfgPatches
{
class rkap
{
units[] = {rkap1,rkap2};
weapons[] = {};
requiredVersion = 1.01;
sections[]={"head injury","body injury","l arm injury","r arm injury","p arm injury","l leg injury","r leg injury","p leg injury","medic","hlava","krk","zasleh","prot","transglass"};
ectionsInherit="Head";
};
};
class CfgModels
{
class Default
{
sections[] = {};
sectionsInherit="";
};
class Head: Default
{
sections[] = {"osobnost","brejle"};
};
class rkap1: Default {};
class rkap2: rkap1
{
sections[] ={"head injury","body injury","l arm injury","r arm injury","p arm injury","l leg injury","r leg injury","p leg injury","medic","hlava","krk","zasleh"};
sectionsInherit=Head;
};
};
class CfgVehicles
{
class All{};
class AllVehicles : All{};
class Land : AllVehicles{};
class Man : Land{};
class Soldier : Man{};
class SoldierWB : Soldier{};
class rkap1 : SoldierWB{
displayName="Squad RK soldier (Green)";
model="\rkap\mod\rkap1";
weapons[]={"M16","Binocular","NVgoggles","Throw","Put"};
magazines[]={"M16","M16","M16","M16","HandGrenade","HandGrenade","HandGrenade","HandGrenade","HandGrenade","HandGrenade"};
};
class rkap2 : rkap1{
displayName="Squad RK soldier (Brown)";
model="\rkap\mod\rkap2";
weapons[]={"AK74","Binocular","NVgoggles","Throw","Put"};
magazines[]={"AK74","AK74","AK74","AK74","HandGrenade","HandGrenade","HandGrenade","HandGrenade","HandGrenade","HandGrenade"};
};
};
class CfgNonAIVehicles
{
class ProxyWeapon {};
class Proxy : ProxyWeapon {};
};
-
I edited my first post, try the edited version.
However, I'm not even sure if 1.46 needs cfgPatches, or even cfgModels......don't quote me on that, like I said, I'm not sure.
btw......these are soldier models are they not?
Planck
-
That's right.
Hmm...
When I launch the game, it says Config rkap\config.cpp: some input after EndOfFile
EDIT: I dunno what I did... But it seems to be working now... :o
Anyway, you helped me a lot, so thank you very much! :)
-
What do you use to write your configs?
Planck
-
It's working now, as I wrote on my last post ;)