|
HulkHogan Harker
Registered User
Join date: 14 May 2005
Posts: 35
|
07-05-2006 15:13
Does anyone know, How to make an object so after they use it enough It stops working or just disappears?
_____________________
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*
|
|
Tarquin Quasimodo
Registered User
Join date: 8 Nov 2005
Posts: 38
|
07-05-2006 15:35
llDie() deletes the object.
If you want to limit usage you could create a global variable.
integer Used;
then within your script, at an appropriate point.
Used += 1
if (Used == 100) llDie();
|
|
HulkHogan Harker
Registered User
Join date: 14 May 2005
Posts: 35
|
07-05-2006 15:45
im script illeterate how would i put it in a script in an item if i just wanted to use it once
_____________________
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*
|
|
HulkHogan Harker
Registered User
Join date: 14 May 2005
Posts: 35
|
07-05-2006 15:49
cause i keep gettin a syntex error thing lol
_____________________
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*
|
|
Tarquin Quasimodo
Registered User
Join date: 8 Nov 2005
Posts: 38
|
07-05-2006 16:37
It all depends on what events your script calls, and how you know when the object is no longer required. For example, you could call llDie() after a delay of 1 minute after Rezzing, or just kill it after it is touched or...... default { on_rez(integer Pass) { llSetTimerEvent(60); } timer() { llSay(0,"Ouch!"  ; llDie(); } touch_start(integer total_number) { // // Put your execute once only script here // llSay(0, "Aaargh"  ; llDie(); } }
|
|
HulkHogan Harker
Registered User
Join date: 14 May 2005
Posts: 35
|
07-05-2006 16:45
say i wanted it to count down.. Like after every time its touched it says u have like 20 touches left.. u have 19, 18 etc then it deletes on the last one
_____________________
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*
|
|
Xixao Dannunzio
Owner, X3D Enterprises
Join date: 20 Mar 2006
Posts: 114
|
07-05-2006 18:26
integer gCountdown = 20;
default { touch_start(integer total_number) { if(gCountdown > 0) { --gCountdown; llSay(0, "You have "+(string)gCountdown+" touches left."); }else{ llDie(); } } }
|