Jump to content

Really??


TheGovnor
 Share

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

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

Recommended Posts

Hi I was trying to make a hud worn from inventory detach and delete it self.  Everything works except the delete part.  I was under the understanding that if you used llAttachToAvatarTemp, then llDetachFromAvatar that the object would delete self on detach followed by llDie();, But its not :(.

You cant  drop an attachment to delete itself, from avatar if it has a script in it....

So llAttachToAvatarTemp, then llDetachFromAvatar llDie(); will only work if you wear/attach the hud or object from rez and not inventory?.   You cant make an object worn from inventory delete itself from your inventory on detach at all??

 

This is just very frustrating if so :((.

Link to comment
Share on other sites

You can get an attachment worn from inventory to delete on drop, but not on detach...

If you drop an attachment, it seems to come out of your inventory (it no longer appears there) and exists only in-world.

If you have a simple script in there with llDie() triggered on attach with no avatar key (i.e. triggered on detach) then the object deletes and still does not seem to reappear in the inventory. Not even in lost&found or trash, at least not immediately or after one relog. This is the documented behaviour of llDie().

The script is as simple as

default {    attach (key ID) {        if (ID) {} else llDie();    }}

I never knew about the above behaviour before, I've just done a few tests out of curiosity.

Note that you cannot simply make the object delete if the user selects to detach it. It must be dropped to put it in-world, where llDie() works. You can't llDie() an object while it is attached either, so you can't try to catch the detach event and then run llDie() on the next attach.

...

llAttachToAvatarTemp() is only for attaching a rezzed object to (usually) someone who doesn't own it. The object does not go into inventory at all and automatically deletes when detached. You cannot drop such an object.

 

 

 

Link to comment
Share on other sites

You are having trouble with the basic concept of rezzing.  Any object in your inventory isn't truly IN your inventory.  What's there can best be thought of as a marker to the object's description in the SL asset servers.  As long as you have that marker in your inventory, you may create a new instance of the object whenever you want. That's what rezzing does.  Every time you rez an object, you are creating a brand new, unique instance with its own UUID.  If you delete that instance later, you haven't done anything at all to the marker that's still in your inventory, so you are still free to create another brand new instance later.

llAttachToAvatarTemp is special because it transfers ownership of a rezzed instance of an object to a new owner without also transferring a marker that will sit in the new owner's inventory.  When the new owner detaches the object, she has no way to rez a new one because she never had the marker in her inventory.

llDie() and temp_on_rez only affect the rezzed instances of objects, not the markers that sit in inventory.

Link to comment
Share on other sites

  • 3 weeks later...

ok the problem is how you are trying to use the function.

the function temp attach has several limits, in such you cannot relog, or change sim, if you do, you loose the temp attach.

and some "other" object must rez the hud and as for permisions to be temp attach, when done that way and only that way.

the moment that object is detached or self detached by script it stops existing and it NEVER exists on that person inventory. (of course if something else gives the hud in a normal way cannot delete that one either).

 

and thats how you eliminate a hud, if the problems of it are not good, the only other solution is to make the hud useless (like to make a while(1) at some point of it and also on reset if its not the creator. (so it fails if they reset too).

but really delete a normal one when worn is not possible on sl. you do not have rights over people's object and you cannot make a drop from a script either.

 

Link to comment
Share on other sites

Maybe I'm misunderstanding the question.

I've just tried rezzing a simple prim, putting this script in it, taking it back into my inventory and wearing it as a HUD:

 

default{    state_entry()    {       // llSay(0, "Hello, Avatar!");    }    attach(key id){        if (id){            //do nothing        }        else{          llDie();           }               }}

If I drop it (as opposed to detach it) then it vanishes from my inventory and is nowhere to be found inworld, as far as I can tell.

If you HUD is made from mesh, rather than regular prims, you can't drop it, but that's because it's a mesh attachment, not because it's scripted.      Probably there may also be restrictions at the parcel level.   I've never checked.

ETA:  What Vulpinus said!  I should have read to the end before writing this.

Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 2830 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...