|
HulkHogan Harker
Registered User
Join date: 14 May 2005
Posts: 35
|
07-05-2006 16:15
what im looking for is.. that everytime an object is touched.. it will start to go down by what ever i put for instance it is clicked.. It will say you have 12 clicks left and on the last one it deletes
_____________________
To all my Hulkamaniacs, say your prayers, take your vitamins and you will never go wrong. What cha gonna do.. what cha gonna do brother when HulkAmania! Runs Wild on YOU! *Rips Shirt off*
|
|
Ziggy Puff
Registered User
Join date: 15 Jul 2005
Posts: 1,143
|
07-06-2006 09:56
Something like this? integer counter = 12; // Change this to whatever you want it to start with
default { touch_start(integer num) { counter--;
llWhisper(0, (string)counter + " clicks left.");
if (counter == 0) { llDie(); } } }
I'm not sure why the thread title says 'detach'. If you need this to work on an attachment, I think that gets a little more complicated with getting the object to die.
|
|
Takuan Daikon
choppy choppy!
Join date: 22 Jun 2006
Posts: 305
|
Detach/Delete an attachment?
07-06-2006 14:52
I have a similar, but perhaps more general, situation. I have a scripted object which, when activated by a chat command, rezzes and attaches another object. This was done just because it was easier to get the object in my av's hand without scrolling through my inventory. Think of it like voice-activated quick-draw  Unfortunately, I cannot seem to be able to make the newly-rezzed object die. Using llDie() on an attachment is uneffective, and using DetachFromAvatar() just puts it in my inventory(). I don't want 20 copies of the darned thing in my inventory. So, assuming that the OP was referring to attachments, is there a way to get an attachment to delete *without* going into the user's inventory? I cannot seem to find one.
|
|
Ziggy Puff
Registered User
Join date: 15 Jul 2005
Posts: 1,143
|
07-06-2006 15:40
Could you drop it, and script the attachment to die when it detects that it's no longer attached? I think this is covered in the Wiki, and I believe it gets tricky, because you now have an object that will die instantly if rezzed on the ground.
|