In search of texture change on touch script for mesh
- Kimm Starr
- Posts: 293
- Joined: Wed Jan 30, 2019 7:59 pm
- Has thanked: 411 times
- Been thanked: 489 times
In search of texture change on touch script for mesh
In search of texture change on touch script for mesh. Not sure if this is possible because I have searched high and low for one with no luck. I created an Elephant Man Animesh and I want people to be able to touch his hood and it turn clear (transparent) to reveal his head. Thanks in advance for any help with this. Willing to pay for the script.
I'm obsessed with Animesh and soon you will be too!
-
Graham Mills
- Posts: 1314
- Joined: Sun Dec 23, 2012 2:26 pm
- Has thanked: 1134 times
- Been thanked: 1143 times
Re: In search of texture change on touch script for mesh
With the proviso that I've never tried this with mesh, I'd guess it's a matter of changing the texture on a particular face using llSetTexture (assuming it's not a linkset)? I guess some animated reveal or dissolve might be appropriate but that's the basics afaik.
Code: Select all
string hoodTexture = "1bw";//names of textures in object inventory
string faceTexture = "2bw";
integer face = 0;// face to be textured
default
{
on_rez(integer p)
{
llSetTexture(hoodTexture, face);
}
touch_start(integer i)
{
if (llDetectedTouchFace(0) == face)
{
if (llGetTexture(0) == faceTexture)
{
llSetTexture(hoodTexture, face);
}
else
{
llSetTexture(faceTexture, face);
}
}
}
}
- Kimm Starr
- Posts: 293
- Joined: Wed Jan 30, 2019 7:59 pm
- Has thanked: 411 times
- Been thanked: 489 times
Re: In search of texture change on touch script for mesh
Thanks so much Graham, I'll give this a try now.
I'm obsessed with Animesh and soon you will be too!
- Luna Lunaria
- Posts: 101
- Joined: Thu Mar 16, 2017 1:02 am
- Has thanked: 62 times
- Been thanked: 161 times
Re: In search of texture change on touch script for mesh
Let me know if that works Kimm. If not, I have one that I use all the time


