Jump to content

Change texture script on an attached item


Jazmina Voom
 Share

You are about to reply to a thread that has been inactive for 2700 days.

Please take a moment to consider if this thread is worth bumping.

Recommended Posts

Hi,

I have a script to allow a list of admin users (defined in AdminPersonnel) to change the textures on a mesh object which is to be worn by other people's avatars.

In tests, I am able to touch the worn object and get the menu of options, but the other's on my "AdminPersonnel" list do not see the touch option.

 

When I rez it on the ground, it works as it should, and those on the AdminPersonnel list can touch the object to get the menu.

 

**Edit - I have taken out some unnecessary lines so that it is easier to analyse.

Is this a hard limit in LSL that you just cannot code this? Or am I just not seeing it?

 

// My script:::::

 

list AdminPersonnel = ["ffd73ce4-5873-477a-89f1-74a9179c6907","5580b4d3-c726-4ea5-8ac2-e77c20f3df79"];


string text;

integer geeListener;


default {

state_entry() {
// sets textures - blank image applied to faces 3 and 4

// Badge 1
llSetTexture("9b53c260-a8bb-4e88-5989-8383d52c433e", 3);
// Badge 2
llSetTexture("9b53c260-a8bb-4e88-5989-8383d52c433e", 4);

}

touch_start(integer total_number)
{
key id = llDetectedKey(0);
integer index = llListFindList(AdminPersonnel, [(string) llDetectedKey(0)]);
if (index != -1)
{
llListenRemove(geeListener);
geeListener = llListen(-99, "", id, "");

llDialog(id, "\n", ["Science","Medical"] , -99);

}
}

listen (integer chan, string name, key id, string msg)
{
// Checks which button was pushed by the admin

 if (msg == "Science")

llSetTexture("3ad668b6-75b0-e2eb-3555-74fc5045a10d", 3);

else if (msg == "Medical")
llSetTexture("154da711-fab4-469f-080d-ce1979fc71fb", 4);


llSetTimerEvent(0.1);
}

timer()
{
// Stop listening
llListenRemove(geeListener);

// Stop the timer
llSetTimerEvent(0.0);

}
}

Link to comment
Share on other sites

It might. But I'm pretty sure I've been able to touch fitted-mesh attachments on my own body; not sure about others, though. Maybe try this with other fitted mesh attachments and an alt, just to see how things work.

There used to be a trick (maybe still?) if you right-click and select something else in the world then you could right-click objects attached to other avatars... and maybe that would allow you to choose "Touch" from the menu, but I only remember using it to get info in the Build Tool, so not sure about that Touch business.

If I were you, I'd first try to isolate the problem by using the script you've got in a simple plywood box, attached to an alt, and see how that works. Then try putting the default "New Script" inside the fitted mesh you're working with and see if you can find a way to get any script working in there.

Maybe you can link something big and transparent to that fitted mesh before it's attached, and that big thing would be touchable? No idea if that can work, though.

Link to comment
Share on other sites

Thanks everyone for your replies.

 

I did a test where I took a very basic touch script and put in into a rigged mesh item.

I then exported the same item, but did not import using the "Include skin weight" option. The result was that the rigged item could not be touched (directly) and the non-rigged item could. I did add a box to the item away from the body to eleminate the possibility that the avatar body was blocking the touch.

By the way, you can right click the rigged item, go to "More" and then there is a touch option. That works. However my goal is to have other avatars be able to click the rigged mesh clothing item and that does not seem to be possible.

I did some work with the phsics shape also to see if that would help but it did not.

Seems strange that rigged items cannot be touched but that seems to be the case.

 

Link to comment
Share on other sites

Thanks to everyone who replied, especially Qie Niangao and ObviousAltIsObvious.

 

The solution was to link an unrigged object to the rigged item. It seems obvious now in hindsight, but doesn't everything! lol

 

By the way, this was my first foray into the forums and I am so impressed with the feedback. What a great community!

 

 

Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 2700 days.

Please take a moment to consider if this thread is worth bumping.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...