Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

problem with old elevator script??? pls help

Ingie Bach
Registered User
Join date: 17 Dec 2002
Posts: 254
08-01-2004 14:05
Ok, I'm not up on the changes that have happened recently (read: in the past year, hee hee hee) and my elevator no longer works (now that I'm trying to put it back up in another build)

This was a simple 3 floor elevator I had 3 buttons inside the elevator and 3 buttons, one on each floor to "call" the elevator. Each button just talked on a channel to the elevator script, and it looked like this:

Button script:

default
{
touch_start(integer total_number)
{
llSay(3,"one";); //Triggers the elevator
llSay(0, "Welcome to the First Floor";); //the welcome message.
}
}


Then there was the elevator scrpt:


//Elevator Script

vector start_pos;
default
{
state_entry()
{
llSetStatus(STATUS_ROTATE_X|STATUS_ROTATE_Y|STATUS_ROTATE_Z, FALSE);
start_pos=llGetPos();
llSetStatus(STATUS_PHYSICS,TRUE);
llMoveToTarget(start_pos,1.5);
key id ="";
llListen(3,"",id,"";);//choose a different channel for your elevator to listen to other than 0, which would be "audiable" I chose 3 here
}

listen(integer a, string n, key id, string m)
{
vector move_pos;
if (m=="two";)//This is for the second floor level
{
move_pos=start_pos+<0,0,1>;//exparament to set the hight just right, usually around 6 meters per floor, but of course that can very, plus you want to get it just right.
llMoveToTarget(move_pos,0.2);//this is set so that the elevator does not colide with the floor (and cause it to wiggle, giggle and jerk)
}
if (m=="three";)//this is the third floor
{
move_pos=start_pos+<0,0,2>;//This would normally be set around 12 meters. The settings could also be set for sideways elevators, like on the Enterprise ;P go to exact locations!
llMoveToTarget(move_pos,0.2);
}
if (m=="one";)
{
llMoveToTarget(start_pos,0.2);//we go home here to where the elevator was created or the script was started.
}

}
}


Can you see where It's gotten messed up? Because this used to work, but no longer does?

Thans so very much for any help you can give me, and once working again, I'll post it up on the script forum.

Love Ingie
_____________________
I love modeling in Blender, if you want to check out a fantastic package for modeling and game developement (great for Architectural Walkthroughs), go to my site: http://www.ingiebee.com
Azelda Garcia
Azelda Garcia
Join date: 3 Nov 2003
Posts: 819
08-01-2004 18:49
Without trying it I dont see anything controversial. Have you tried resetting/recompiling it in case it's stopped running for reason X? Do they have the Running checkbox ticked btw?

You might want to contact a scripter in-game to get them to look over the elevator setup for you.

Azelda
_____________________
Ingie Bach
Registered User
Join date: 17 Dec 2002
Posts: 254
08-01-2004 19:35
Good suggestions, I'll see if, for some reason, it's not running. Thanks for reminding me that I'm too impatient :D

I'll post if I can get it working again, thanks again
Ingie
_____________________
I love modeling in Blender, if you want to check out a fantastic package for modeling and game developement (great for Architectural Walkthroughs), go to my site: http://www.ingiebee.com
Ingie Bach
Registered User
Join date: 17 Dec 2002
Posts: 254
08-01-2004 19:38
the reset button did it for me, WOW! I dont think I'd have gotten it without your help, at least not for a long long frustrating time! Hee hee, thanks a TON!
Love Ingie
_____________________
I love modeling in Blender, if you want to check out a fantastic package for modeling and game developement (great for Architectural Walkthroughs), go to my site: http://www.ingiebee.com