Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Script for replacing select textures?

HoseQueen McLean
curiouser & curiouser
Join date: 23 Apr 2004
Posts: 918
05-17-2005 08:50
Ok, say I have a prim – a cube – and each side has a different texture. And lets say one side of the cube has “Texture A” applied to it, but I want to replace only that one texture with “Texture B,” leaving the rest alone.

Is it possible to write a script that will do this?
Shack Dougall
self become: Object new
Join date: 9 Aug 2004
Posts: 1,028
05-17-2005 10:56
Yes, llSetTexture() allows you to specify a side.
_____________________
Prim Composer for 3dsMax
-- complete offline builder for prims and sculpties in 3ds Max
http://liferain.com/downloads/primcomposer/

Hierarchical Prim Archive (HPA)
-- HPA is is a fully-documented, platform-independent specification for storing and transferring builds between Second Life-compatible platforms and tools.
https://liferain.com/projects/hpa
Tito Gomez
Mi Vida Loca
Join date: 1 Aug 2004
Posts: 921
05-17-2005 12:01
yes
_____________________
Ushuaia Tokugawa
Nobody of Consequence
Join date: 22 Mar 2005
Posts: 268
05-17-2005 12:29
From http://secondlife.com/badgeo/wakka.php?wakka=side

0 - top
1 - lesser y
2 - greater x
3 - greater y
4 - lesser x
5 - bottom

these are the side numbers for a cube you would use with llSetTexture (or the constant ALL_SIDES for all of the sides).

So, to set the texture on the bottom of the box:

llSetTexture("name of texture in prim contents or a texture uuid", 5);
HoseQueen McLean
curiouser & curiouser
Join date: 23 Apr 2004
Posts: 918
05-24-2005 08:50
Thank you :)