wolfCouplerSetPoint
Wolf Territoriesinteger 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
| Type | Name | 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())); }Ours alone. Grid features you will not find on any other OpenSimulator grid.