Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Editing an object set to die quickly

Zaplok Riggles
Registered User
Join date: 25 Feb 2008
Posts: 119
03-03-2008 12:18
I was trying to be a good SL citizen and set up my projectile to die via a timer. On rez, it plays a sound, sets some parameters, and in the timer does a die. The problem is, how can I edit my object now? The script is firing when I rez it to edit it and then before I can do anything, it dies.
Hewee Zetkin
Registered User
Join date: 20 Jul 2006
Posts: 2,702
03-03-2008 12:27
If you are asking generally, I would suggest keeping a copy in your inventory with scripts not running. When you want to stuff it into the rezzer object, rez it in-world, change the name, set scripts to running, and take again. And/or use the start parameter (the one passed to llRezObject() and llRezAtRoot() that is received as a parameter to the 'on_rez' event handler) to know when the object is rezzed manually rather than by script (if you rez the object manually, the start parameter is always zero).

Edit: Oh, and if you are not asking generally, but want to recover this one object: find a parcel that has scripts disabled, or MAYBE open the Edit window first, rez the object, and VERY QUICKLY go to the Tools menu and set its scripts to not running (then reset them, so it'll take another rez to start the suicide countdown).

Also go uncheck the 'Temporary' box in the Edit window. Although setting the object to temporary doesn't have any affect until the object is rezzed again, setting it to NOT temporary takes effect immediately.
EliteData Maximus
Technical Geek
Join date: 3 Oct 2007
Posts: 298
03-03-2008 14:13
i usually edit the object on the HUD where it doesnt llDie.
_____________________
:eek:
Zaplok Riggles
Registered User
Join date: 25 Feb 2008
Posts: 119
03-03-2008 15:02
From: EliteData Maximus
i usually edit the object on the HUD where it doesnt llDie.

Can you explain "Editing on the hud?"
Jesse Barnett
500,000 scoville units
Join date: 21 May 2006
Posts: 4,160
03-03-2008 15:47
From: Zaplok Riggles
Can you explain "Editing on the hud?"

RIght click it while it is in inventory and attach to one of the HUD points, such as Center or you could also just attach it to your hand for example. In either case, the object is "attached" and an object doesn't die until it is unattached.
_____________________
I (who is a she not a he) reserve the right to exercise selective comprehension of the OP's question at anytime.
From: someone
I am still around, just no longer here. See you across the aisle. Hope LL burns in hell for archiving this forum
EliteData Maximus
Technical Geek
Join date: 3 Oct 2007
Posts: 298
03-03-2008 15:55
however, you cant tick or change the lock, physical, temporary and phantom options, but it will retain the original setting it was prior to attaching to the avatar/HUD
_____________________
:eek:
Void Singer
Int vSelf = Sing(void);
Join date: 24 Sep 2005
Posts: 6,973
03-03-2008 19:31
I prefering attaching to my hand, but the idea is the same, attachments don't die.
_____________________
|
| . "Cat-Like Typing Detected"
| . This post may contain errors in logic, spelling, and
| . grammar known to the SL populace to cause confusion
|
| - Please Use PHP tags when posting scripts/code, Thanks.
| - Can't See PHP or URL Tags Correctly? Check Out This Link...
| -
Day Oh
Registered User
Join date: 3 Feb 2007
Posts: 1,257
03-03-2008 19:43
My solution is to not automatically die unless it was rezzed with a parameter

such as

default
{
on_rez(integer param)
{
if(param)
llSetTimerEvent(1.0);
}
timer()
{
llDie();
}
}
_____________________
Squirrel Wood
Nuteater. Beware!
Join date: 14 Jun 2006
Posts: 471
03-03-2008 23:19
The trick to editing it when rezzed normally is to check it like this:

CODE

on_rez(integer RezParam)
{
if (!RezParam)
{
// Kill timer and do other stuff here cause we've been rezzed with RezParam = 0
}
else
{
// Operate normally as RezParam is NOT 0.
}
}



The trick here lies in passing a rez parameter to the object.
If you rez it from the inventory or you pass it 0 as parameter, it will "go into edit mode" and if you rez it with any other number it will operate normally.
Zaplok Riggles
Registered User
Join date: 25 Feb 2008
Posts: 119
03-04-2008 04:25
Thanks for all the info folks!
Eyana Yohkoh
Registered User
Join date: 30 Nov 2006
Posts: 33
03-04-2008 15:12
I usually attach things that are set to llDie on my hip, but recently I have started to only start the main script functions and timers if a certain parameter is passed to the object when rezzing.
_____________________
http://eyanayohkoh.blogspot.com
http://www.lslwiki.net/lslwiki/wakka.php?wakka=EyanaYohkoh
Krista Chaffe
Registered User
Join date: 16 Jun 2007
Posts: 96
03-05-2008 10:37
Could you also make your projectiles temp ?

Then you wouldn't need a script to kill them and would work even if the strayed into a noscript sim [ie fired near sim edge][
Zaplok Riggles
Registered User
Join date: 25 Feb 2008
Posts: 119
03-05-2008 10:53
They are temp objects. But, I wanted them to die sooner then the temp timer. I resolved this issue by editing from the HUD as someone above suggested. Thanks!