Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Timed rez with timed die

Coldfire Nightfire
Registered User
Join date: 25 May 2008
Posts: 48
11-24-2009 11:06
here is a rez script I found that I need to mod . I need a 9 second delay before rez and die after 50 seconds with mabey llSetTimerEvent(9.0); before rez and llSetTimerEvent(50.0);
llDie();
I am realy not to sure how to put it together Could someone help thank you in advance.
CODE

default
{
state_entry()
{
llSetStatus(STATUS_PHANTOM, TRUE);
llListen(737, "", NULL_KEY, "" );
}

on_rez(integer num)
{
llResetScript();
}

listen(integer number, string name, key id, string message)
{

if(message=="object1"){
llRezObject("Object1", llGetPos() + <0, 0, 1.2>, ZERO_VECTOR, ZERO_ROTATION, 0);
}
}}
Rolig Loon
Not as dumb as I look
Join date: 22 Mar 2007
Posts: 2,482
11-24-2009 11:32
Do this ...

CODE

listen(integer number, string name, key id, string message)
{
if(message=="object1"){
llSetTimerEvent(9);
}
}

timer()
{
llRezObject("Object1", llGetPos() + <0, 0, 1.2>, ZERO_VECTOR, ZERO_ROTATION, 0);
llSetTimerEvent(0);
}

}}

The other half of your request is also easy, especially if you aren't picky about dying in exactly 50 seconds. Just create your object as a Temporary object and it will vanish on its own within a minute. You don't have to script anything. If you ARE picky about exactly 50 seconds, then write ....

CODE

default
{
on_rez(integer start_param)
{
llSetTimerEvent(50);
}

timer()
{
llDie();
}
}


and put it in the object you are rezzing.
_____________________
It's hard to tell gender from names around here but if you care, Rolig = she. And I exist only in SL, so don't ask.... ;)

Look for my work in XStreetSL at
Coldfire Nightfire
Registered User
Join date: 25 May 2008
Posts: 48
Thank you kindly
11-24-2009 12:43
Hi
Thank you so much I will give that a try , the rezzed object will have a partical script in it to run while sound clips are playing in the rezzer. the 9 seconds is fot the load time of the first sound and the die is so that the particles will end when the sound clips do .
Actualy the clips run 54 seconds but the particles take a couple seconds to drift away .
I am making a type of gesture that turns an AV to dust and blows away with an added invis prim to slowly hide the AV as the song plays and the dust particles blow ,
If you haven't guessed the clips are part of the tune Dust in the wind.
Anyone who wants a free copy of it when I am done just IM me inworld , My way of giving back for all the help I have recieved on here . Should be cool to watch .

oh and I find the auto return time for temp prim is different from sim to sim so on some sims it would not fit right at all with out a timer on die
Coldfire Nightfire
Registered User
Join date: 25 May 2008
Posts: 48
Timed Rez
11-24-2009 13:34
Here is the finnished script , Took a sec to get it right but running well now , the word object1 you say was with a small o and the one it looks for is with a capital O lol so I made them both the same to save the hassle . I know I can set names to what ever I want :}
CODE

default
{
state_entry()
{
llSetStatus(STATUS_PHANTOM, TRUE);
llListen(737, "", NULL_KEY, "" );
}

on_rez(integer num)
{
llResetScript();
}

listen(integer number, string name, key id, string message)
{
if(message=="Object1"){
llSetTimerEvent(9);
}
}

timer()
{
llRezObject("Object1", llGetPos() + <0, 0, 1.2>, ZERO_VECTOR, ZERO_ROTATION, 0);
llSetTimerEvent(0);
}
}


and the die script works perfect thank you again
Rolig Loon
Not as dumb as I look
Join date: 22 Mar 2007
Posts: 2,482
11-24-2009 14:44
From: Coldfire Nightfire
Here is the finnished script , Took a sec to get it right but running well now , the word object1 you say was with a small o and the one it looks for is with a capital O lol so I made them both the same to save the hassle . I know I can set names to what ever I want :}

Ooops... My typo. Sorry about that. However, that does point to a bit of kindness you can build in for whoever uses this script. Change that line to read.....

if(llToLower(message) == "object1";){

That way, it doesn't make any difference whether someone types "Object1," "OBJECT1," "object1," "ObJeCt1," or any other strange variation.
_____________________
It's hard to tell gender from names around here but if you care, Rolig = she. And I exist only in SL, so don't ask.... ;)

Look for my work in XStreetSL at
Coldfire Nightfire
Registered User
Join date: 25 May 2008
Posts: 48
Good to know
11-26-2009 22:40
Thanks for that little tidbit . I will be sure to add it .