Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Camera permissions

Dnali Anabuki
Still Crazy
Join date: 17 Oct 2006
Posts: 1,633
09-17-2008 22:42
Grateful for any help with this - I'm a franken scriptor.

The person wears this prim and walks by a location and the camera is changed.

The Sending prim works okay but the receiving prim gives an error message:

"Unable to find specified agent to request permissions."

Here is what I've got so far:

START SCRIPT

integer chan = -2300;

default
{
state_entry()
{
llListen(chan, "", NULL_KEY, "" );
llRequestPermissions(NULL_KEY,PERMISSION_TAKE_CONTROLS | PERMISSION_CONTROL_CAMERA);
}

listen( integer channel, string name, key id, string message )
{
if ( message == "100" )
{
llGetPermissions();
llSetCameraParams([
CAMERA_ACTIVE, 1, // 1 is active, 0 is inactive
CAMERA_BEHINDNESS_ANGLE, 180.0, // (0 to 180) degrees
CAMERA_BEHINDNESS_LAG, 0.5, // (0 to 3) seconds
CAMERA_DISTANCE, 10.0, // ( 0.5 to 10) meters
//CAMERA_FOCUS, <0,0,5>, // region relative position
CAMERA_FOCUS_LAG, 0.05 , // (0 to 3) seconds
CAMERA_FOCUS_LOCKED, FALSE, // (TRUE or FALSE)
CAMERA_FOCUS_THRESHOLD, 0.0, // (0 to 4) meters
CAMERA_PITCH, 80.0, // (-45 to 80) degrees
//CAMERA_POSITION, <0,0,0>, // region relative position
CAMERA_POSITION_LAG, 0.0, // (0 to 3) seconds
CAMERA_POSITION_LOCKED, FALSE, // (TRUE or FALSE)
CAMERA_POSITION_THRESHOLD, 0.0, // (0 to 4) meters
CAMERA_FOCUS_OFFSET, <0,0,0> // <-10,-10,-10> to <10,10,10> meters
]);

}
}
}

//////END SCRIPT
_____________________
The price of apathy is to be ruled by evil men--Plato
Escort DeFarge
Together
Join date: 18 Nov 2004
Posts: 681
09-17-2008 22:46
You need to request permissions from the owner. i.e.
llRequestPermissions(llGetOwner(),PERMISSION_TAKE_CONTROLS | PERMISSION_CONTROL_CAMERA);

You should alsoimplement a reset or re-request in a changed()/on_rez() event if you are intending to give this object to someone else.
_____________________
http://slurl.com/secondlife/Together
Dnali Anabuki
Still Crazy
Join date: 17 Oct 2006
Posts: 1,633
09-17-2008 22:52
Thanks Escort. I appreciate your help...I'll look into the reset.

Is their any way I can make it for anyone who wears it?
_____________________
The price of apathy is to be ruled by evil men--Plato
Dnali Anabuki
Still Crazy
Join date: 17 Oct 2006
Posts: 1,633
09-18-2008 17:11
Whimper...Dnali realizes the limitations of being a franken scriptor. Any kind soul want to IM me inworld so they can explain camera permissions to me?

I'll pay L$4K for an informative hour or so of tutoring that leads to me being able to finish my script.

The wiki entry makes my head hurt.
_____________________
The price of apathy is to be ruled by evil men--Plato