Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Can't get HUD and script to work on clothing prim.

Micheal Steadham
Second Life/WOW lover
Join date: 4 Aug 2006
Posts: 25
01-30-2007 08:34
I'm trying to get some clothing to have the capability of being pulled off by someone other than the owner. I've built a HUD to do this and attempted to get the HUD to operate on the article of clothing, but the script just says that the action has taken place and nothing else.

Has anyone developed this script for articles of clothing? I know I'm a noob at scripting, but I learn from example.

Any assistance would be greatly appreciated.
Pale Spectre
Registered User
Join date: 2 Sep 2005
Posts: 586
01-30-2007 11:04
I'm not aware of any LSL function that will affect clothing... so, I'm curious, what code are you using that you believe may do this... or are you trying to use llDetachFromAvatar which only applies to attachments?

Show us some code. :p
Micheal Steadham
Second Life/WOW lover
Join date: 4 Aug 2006
Posts: 25
here's what I have been able to save. Lost hard drive.
02-14-2007 11:56
// when clothing prim is touched, present a dialog with choices

integer CHANNEL = 42; // dialog channel
list MENU_MAIN = ["Ruffle", "Tug On", "Rip Off"];

default {
state_entry()
{
llListen(CHANNEL, "", NULL_KEY, "";);

}

touch_start(integer total_number)
{
llDialog(llDetectedKey(0), "What do you want to do?", MENU_MAIN, CHANNEL);
}

listen(integer channel, string name, key id, string message)
{
string response_string;

if (llListFindList(MENU_MAIN, [message]) != -1)
{
//llSay(0, name + " has chosen to '" + message + " your prim " +"'.";);
response_string = name + " has chosen to '" + message + " your prim " +"'.";

if (message == "Ruffle";)
{
//llSay(0, "ruffled your prim";);

response_string = name + " has chosen to '" + message + " your prim " +"'.";
response_string = response_string + "Click prim for dialog of options";

else if (message == "Tug On";)
{
//llSay(0, "tug'd on your prim";);
response_string = name + " has chosen to '" + message + " your prim " +"'.";
response_string = response_string + "Click prim for dialog of options";

else if (message == "Rip Off";)
{
//llSay(0, "violently ripped off your prim";);
response_string = name + " has chosen to '" + message + " your prim " +"'.";
response_string = //Detach;
}
}
else
{
//llSay(0, name + " picked invalid option '" + llToLower(message) + "'.";);
response_string = name + " picked invalid option '" + llToLower(message) + "'.\n";
response_string = response_string + "Click prim for dialog of options";
}


llSetText(response_string, <1,0,0>, 1.0);

}
}