Home   Help Search Login Register  

Author Topic: SetObjectTexture problems  (Read 2964 times)

0 Members and 1 Guest are viewing this topic.

Lean Bear

  • Guest
Re:SetObjectTexture problems
« Reply #15 on: 29 Dec 2004, 21:35:15 »
Yeah, it looks like this:

class CfgPatches
{
   class LNB_House
   {
      units[] = {"LNB_House"};
      weapons[] = {};
      
      requiredVersion = 1.91;
   };
};
« Last Edit: 29 Dec 2004, 21:41:44 by Lean Bear »

Offline Planck

  • Honoured
  • Former Staff
  • ****
  • I'm never wrong ....I'm just not always right !
Re:SetObjectTexture problems
« Reply #16 on: 29 Dec 2004, 21:40:08 »
So:

LNB_TagHouse is the name of your PBO file?

And LNB_TagHouse is the class name of the building in cfgVehicles?

If not you better make it so.


Planck
I know a little about a lot, and a lot about a little.

Lean Bear

  • Guest
Re:SetObjectTexture problems
« Reply #17 on: 29 Dec 2004, 21:43:45 »
oops :-X took it out of the wrong config ;D

(corrected now)

Yeah, I made everything have the name LNB_House. Variable name, class names, p3d names (you get the idea) - to keep it simple.

Offline Planck

  • Honoured
  • Former Staff
  • ****
  • I'm never wrong ....I'm just not always right !
Re:SetObjectTexture problems
« Reply #18 on: 29 Dec 2004, 21:47:30 »
Did you try the cfgModels section I posted yet?


Planck
I know a little about a lot, and a lot about a little.

Lean Bear

  • Guest
Re:SetObjectTexture problems
« Reply #19 on: 29 Dec 2004, 21:54:23 »
Yeah, just finished testing.

I got the now usual texture-on-the-rear as well as the following hint:

scalar bool array string
0xff3ffffffcfffeff //loads of weird numbers etc.

Offline Planck

  • Honoured
  • Former Staff
  • ****
  • I'm never wrong ....I'm just not always right !
Re:SetObjectTexture problems
« Reply #20 on: 29 Dec 2004, 22:07:32 »
The way I see this you have attached this action to the player......so:
Code: [Select]
_LNB_House = _this select 0

_LNB_House setObjectTexture [0,"\LNB_House\LNB_Paint1.paa"]

This would mean that _LNB_House would be the player.

Try naming the building......say.....fred

Then you could try:

fred setObjectTexture [0,"\LNB_House\LNB_Paint1.paa"]



Planck
I know a little about a lot, and a lot about a little.

Lean Bear

  • Guest
Re:SetObjectTexture problems
« Reply #21 on: 30 Dec 2004, 19:20:39 »
OK, I tried it out and it came up with the following error:

Code: [Select]
""fred [#]= _this select 0" Error: reserved variable in use//or something like that
« Last Edit: 30 Dec 2004, 19:22:04 by Lean Bear »

Offline Planck

  • Honoured
  • Former Staff
  • ****
  • I'm never wrong ....I'm just not always right !
Re:SetObjectTexture problems
« Reply #22 on: 30 Dec 2004, 19:46:35 »
Thats a new one, I've never heard of the reserved variable fred.

Don't use the ....fred = this select 0 line

Leave it out, just use:

fred setObjectTexture [0,"\LNB_House\LNB_Paint1.paa"]



Planck
« Last Edit: 30 Dec 2004, 19:48:26 by Planck »
I know a little about a lot, and a lot about a little.

Lean Bear

  • Guest
Re:SetObjectTexture problems
« Reply #23 on: 31 Dec 2004, 10:23:14 »
I think it meant that 0 is a reserved variable, not fred :P

Lean Bear

  • Guest
Re:SetObjectTexture problems
« Reply #24 on: 31 Dec 2004, 10:46:58 »
Quote
Leave it out, just use:

fred setObjectTexture [0,"\LNB_House\LNB_Paint1.paa"]

This time, nothing happens. at. all. :'(

Offline Planck

  • Honoured
  • Former Staff
  • ****
  • I'm never wrong ....I'm just not always right !
Re:SetObjectTexture problems
« Reply #25 on: 31 Dec 2004, 20:00:10 »
Hahahahaha......ok

Try this:

fred == this select 0

fred setObjectTexture [0,"\LNB_House\LNB_Paint1.paa"]


No guarantees mind.  ::)

Actually, I seem to recall that the texture file can only be a certain size, can't remember what though.



Planck ::)
« Last Edit: 31 Dec 2004, 20:01:26 by Planck »
I know a little about a lot, and a lot about a little.

Lean Bear

  • Guest
Re:SetObjectTexture problems
« Reply #26 on: 31 Dec 2004, 20:42:20 »
Quote
Actually, I seem to recall that the texture file can only be a certain size, can't remember what though.

Isn't it 32x32?

Offline KTottE

  • Former Staff
  • ****
Re:SetObjectTexture problems
« Reply #27 on: 01 Jan 2005, 10:40:10 »
The texture can be any size you wish as long as it's in a power of two format.
That is, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048 and so on, and it doesn't have to be square, it can be rectangular.
"Life is not a journey to the grave with the intention of arriving safely in a pretty and well preserved body, but rather to skid in broadside, thoroughly used up, totally worn out, and loudly proclaiming 'WOW What a Ride!'"

Lean Bear

  • Guest
Re:SetObjectTexture problems
« Reply #28 on: 01 Jan 2005, 13:06:44 »
The one I'm using is 256^256 anyway, so that shouldn't make a difference then.

I've heard it comes out as 32^32 quality though. Is this tue?

edit

btw Does the texture I replace need to be the same size as the one I'm putting on?

Cause I think I textured it with a 512^512 transparent texture, but I want to add a 256^256, would that make any difference?
« Last Edit: 01 Jan 2005, 13:08:41 by Lean Bear »

Offline Planck

  • Honoured
  • Former Staff
  • ****
  • I'm never wrong ....I'm just not always right !
Re:SetObjectTexture problems
« Reply #29 on: 01 Jan 2005, 21:50:31 »
Quote
Isn't it 32x32?

Yes I think that is right LB, but, I have read somewhere else that the limit was 64 X 64.

It sort of limits setObjectTexture a little bit.


Planck
I know a little about a lot, and a lot about a little.