Now I'm using a script that I found on the boards here where I'm having exacly the same problems. I cann get the object to move down the x and y coords but the elevator will not go up. I've swapped around the vector values in the movement portion of the script and it still will not move upwards. Here is the script with my modifications. Please help me here, I just don't. I've even tried to apply a llSetPos script to a box to try and get it to move to a location that is fixed in the Sim and it wont goto the right spot and wont go up....
Please help!
// SN_Elevator(adjustable speed version) was made by Seagel Neville as public domain, Dec 2005.
list heightList = [500]; // You have to put down the height of each floor here
list menuList = ["Home"]; // Dialog box's list. Go along with heightList.
integer speed = 20; // You can change the elevator speed here. 1 is the fastest.
key av;
float height;
integer CHANNEL;
integer HANDLE;
integer FloorSelection = FALSE;
vector StartPos;
vector AVsize;
StopSitAnim() // Don't sit on the floor. ;p
{
llStopAnimation("sit_generic"
;llStopAnimation("sit"
;llStartAnimation("impatient"
; // Needed keyframes of legs.} // If you want to know this more, make sure to replace this for "stand". ;p
ElevatorMove()
{
if(FloorSelection)
{
integer i;
for(i = 0; i <= speed; i++)
{
llSetPos(llGetPos() + (<0.0, 0.0, height / speed> * llGetRot()));
//llSetPos(llGetPos() + (<0.0, height / speed, 0.0> * llGetRot()));
//llSetPos(llGetPos() + (<height / speed * -1, 0.0, 0.0> * llGetRot()));
}
llUnSit(av);
llSleep(10);
while(llVecDist(llGetPos(), StartPos) != 0)
{
llSetPos(StartPos);
}
}
else
{
llUnSit(av);
llWhisper(0, "Plz touch this floor and select where you go first"
;}
}
default
{
state_entry()
{
llSetSitText("Get on"
;StartPos = llGetPos();
}
on_rez(integer start_param)
{
llResetScript();
}
changed(integer change)
{
if(change & CHANGED_LINK)
{
av = llAvatarOnSitTarget();
if(av != NULL_KEY)
{
llRequestPermissions(av, PERMISSION_TRIGGER_ANIMATION);
}
}
}
run_time_permissions(integer perm)
{
StopSitAnim();
ElevatorMove();
FloorSelection = FALSE;
}
touch_start(integer change)
{
key av = llDetectedKey(0);
AVsize = llGetAgentSize(av);
llSitTarget(<0, 0, (AVsize.z / 2)>, llEuler2Rot( <0, 270 * DEG_TO_RAD, 0> )); // Wow, don't you think this is a master touch? ;p
integer CHANNEL = llRound(llFrand(1000000) - 10000000);
HANDLE = llListen(CHANNEL, "", "", ""
;llDialog(av, "To what floor do you go?", menuList, CHANNEL);
}
listen(integer channel, string name, key id, string message)
{
height = llList2Float(heightList, llListFindList(menuList, [message]));
llListenRemove(HANDLE); // Is this a manner?
FloorSelection = TRUE;
}
}
