These forums are CLOSED. Please visit the new forums HERE
Any script that detects when an object is detached? |
|
Lulu Ludovico
Registered User
![]() Join date: 24 Jan 2005
Posts: 27
|
02-02-2005 08:07
Hi, anyone knows of any script, inside an object, that can detect when this object is detached from the avatar? Thanks.
|
Kyrah Abattoir
cruelty delight
![]() Join date: 4 Jun 2004
Posts: 2,786
|
02-02-2005 08:13
CODE
hoping it help ![]() _____________________
![]() tired of XStreetSL? try those! apez http://tinyurl.com/yfm9d5b metalife http://tinyurl.com/yzm3yvw metaverse exchange http://tinyurl.com/yzh7j4a slapt http://tinyurl.com/yfqah9u |
DoteDote Edison
Thinks Too Much
Join date: 6 Jun 2004
Posts: 790
|
02-03-2005 02:20
Does this only work if an object is detached by clicking "Drop" in the pie menu? Or does the object detach, execute commands in the attach() event, and then go to inventory. For example, a hat is scripted to detect being detached... I wear the hat from inventory then detach it back into inventory... would the script within attach() execute before the object goes to inventory?
|
Kyrah Abattoir
cruelty delight
![]() Join date: 4 Jun 2004
Posts: 2,786
|
02-03-2005 06:55
as far as i experienced but i am not sure, before going to inventory it will execute ONE command, only one
_____________________
![]() tired of XStreetSL? try those! apez http://tinyurl.com/yfm9d5b metalife http://tinyurl.com/yzm3yvw metaverse exchange http://tinyurl.com/yzh7j4a slapt http://tinyurl.com/yfqah9u |
Lulu Ludovico
Registered User
![]() Join date: 24 Jan 2005
Posts: 27
|
Thanks
02-04-2005 08:35
Thanks for the quick response. I'll try it as soon as I can.
![]() |
Mike Zidane
Registered User
![]() Join date: 10 Apr 2004
Posts: 255
|
02-05-2005 09:44
can that command be llDie() ?
I really need a way to destroy an attachment outright. _____________________
I'm only faking when I get it right. - CC
|
Jeffrey Gomez
Cubed™
![]() Join date: 11 Jun 2004
Posts: 3,522
|
02-05-2005 09:49
can that command be llDie() ? I really need a way to destroy an attachment outright. llDie generally does not work on attachments, so my guess is it wouldn't do a thing when detached to inventory (rezzed in world or dropped, on the other hand...). However, you can still mess with an object's inventory and/or vandalize the prim attachment when a person is, say, done using it as a trial and you want them to pay you for it. ![]() _____________________
---
|
Mike Zidane
Registered User
![]() Join date: 10 Apr 2004
Posts: 255
|
02-05-2005 11:24
No... that's not really what my need is. Vandalizing the object only clutters people's inventory with trash. The whole point of destroying the object is so that it doesn't do that. And we also can't attach an object that's in a user's inventory either, right?
So what I really wanna know is.... when are they gonna give us the tools the create the content that they want us to create? It is terribly frustrating to me that every time I want to do something -really simple-, we can't do it. I think we need to start raisin' a little more hell around here. ![]() _____________________
I'm only faking when I get it right. - CC
|
Rhombur Volos
King of Scripture & Kebab
Join date: 6 Oct 2004
Posts: 102
|
02-05-2005 11:36
You could have the attachment count the number of times it's rezzed with the on_rez event. This way, the next time someone rezzes it after detaching it the first time, it can tell that it has been used before, and detach again.
|
Mike Zidane
Registered User
![]() Join date: 10 Apr 2004
Posts: 255
|
02-05-2005 12:06
I appreciate the suggestion. But if the object exists after it's first use, then it isn't really acceptable. Your solution still clutters the inventory with trash.
Here's the build.... it looks like a glass with a couple of toothbrushes in it. You click on the glass, or sit on it, or whatever, a toothbrush goes into your hand, and you brush your teeth. When you are done, there is no toothbrush to worry about -anywhere-. It is not acceptable to have everything in the toothbrush, because then only people who own the toothbrush can use it. It is not acceptable to have the toothbrush stay in the inventory because it is useless at that point. Digging through your inventory to use this build is also not acceptable because it would be too clumsy. I don't really think this is possible with the tools we have (though I'd certainly be very appreciative if someone could figure it out). As it stands right now, I can't do anything I couldn't do a year ago, as far as the kinds of builds I create go, at least. I could write a big tirade about this... but I don't think this is the right forum for it. _____________________
I'm only faking when I get it right. - CC
|
Jeffrey Gomez
Cubed™
![]() Join date: 11 Jun 2004
Posts: 3,522
|
02-05-2005 13:06
No... that's not really what my need is. Vandalizing the object only clutters people's inventory with trash. The whole point of destroying the object is so that it doesn't do that. And we also can't attach an object that's in a user's inventory either, right? It's my understanding that only inventory can be attached/detached through the use of a script, since in-world objects calling llAttachToAvatar are immediately moved to inventory, and I believe llDetachFromAvatar moves the object right back to inventory. If you could find a way to have the object detach and remain in world, then this should be doable - and very well may. In the meantime, all I can suggest is that you use what you have. ![]() _____________________
---
|