Forgot? Join

Scripting

LSL Guide

Every script function this grid actually runs, read straight from the region software rather than copied from a wiki — including the wolf* functions that exist only here.

Functions · Constants

wolfRollCamera

Wolf Territories
integer wolfRollCamera(string avatar, float degrees, float seconds)

Roll a Wolf viewer's camera about its line of sight: degrees -180..180 (+ right, - left), seconds 0..30 to get there; it stays rolled until the next call, 0 levels it. NULL_KEY: everyone within 96 m on land the object's owner controls. Same avatars and limits as wolfShakeCamera. 1 when sent (or nobody to roll), 0 when refused.

Rolls an avatar's view about its own line of sight, as a plane banks or a ship lists: positive degrees roll to the right, negative to the left. The camera eases to the angle over the seconds you give and stays there until the next wolfRollCamera; 0 degrees levels it again. Only the up direction turns, so llSetCameraParams, the follow camera and mouselook keep working. The view levels itself when the avatar leaves the region, and never rolls for someone who has switched camera shake off. The same people may be rolled as shaken: the object's owner, someone sitting on it or wearing it, or someone on land the object's owner controls. NULL_KEY rolls everyone within 96 m of the object who qualifies. Only WolfViewer and WolfStorm users see it. It counts towards the same limits as wolfEffect. Returns 1 when sent, also when there was nobody to roll, or 0 with wolfGetLastError saying why.

Parameters

TypeName What it does
string avatar Who: an avatar's key, or NULL_KEY for everyone within 96 m who may be rolled.
float degrees -180 – 180. Positive rolls right, negative left, 0 levels the view. Held to that range.
float seconds How long to get there, 0 – 30 (0 = at once). Held to that range.

Example

// A boat that lists as it turns: the rider's view leans with it, then levels.
default
{
    state_entry()
    {
        llSitTarget(<0, 0, 0.5>, ZERO_ROTATION);
    }

    touch_start(integer n)
    {
        key rider = llAvatarOnSitTarget();
        if (rider == NULL_KEY) return;
        if (!wolfRollCamera(rider, 15.0, 1.5))      // lean 15 degrees right over 1.5 s
            llOwnerSay("Roll refused: " + wolfGetLastError());
        llSleep(4.0);
        wolfRollCamera(rider, 0.0, 2.0);             // and back level over 2 s
    }
}

Turn the world upside down for everyone nearby, slowly

wolfRollCamera(NULL_KEY, 180.0, 6.0);

A quick tilt to the left, held

wolfRollCamera(llGetOwner(), -30.0, 0.3);
Energy 10

Ours alone. Grid features you will not find on any other OpenSimulator grid.

More in Wolf Territories