Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Sliding doors

mutti Slade
Registered User
Join date: 5 Apr 2007
Posts: 5
04-10-2007 23:06
I have bought a script for sliding doors, and I can't make it work. They wont slide...? The script is as following:

// Sliding Door Script
// By Lux Zhukovsky

vector size;
float dimx;
rotation rot;
vector angle;
string id;
integer count;
vector offset;
default
{
state_entry()
{
size= llGetScale();
size.x -= 0.1;
dimx = size.x;
rot = llGetLocalRot();
angle = llRot2Fwd(rot);
offset = dimx*angle;
}
touch_start(integer p)
{
integer x;
vector pos = llGetLocalPos();
for (x = 1; x < 2; x++)
{
llSetPos(pos + x*offset);
llSleep(0.1);
}
offset *= -1;
}
}


When I make an object I paste this script into the content folder – is there anything else I can do? I mean - eventhough the doors are standing in the middle of nowhere, I guess they should still work. Do I need to attach them to my house first? And should they be linked?

Please help - I have already spent 3 hours on these doors, and they are driving me crazy!

Mutti Slade
Dnel DaSilva
Master Xessorizer
Join date: 22 May 2005
Posts: 781
04-10-2007 23:28
The question is best suited, and more likely to be answered, in the scripting tips forum.
_____________________
Xessories in Urbane, home of high quality jewelry and accessories.

Coming soon to www.xessories.net

Why accessorize when you can Xessorize?
Joker Opus
Registered Usimibober
Join date: 9 May 2006
Posts: 363
04-11-2007 00:54
Hmm just have it slide like two meters when clicked..
such as

CODE

default
{
touch_start(integer touch)
{
llSetPos(llGetPos() + <0,2,0>));
llSleep(5);
llSetPos(llGetPos() + <0,-2,0>));
}
}


Simple as that
_____________________
Jøkêr Øpüs
PLEASE FIX THE WEAPON TESTING SANDBOX - AN OLD SECONDLIFE HANGOUT!