Jump to content
jonipetteri

Changing objects color/texture

Recommended Posts

Hi guys!

 

So, I can change some objects color putting this into init box:

this setObjectTextureGlobal [0, "#(rgb,8,8,3)color(0,1,2,1)"];

 

For some reason it works on some objects and on some objects it doesn't...

What's wrong?

Is there something I can do about it?

 

Thanks

Joni

 

  • Like 1

Share this post


Link to post
Share on other sites
33 minutes ago, jonipetteri said:

it works on some objects

 

Hello there jonipetteri !

 

It will not work as you said , but you can also just to know , add a second texture by changing 0 to 1 ( [0, ).

  • Like 1

Share this post


Link to post
Share on other sites

 

1 hour ago, jonipetteri said:

Hi guys!

 

So, I can change some objects color putting this into init box:


this setObjectTextureGlobal [0, "#(rgb,8,8,3)color(0,1,2,1)"];

 

For some reason it works on some objects and on some objects it doesn't...

What's wrong?

Is there something I can do about it?

 

Thanks

Joni

 

 

1 hour ago, GEORGE FLOROS GR said:

 

Hello there jonipetteri !

 

It will not work as you said , but you can also just to know , add a second texture by changing 0 to 1 ( [0, ).

 

 

or you could just change all available textures of the object like shown here:

 

  • Like 3

Share this post


Link to post
Share on other sites
1 hour ago, jonipetteri said:

For some reason it works on some objects and on some objects it doesn't...

 

the object need to have hiddenselection defined in their config or the textures can't be changed, the wiki for setobjecttexture explains a bit

 

🖖

  • Like 2

Share this post


Link to post
Share on other sites
20 hours ago, jonipetteri said:

 


this setObjectTextureGlobal [0, "#(rgb,8,8,3)color(0,1,2,1)"];

 

 

Do not put the 'global' version of the command in the init box as each connected client (server, all players) will each send the information to all connected clients causing a lot of network traffic. Use the setObjectTexture local command instead.

 

  • Like 3
  • Thanks 1

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×