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

wolfCouplerSetPoint

Wolf Territories
integer wolfCouplerSetPoint(string name, vector localPos)

Name a hitch point on this object, in its root prim's frame (+X forward, +Y left, +Z up), for a rear object to couple to. Up to 8 points; setting a name again moves it.

Names a hitch point on this object for a rear object to couple to: a fifth wheel, a tow ball, a coupler hook. The position is in the ROOT prim's frame (+X forward, +Y left, +Z up — the vehicle frame), wherever in the linkset the script is. An object can have up to 8 points; setting a name again moves that point. Each point takes one rear. Returns 1, or 0 with wolfGetLastError saying why.

Parameters

TypeName What it does
string name 1 – 32 characters. The rear names it in wolfAttach.
vector localPos Metres, in the root prim's frame.

Example

// A locomotive with couplers at both ends.
default
{
    state_entry()
    {
        wolfCouplerSetKey("wolfrail");
        wolfCouplerSetPoint("rear",  <-7.2, 0.0, 0.6>);
        wolfCouplerSetPoint("front", < 7.2, 0.0, 0.6>);
    }
}

Find a point by touch: say where you touched, in root frame

touch_start(integer n) { llOwnerSay((string)((llDetectedTouchPos(0) - llGetRootPosition()) / llGetRootRotation())); }
Energy 10

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

More in Wolf Territories