goodlighttreeheart Posted December 16, 2015 Share Posted December 16, 2015 Hi <3Sorry again if this is a noobish question, but is it possible when you catch a detach event to cancel detaching a prim in script? or if not to cancel the detach, but hide the item neatly in another items inventory instead of the players.Thanks <3 Link to comment Share on other sites More sharing options...
steph Arnott Posted December 16, 2015 Share Posted December 16, 2015 I do not really get what you mean. if an event is triggered then it can not be stopped. 1 Link to comment Share on other sites More sharing options...
Innula Zenovka Posted December 16, 2015 Share Posted December 16, 2015 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. 1 Link to comment Share on other sites More sharing options...
goodlighttreeheart Posted December 16, 2015 Author Share Posted December 16, 2015 Thanks man, yeah that's the detatch event i was talking about. And i think you may have just given me the answer i needed with llAttachToAvatarTemp. so i dont actually need to detect a detach at all. Wonderful <3 thanks Link to comment Share on other sites More sharing options...
Innula Zenovka Posted December 16, 2015 Share Posted December 16, 2015 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. 1 Link to comment Share on other sites More sharing options...
Recommended Posts
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