What do I have to modify, in order for the script to work where I can just click on it to send it down or up and have more than just one person going up and down? Here's the script:
// lift script, v 1.0 by timeless montreal
//
// This script will allow you to make any prim a lift or an elevator.
// You should only have to change the liftAmount to the distance
// you want the lift to move. Of course, if you rather it move
// side to side, it shouldn't be too hard to tweak.
//
// enjoy!
integer liftAmount = 100; // change this to the amount you
// want to go up/down
integer isUp = FALSE; // Stores whether the object is up
movePlatform(){
llStartAnimation("stand"
; if(isUp == FALSE){
llSetPos(llGetPos() + <0, 0, liftAmount>
; isUp = TRUE;
} else {
llSetPos(llGetPos() + <0, 0, -1*(liftAmount)>
; isUp = FALSE;
}
}
default
{
state_entry()
{
llSitTarget(<0,0,1>,<0,0,0,1>
; llSetSitText("Lift"
; }
changed(integer change)
{
if(change & CHANGED_LINK)
{
key avataronsittarget = llAvatarOnSitTarget();
if( avataronsittarget != NULL_KEY )
{
if ((llGetPermissions() & PERMISSION_TRIGGER_ANIMATION) && llGetPermissionsKey() == avataronsittarget) {
llStopAnimation("sit"
; movePlatform();
} else {
llRequestPermissions(avataronsittarget, PERMISSION_TRIGGER_ANIMATION);
}
}
}
}
run_time_permissions(integer perm)
{
if(perm)
{
// Place the code here!
llStopAnimation("sit"
; movePlatform();
}
}
}
So simple