I am trying to create a script which will override the "sit" animation used when an avatar sits on an object.
Basically I actually wnat the avatar to stand (but I need them to "sit" on the object in question to allow camera controls to work). I can get the avatar to sit in front of and looking at the object, but cannot seem to have them stand (as opposed to sit). The first cut script is here...
string ANIMATION = "standing";//anim pose
key avie;
default
{
state_entry()
{
rotation myRot = llEuler2Rot(< 0, 0, 90 * DEG_TO_RAD>
;llSetCameraEyeOffset(<0,1,0.5>
; // camera positionllSetCameraAtOffset(<0,-10,1>
; // Camera point of focus (where it is looking)llSitTarget(<0,-1,0>, myRot);
avie = NULL_KEY;
}
changed(integer change)
{
key sitting = llAvatarOnSitTarget();
if (change == CHANGED_LINK)
{
if(sitting != NULL_KEY)
{
avie = sitting;
llRequestPermissions(avie, PERMISSION_TRIGGER_ANIMATION);
}
else
{
llStopAnimation(ANIMATION);
avie = NULL_KEY;
}
}
}
run_time_permissions(integer perms)
{
if ((perms & PERMISSION_TRIGGER_ANIMATION) == PERMISSION_TRIGGER_ANIMATION)
{
llStopAnimation("sit"
;llStartAnimation(ANIMATION);
}
}
}
If any one could point me in the right direction I would appreciate it
Thanks in advance!
Didn't help that in order for the camera to work correctly I had to press Esc ...