OFPEC Forum
Addons & Mods Depot => OFP - Addons & Mods General => Topic started by: Lean Bear 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
-
Try something like:
class cfgModels
{
class Default
{
sectionsInherit="";
sections[] = {};
};
class Building : Default {};
class nameofyourp3dfile : Building
{
sectionsInherit = "Building";
sections[] = {side};
};
};
Hope that works better.
Planck
-
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.
-
Well apart from just inheriting from Default, which is the proper thing I suppose:
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
-
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?
-
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.