Here is the relevant code:
changed(integer change)
{ // the avatar sitting on the teleprter triggers a CHANGED_LINK event
if (change & CHANGED_LINK)
{
key avkey = llAvatarOnSitTarget();
if (avkey != NULL_KEY)
{ // somebody is sitting on it
llRequestPermissions(avkey,PERMISSION_CONTROL_CAMERA);
llSleep(0.3);
llUnSit(avkey); // unsit him
}
}
}
run_time_permissions(integer perm)
{
if(PERMISSION_CONTROL_CAMERA & perm)
{
llSay(0,"Resetting camera"
;llClearCameraParams(); // reset camera to default
}
}
However I keep getting the following message:
Script trying to clear camera parameters but PERMISSION_CONTROL_CAMERA permission not set! Also the llSay command never seems to execute.
I thought the the permission was automatically granted when the AV is sitting on something. What am I doing wrong.
Despite the fact that this produces an error, it seems that the camera does get reset some of the time. Other times the camera seems to be lost in space necessitating a reset with ESC key. I was hoping the script would take care of this inconsistency.