wolfCouplerSetKey
Wolf Territoriesinteger wolfCouplerSetKey(string key)
Give this object a coupler key, the name a rear object uses to find it with wolfAttach. Not a UUID, so it survives rezzing, restarts and region crossings. "" removes the key.
Gives this object — the FRONT of a rig: a tractor unit, a car, a locomotive, a carriage with another behind it — a coupler key. A rear object finds its front by this key with wolfAttach. It is your own name for the vehicle, not a UUID, because a UUID changes every time an object is rezzed; the key is stored in the object and survives taking and rezzing, region restarts and region crossings. Only objects with the same owner couple, so your key never clashes with anyone else's. Several identical trucks can share one key: a trailer couples to whichever of them is backed up to its hitch. "" removes the key. Returns 1, or 0 with wolfGetLastError saying why.
Parameters
| Type | Name | What it does |
|---|---|---|
| string | key | Up to 64 characters. "" removes the key. |
Example
// In the tractor unit's root prim, next to its driving script.
default
{
state_entry()
{
wolfCouplerSetKey("wolfhaul");
// The fifth wheel: 2.8 m behind the root prim's centre, 1.1 m up.
wolfCouplerSetPoint("fifthwheel", <-2.8, 0.0, 1.1>);
}
}Stop anything coupling to this object
wolfCouplerSetKey("");Ours alone. Grid features you will not find on any other OpenSimulator grid.