Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Attach from objects Contents?

Keno Pontoppidan
Registered User
Join date: 20 Oct 2005
Posts: 75
10-05-2006 08:57
I was wondering if it is possible for a already attached object to attach a object in its contents to another part of your avatar.
For example:
I make a gun and gun holster, put the gun in the holsters contents with a script. I attach the holster to say my hip and say a command which would make it attach the gun to my right hand.
Anything like this possible?
Lexi Foley
Registered User
Join date: 1 Mar 2006
Posts: 43
10-05-2006 10:09
From: Keno Pontoppidan
I was wondering if it is possible for a already attached object to attach a object in its contents to another part of your avatar.
For example:
I make a gun and gun holster, put the gun in the holsters contents with a script. I attach the holster to say my hip and say a command which would make it attach the gun to my right hand.
Anything like this possible?


As far a I heard its not posseble whitout haveing a dialog menu asking for you permision to attach it, so its posselbe to detach it on script command, and to attach it by script command but not whitout interuption of the dialog menu!! ( when the object is detached on the floor you will have to give it permissions again); the most comen way of what you said as example is to have both gun and holster and let people make believe there is only one by using a toggleing llSetAlpha, (invisseble) that way you give the illusion but not realy switch,, a guese thats not the answer you wanted to hear,,, ow, wait while im typing i think of something but i need to try that,, !!

No returning answer is i think its not posseble!! :)

Greetings Lexi Foley
HtF Visconti
Registered User
Join date: 21 Jul 2006
Posts: 123
10-05-2006 10:14
The above answer is incorrect in some points!

An object/script retains permissions that were granted if the script is not reset. It is true that you have to grant the permission on first use but if you put the item back into the content it will remember the permissions and not ask again unless the script is reset for some reason.

It might be a bit of work, though, to guide your users through the setup process. Anyone who owns Lulu's gag with the command rope knows what I am talking about. :)
Lexi Foley
Registered User
Join date: 1 Mar 2006
Posts: 43
10-05-2006 10:41
Nop my thought was it attach it from one to annother,, but also that wasnt posseble,,
this is what i tryed,, it detect the change but does not exucute the real attaching!!


CODE
integer swi;
default
{
state_entry()
{
swi=0;
}
touch_start(integer num)
{
if(llDetectedKey(0)==llGetOwner())
{
if(swi==0)
{
llRequestPermissions(llGetOwner(),PERMISSION_ATTACH);
swi=1;
}
else if(swi==1)
{
llRequestPermissions(llGetOwner(),PERMISSION_ATTACH);
swi=0;
}
}
}
run_time_permissions(integer p)
{
if(p&PERMISSION_ATTACH)
{
if(swi==0){llOwnerSay("Left Hip");llAttachToAvatar(ATTACH_LHIP);}
else if(swi==1){llOwnerSay("Right Hand");llAttachToAvatar(ATTACH_RHAND);}
}
}
}


Greetings Lexi Foley
Lexi Foley
Registered User
Join date: 1 Mar 2006
Posts: 43
10-05-2006 12:05
From: HtF Visconti
The above answer is incorrect in some points!

An object/script retains permissions that were granted if the script is not reset. It is true that you have to grant the permission on first use but if you put the item back into the content it will remember the permissions and not ask again unless the script is reset for some reason.

It might be a bit of work, though, to guide your users through the setup process. Anyone who owns Lulu's gag with the command rope knows what I am talking about. :)


In other words i ment you need to detach it first before you are able to attach it somewere else, if you detach it it goes to inven,, so its not posselbe to attach again and try the script you well see there is no attachtment change happening,, it only can be done fromout inventory and attach a different thingy on to the same spot then it does automaticly,,
detach old thingy,, attach new thingy