Broadcasting script:
CODE
default
{
state_entry()
{
llSetTImerEvent(2);
}
timer()
{
llShout(-12335,(string)llGetPos());
}
}
Camera attachment script:
CODE
default
{
state_entry()
{
llRequestPermissions(llGetOwner,PERMISSION_CONTROL_CAMERA);
llListen(-12335,"",NULL_KEY,"");
}
listen(integer channel, string name, key id, string message )//When the coordinates are heard, set the camera
{
llSetCameraParams([CAMERA_ACTIVE, TRUE, CAMERA_FOCUS, (vector)message]);
}
}
It "Works" for about 3 broadcasts of the object's position (object is moving in a set path), and then the camera decides to focus off at some random point outside the sim which is nowhere near the object.
Also, I'm not sure how to release the camera control, as once this occurs the only way to get back to a normal camera view is to log-out and log back on. But this is only because I don't know how to return the camera to "normal"