Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Texture Chooser

Carina Cannoli
Registered User
Join date: 22 Aug 2005
Posts: 13
04-16-2009 02:21
I'm working on a small fun project, and I need to pick a texture from a prim and have it displayed on a much larger prim.
So basically I have 2 preview prims with different textures on them, and I want to click one and it appears on the larger prim. So clicking either preview prim will make the larger prim take on the smaller prims texture.
I am very new at scripting and not sure how to do this, could anyone help please.
Tanith Rosenbaum
Registered User
Join date: 10 Sep 2008
Posts: 42
04-16-2009 02:37
From: Carina Cannoli
I'm working on a small fun project, and I need to pick a texture from a prim and have it displayed on a much larger prim.
So basically I have 2 preview prims with different textures on them, and I want to click one and it appears on the larger prim. So clicking either preview prim will make the larger prim take on the smaller prims texture.
I am very new at scripting and not sure how to do this, could anyone help please.


hey. well, I assume the textures are being put as files in one of teh two prims or both? lets assume tehy're being put in the smaller (preview) prim. In that case you'd use llSetTexture() or llSetPrimitiveParams() (which can set several parameters, including texture) at once to set the texture on the smaller prim. What comes next depends a bit on if the small and the large prim are linked in a linkset or not. If they are you should be able to set a texture from the smaller prim on the larger prim by using llSetLinkTexture() or llSetLinkPrimitiveParameters(). And if tehy're not linked you'll have to transmit the UUID of the texture to a script in the larger prim.

I hope that helped.
Carina Cannoli
Registered User
Join date: 22 Aug 2005
Posts: 13
04-16-2009 02:55
HI thanks..yes that sort of helps, but I guess I should say I don't know how to even write the script, if anyone could write soemthing basic for me including Tanith's suggestion I would very much appreciate it. The prims can be linked or not, I can do whatever is the easiest as all prims are relativly close to each other.
Johan Laurasia
Fully Rezzed
Join date: 31 Oct 2006
Posts: 1,394
04-16-2009 11:43
You need to post that in products wanted, not here, this is for scripting help.
_____________________
My tutes
http://www.youtube.com/johanlaurasia
Tanith Rosenbaum
Registered User
Join date: 10 Sep 2008
Posts: 42
04-16-2009 14:30
From: Carina Cannoli
HI thanks..yes that sort of helps, but I guess I should say I don't know how to even write the script, if anyone could write soemthing basic for me including Tanith's suggestion I would very much appreciate it. The prims can be linked or not, I can do whatever is the easiest as all prims are relativly close to each other.


Hun, if you want to try this yourself IM me inworld. I'm sure I can hook you up with a beginners scripting course.