Sit Ball

 

 

Scripts name Open Pose Ball  
Purpose makes avatar sit/pose in defined postion (workarround for malplaced sit postion on prims)  
script lanugages used lsl  
important settings for region ./.  
test on osgrid - trunk  6.3 SVN8579, XEngine  
source Gerd aka Snake Ewing  @ osgrid  

 

// Open Pose Ball

string sitAnimation = "hug-masculine";

default{ on_rez(integer start_param){llResetScript();}
state_entry(){llSetText(" ",<0.6,0.7,1.0>,1); llSitTarget(<-1.3,0,-0.9>,llEuler2Rot(<0,-90,180>*DEG_TO_RAD));
}

changed(integer change){
if(change & CHANGED_LINK){
key avatar = llAvatarOnSitTarget();
if(avatar != NULL_KEY) {
llRequestPermissions(avatar,PERMISSION_TRIGGER_ANIMATION);
}
}
}

run_time_permissions(integer parm){
if(parm == PERMISSION_TRIGGER_ANIMATION){
llStopAnimation("sit");
llStartAnimation(sitAnimation);
state sitting;
}
}
}

state sitting {state_entry(){}
touch_start(integer total_number){} //NEEDED do not remove
changed(integer change){
if(change & CHANGED_LINK){
llStopAnimation(sitAnimation);
llResetScript();
}
}
}