Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

automatic door?

Boris Eebus
Registered User
Join date: 8 Feb 2008
Posts: 45
04-24-2008 16:18
I have a very simple door opening script, how do I make it so that when someone is within 1m it automatically opens???

default
{
touch_start(integer total_number)
{
rotation rot = llGetLocalRot();

if (rot.z == 0)
{
rot.z = -0.707107;
rot.s = 0.707107;
}
else
{
rot.z = 0;
rot.s = 1;
}

llSetLocalRot(rot);

}
}
Nectere Niven
Gadget Junky
Join date: 12 Jan 2007
Posts: 211
04-24-2008 16:26
you could use a sensor or another prim to provide a collision or just do the collision on the door itself

/54/b7/240415/1.html
Lee Ponzu
What Would Steve Do?
Join date: 28 Jun 2006
Posts: 1,770
Not what you asked, but...
04-25-2008 09:21
You could make it phantom. Looks the same, but you just walk through it.
_____________________
So many monkeys, so little Shakespeare.