02-11-2008 07:40
Hi you all,

I mad a slidingdoor after the example from a SL book,
but now i wanna ad a lock to it,
but it must be a simple one,
anyone can help me.

This is the script



vector CLOSED_POSITION = <12.404,242.889,22.082>;
vector OPEN_POSITION = <13.950,242.889,22.082>;

default
{
state_entry()
{
state Closed;
}
}

state Closed
{
state_entry()
{
llSetPos (CLOSED_POSITION);
llPlaySound ("de7ac1a3-f31b-e1a4-5a21-5b9907921bf1", 1.0);
}
touch_start(integer n)
{
state Open;
}
}

state Open
{
state_entry()
{
llSetPos (OPEN_POSITION);
llPlaySound ("de7ac1a3-f31b-e1a4-5a21-5b9907921bf1", 1.0);
}

touch_start(integer n)
{
state Closed;
}
}

greetings Meetmy