Jump to content

Cancel a detatch event


goodlighttreeheart
 Share

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

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

Recommended Posts

I'm not sure I understand what you are trying to do, but if I properly understand your question, the answer is "No" in both cases.

There's no such thing as a detach event.  There's the attach event, which fires when the object attaches or detaches.  

	attach(key id)	{		if (id){			//just been attached		}		else {			//just been detached		}	}

So you don't know the object has been detached until it happens, obviously.    At that point there's a very brief window before the item vanishes into your inventory.   It's generally long enough for the item to say something ,but that shouldn't really be relied upon.

When you detach an object, the only place it can go is your inventory, unless it's been temp-attached by a script, using llAttachToAvatarTemp.   In that case it dies when it is detached (or when you relog).

Can you describe why you want to do this?  There may well be a different way of achieving the same result.

  • Like 1
Link to comment
Share on other sites

You are most welcome.

I find when I'm having scripting problems that stepping back and concentrating on what I want to happen and why, rather than on the problematic mechanics of it, often greatly simplifies things -- when you're struggling with a script, there's frequently an easier way to do it if you look at the task from a different angle.

  • Like 1
Link to comment
Share on other sites

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