Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Need a script.. texture changer

Lilyanah Demar
Working to make SL my RL
Join date: 15 Apr 2006
Posts: 212
10-11-2007 15:36
I have a prim that I loaded with photos... I want to change the pics on click.. anyone have a script for that?
Baron Hauptmann
Just Designs / Scripter
Join date: 29 Oct 2005
Posts: 358
10-11-2007 18:08
But of course, my dear Lily, you needed only ask :)
Anthalia Nemeth
Registered User
Join date: 8 Mar 2007
Posts: 17
10-13-2007 06:42
This will cycle through the textures in the object's inventory when touched. (ie. 1st touch shows textureA, 2nd touch shows textureB, 3rd touch shows textureC, etc.)
CODE

// Texture changes on touch by GarrMe Dagger 10.13.07
integer x = 0;
default
{
touch_start(integer total_number)
{
integer num = llGetInventoryNumber(INVENTORY_TEXTURE);
llSetTexture(llGetInventoryName(INVENTORY_TEXTURE, x), ALL_SIDES);
x++;
if (x == num) x = 0;
}
}
Nae Mayo
Registered User
Join date: 29 Apr 2007
Posts: 228
I'm selling a better one
10-23-2007 00:52
AM Texture Changer V1.00

You can select which texture to display and which side of prim to change texture.

Check my listing at SLX:
http://www.slexchange.com/modules.php?name=Marketplace&file=item&ItemID=352866

Or come to my shop to buy it:
http://slurl.com/secondlife/Dreamworld%20NE/217/105/22
Talon Brown
Slacker Punk
Join date: 17 May 2006
Posts: 352
10-23-2007 18:04
And naturally, the one you're selling is complete overkill for the OP's intended purpose. The script Anthalia posted will do what was requested, for free, and should the OP want the texture only applied to one specific face of the prim all she has to do is change ALL_SIDES to the number of the desired face. It's not exactly rocket science that requires a menu system to handle.