Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Having trouble with some door scripting

AmandaKaya Lupindo
Registered User
Join date: 2 Aug 2008
Posts: 4
08-04-2008 11:55
I'm just having a little trouble getting my scripting to work. I'm using the scripting from SLbuilding.com and I have got my door to work, but now I want to reverse the way it opens for a double door kinda feel, but I can't seem to get my scripting to want to work with me. The site above gave me a script that helped see the rotation variables of the doors, but every time I try and enter the script it comes back with some sort of error, although I think I have the script correct. Anyhow, I was wondering if anyone knew how to get doors to do this "double door" open/close properly? Thank you in advance for any help posted. ;)
Innula Zenovka
Registered User
Join date: 20 Jun 2007
Posts: 1,825
08-04-2008 12:18
Assuming you're using the " sample script that you could use instead of the one in the video" given on the website,

CODE
default
{
touch_start(integer total_number)
{
vector rot = llRot2Euler(llGetLocalRot());

if (rot.z == 0)
{
rot.z = 90 * DEG_TO_RAD;
}
else
{
rot.z = 0;
}

llSetLocalRot(llEuler2Rot(rot));

}
}


then just change, in one of the doors, the line rot.z = 90 * DEG_TO_RAD; to rot.z = -90 * DEG_TO_RAD;
Ziggy Puff
Registered User
Join date: 15 Jul 2005
Posts: 1,143
08-04-2008 13:42
It would help if you posted the script(s) you were working with. It would also help if you pointed out the line that's giving you an error, as well as the exact error message you're getting. It's difficult to make guesses about what the problem might be without this information.