wolfShakeCamera
Wolf Territoriesinteger wolfShakeCamera(string avatar, float strength, float seconds)
Shake a Wolf viewer's camera: strength 0..1, seconds 0.05..10. NULL_KEY: everyone within 96 m on land the object's owner controls. Only the object's owner, someone sitting on or wearing it, or someone on land the owner controls. 1 when sent (or nobody to shake), 0 when refused.
Shakes an avatar's view: a rough ride, an earthquake, a hard landing. Only someone the object has a reason to shake: its owner, someone sitting on it or wearing it, or someone standing on land the object's owner controls (owns the parcel, it is deeded to the object's group, or the owner is the estate owner or a manager). NULL_KEY shakes everyone within 96 m of the object who qualifies. Only WolfViewer and WolfStorm users feel it. It counts towards the same limits as wolfEffect. Returns 1 when sent, also when there was nobody to shake or the strength is 0, or 0 with wolfGetLastError saying why.
Parameters
| Type | Name | What it does |
|---|---|---|
| string | avatar | Who: an avatar's key, or NULL_KEY for everyone within 96 m who may be shaken. |
| float | strength | 0 – 1. Held to that range; 0 does nothing. |
| float | seconds | How long, 0.05 – 10. Held to that range. |
Example
// In a ride: give whoever sits down a jolt as it sets off.
default
{
state_entry()
{
llSitTarget(<0, 0, 0.5>, ZERO_ROTATION); // llAvatarOnSitTarget needs a sit target
}
changed(integer change)
{
if (change & CHANGED_LINK)
{
key rider = llAvatarOnSitTarget();
if (rider != NULL_KEY)
{
if (!wolfShakeCamera(rider, 0.7, 1.5))
llOwnerSay("Shake refused: " + wolfGetLastError());
}
}
}
}An earthquake on your own land: everyone within 96 m, gently, for 8 seconds
wolfShakeCamera(NULL_KEY, 0.3, 8.0);
Ours alone. Grid features you will not find on any other OpenSimulator grid.