Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

some kind of vendor maybe?

Watch Coats
Registered User
Join date: 22 Aug 2006
Posts: 23
02-24-2007 04:41
i want to make and object that will attach somthing to me when i activate it,i have no idea how to do this ,i have some very basic scripting knowldge ,so if anyone has an example script i could have or any tips would be helpful?
Newgate Ludd
Out of Chesse Error
Join date: 8 Apr 2005
Posts: 2,103
02-24-2007 12:15
From: Watch Coats
i want to make and object that will attach somthing to me when i activate it,i have no idea how to do this ,i have some very basic scripting knowldge ,so if anyone has an example script i could have or any tips would be helpful?


You can only attach the obejct in which the prim is located.

CODE

default
{
touch_start(integer total_number)
{
// ask for permission to attach
llRequestPermissions(llDetectedKey(0), PERMISSION_ATTACH);
}

run_time_permissions(integer perm)
{
if (perm & PERMISSION_ATTACH)
{
llAttachToAvatar(ATTACH_LHAND);
}
}
}
Watch Coats
Registered User
Join date: 22 Aug 2006
Posts: 23
02-24-2007 15:04
thank you for that but is there anyway i could attach i second object inside the prim with the script in it?
Newgate Ludd
Out of Chesse Error
Join date: 8 Apr 2005
Posts: 2,103
02-25-2007 01:19
Not directly, you woudl need to rez teh second object and then have it attach itself.
However that may not be necessary, you could just have teh second object already attached but with its alpha set to 0 so that its invisible an dthen just chaneg its alpha to 1 to make it visible.
Watch Coats
Registered User
Join date: 22 Aug 2006
Posts: 23
02-26-2007 10:41
yes i thoght of doing that but ,would it not lag?