Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Touch Rez script

Isis India
Registered User
Join date: 4 Mar 2009
Posts: 3
03-08-2009 09:22
Hello all
I am hoping that someone out there can help me modify a script that I have . I want to create a rez platform that when touched it will rez a vehicle , which I already have made and placed inside the mother prim / rez platform . Once rezed I would like the newly created item to have a temporary life span of 1 hr , be able to be used by anyone and only rez one item at a time , IE. the rez platform will not rez a second item untill the item that already exists on the platform has bin removed from the platform .

I will now post the script that I have in hopes that someone can help modify it , thanks for your help .


string ITEM_TO_REZ = "Object"; // set here the object you want to rez
float HOW_HIGH = 1.2; // set here how high above the main object to rez ( meters )



default
{
state_entry()
{

}

touch_start(integer total_number)
{
vector where=ZERO_VECTOR;
where.z=where.z+HOW_HIGH;
llRezObject(ITEM_TO_REZ,llGetPos()+where,ZERO_VECTOR,ZERO_ROTATION,1);
}
}
Cypher Ragu
[Mad Scientist]
Join date: 6 Jul 2008
Posts: 174
03-08-2009 11:34
//Begin rezzer script

string ITEM_TO_REZ = "Object"; // set here the object you want to rez
float HOW_HIGH = 1.2; // set here how high above the main object to rez ( meters )

default
{

touch_start(integer total_number)
{
llSensor(ITEM_TO_REZ, "", PASSIVE, 96.0, PI);
}

no_sensor()
{
vector where=ZERO_VECTOR;
where.z=where.z+HOW_HIGH;
llRezObject(ITEM_TO_REZ,llGetPos()+where,ZERO_VECTOR,ZERO_ROTATION,1);
}

//End rezzer script





//Begin vehicle auto-delete script

float Seconds_To_Delete = 3600; //One hour

default
{

on_rez(integer start_param)
{
if (start_param)
{
llSetTimerEvent(Seconds_To_Delete);
}
}

timer()
{
llSetTimerEvent(0.0);
llDie();
}
}
_____________________
Life is a highway... And I just missed my exit.
Isis India
Registered User
Join date: 4 Mar 2009
Posts: 3
03-08-2009 12:24
Thanks so much for taking the time to answer :)
I went into SL and wrote the script as posted above and I am getting an error its as follows...

(17,15) : Error : syntax error . I retyped line 17 to say ... llRezObject(ITEM_TO_REZ,llGetPos()+where,ZERO_VECTOR,ZERO_ROTATION,1);

That seemed to correct the error message .

Now I am getting an error on line 28
float Seconds_To_Delete = 3600; //One hour
not sure what needs to be done to correct it .

Thanks again for any help .
Isis India
Registered User
Join date: 4 Mar 2009
Posts: 3
03-08-2009 13:56
Everything is cool it was my bad , they are two scripts and I was lumping them together as one .

Thanks so much for your help !
Rolig Loon
Not as dumb as I look
Join date: 22 Mar 2007
Posts: 2,482
03-08-2009 13:59
You know those are TWO scripts, right? The first one goes in your base object -- the one that rezzes the vehicle -- and the second one goes in the vehicle to be rezzed. You have to create and save them separately, otherwise you'll get an error just where you did.