Home   Help Search Login Register  

Author Topic: CfgModels for a House  (Read 1545 times)

0 Members and 1 Guest are viewing this topic.

Lean Bear

  • Guest
CfgModels for a House
« on: 25 Mar 2005, 13:10:22 »
I've got the whole config sorted out; in fact, it works anyway :P

But I want to give the house some sections (sections[]={};)

I already defined the hiddenSelections, but I'm still not getting the effect I want.

I'm trying to use setObjectTexture on this house. And its not working cause I know my CfgModels section is wrong.

It used to texture the player's unit's "medic" section with the texture I want on the house.

That's how I know its not configured right. atm it looks like this:

class CfgModels
{
   class Default {};
   class MyHouse: Default
   {
      sections[] = {"side"};
   };
};


But I doubt this is correct :P

Offline Planck

  • Honoured
  • Former Staff
  • ****
  • I'm never wrong ....I'm just not always right !
Re:CfgModels for a House
« Reply #1 on: 25 Mar 2005, 20:45:13 »
Try something like:

Code: [Select]
class cfgModels
{
    class Default
    {
        sectionsInherit="";
        sections[] = {};
    };
    class Building : Default {};
    class nameofyourp3dfile : Building
    {
        sectionsInherit = "Building";
        sections[] = {side};
    };
};


Hope that works better.


Planck
« Last Edit: 25 Mar 2005, 20:45:49 by Planck »
I know a little about a lot, and a lot about a little.

Lean Bear

  • Guest
Re:CfgModels for a House
« Reply #2 on: 29 Mar 2005, 11:44:07 »
Sorry, still no luck.

If you can remember this far back (with your deteriating memory an' all ;)) it is for that stupid BIS house I am trying to use setObjectTexture on. Can you beleive it still doesn't work?? ::)

I'm beginning to think that maybe you can't use setObjectTexture on a building.

Offline Planck

  • Honoured
  • Former Staff
  • ****
  • I'm never wrong ....I'm just not always right !
Re:CfgModels for a House
« Reply #3 on: 29 Mar 2005, 22:12:29 »
Well apart from just inheriting from Default, which is the proper thing I suppose:

Code: [Select]
class cfgModels
{
    class Default
    {
        sectionsInherit="";
        sections[] = {};
    };
    class nameofyourp3dfile : Default
    {
        sectionsInherit = "";
        sections[] = {"side"};
    };
};

More or less exactly what you started with.

Try that, as for whether it works for buildings, I'm not totally sure either, but I think it does.

EDIT:  What resolution is the texture you are using?


Planck
« Last Edit: 30 Mar 2005, 00:11:13 by Planck »
I know a little about a lot, and a lot about a little.

Lean Bear

  • Guest
Re:CfgModels for a House
« Reply #4 on: 30 Mar 2005, 11:32:44 »
32 x 32.

Cause OFP only allows textures which are a rediculously low res to be setObjectTextured, right?

I think I need a hiddenSelections part as well, in the CfgVehicles maybe?
« Last Edit: 30 Mar 2005, 11:34:26 by Lean Bear »

Offline remcen

  • Contributing Member
  • **
  • a.k.a. hottentotten_mike
    • IM:UC
Re:CfgModels for a House
« Reply #5 on: 30 Mar 2005, 15:10:08 »
for my iraqi soldiers we setobjecttextured helmet and camo net textures of 256x256px each - no probs. i don't know who spread that rumor of low res textures...
but btw. same problem here with buildings and hiddenselections (-> graffitti on walls). a solution would be nice  :D

oh...  and sure you need a hiddenselection definition in your cfgvehicles part. with the setobjecttexture-command you can refer only to elements in this array. e.g. unit setobjecttexture [0,"xyz.paa"] refers to the first element in the hiddenselection array of that unit, '1' to the second element, etc.
« Last Edit: 30 Mar 2005, 15:14:02 by remcen »
we're looking for members: IM:UC MOD