I have the script to make the doors slide individually and have include this below. This script io found in the scripting libary.
I'd like to make it so it remains constant when the doors open. At the moment they change if moved or if the building they are apart of moves.
They also need to be clicked seperatly which is a pain.
I'd also like to try making them automatic and avoid ahving to touch them.
All help very gratefully recieved.
Script as follows:
// change the 4 lines underhere to change which way or how far door opens
float NorthSouth = -0.8; // set how far to move nort or south
float EastWest = -1.5; // set how far to mave east or west
float UpDown = 0.0; // Set how far door moves up or down
float Timer = 15.0; // Set time how long door stay´s open and then closes again
// change four lines underhere to change sound or volume
// change the open sound string to set another opening sound
string OpenSound = "cb340647-9680-dd5e-49c0-86edfa01b3ac";
float OpenVol = 1.0; // change to set opening volume
//change the close sound string to change sound or volume
string CloseSound = "e7ff1054-003d-d134-66be-207573f2b535";
float CloseVol = 1.0; // change to set close volume
vector Pos;
vector Offset;
integer Open;
integer x;
default
{
state_entry()
{
Offset = <EastWest, NorthSouth, UpDown>;
}
touch_start(integer num)
{
for(x = 0; x < num; x++)
{
Open = !Open;
if(Open)
{
Pos = llGetLocalPos();
if(OpenSound != ""
llTriggerSound(OpenSound, OpenVol);llSetPos(Pos + Offset);
llSetTimerEvent(Timer);
}else{
if(CloseSound != ""
llTriggerSound(CloseSound, CloseVol);llSetPos(Pos);
llSetTimerEvent(0);
}
}
}
on_rez(integer param)
{
llResetScript();
}
moving_end()
{
if(Open)
{
Open = 0;
llSetTimerEvent(0.0);
}
}
timer()
{
if(CloseSound != ""
llTriggerSound(CloseSound, CloseVol);llSetPos(Pos);
llSetTimerEvent(0);
Open = 0;
}
}