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.
The wolf* functions
Written for this grid and available nowhere else. A script may only do what the object’s owner could do by hand, so region weather needs the estate and parcel weather needs the parcel, and a trailer only couples to a truck with the same owner.
How players use the driving dashboard, Wolf Roleplay, Flight Mode and Sailing Mode, with full examples: Driving, Wolf Roleplay, Flight Mode and Sailing Mode.
Weather (3 functions)
Set this region's weather. The script's OWNER must hold the region. Key/value pairs: see Wolf_Api.WeatherRulesToJson. TRUE when the grid accepted it, FALSE otherwise.
This region's stored weather as key/value pairs, or an empty list.
Force the weather on the parcel this prim stands in, by writing the keyword form into THIS prim's description — the mechanism the viewers already read. The script's owner must own the parcel (or hold the region).
Errors (1 function)
The last error from a wolf* call on this script, or an empty string.
Vehicle couplings (6 functions)
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.
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.
Remove a named hitch point from this object.
Couple this object (the rear) to the object with coupler key frontKey, joining myPoint (root prim frame) to its hitch point pointName. Both must have the same owner and be physical. The joint is made as soon as the points are within reach, and is kept through restarts and region crossings until wolfDetach. Type is WOLF_JOINT_BALL, WOLF_JOINT_FIFTHWHEEL or WOLF_JOINT_COUPLER; options are "yaw", "pitch" (degrees), "reach" and "break" (metres).
Uncouple this object and forget its wolfAttach request.
This object's coupling: [status, front key, point name, front object key]. Status is WOLF_ATTACH_NONE, WOLF_ATTACH_WAITING, WOLF_ATTACH_COUPLED or WOLF_ATTACH_BROKEN.
Driving: wheel, pedals and dashboard (2 functions)
The exact wheel and pedals of a driver sitting on this object (the script needs PERMISSION_TAKE_CONTROLS from them, as control() does), from their Wolf viewer: [steer -1..1 (right +), throttle 0..1, brake 0..1, clutch 0..1, gear (WOLF_DRIVE_GEAR_P/R/N/D or 1..18), buttons (WOLF_DRIVE_BTN_* bits), age in seconds]. Sent on change and once a second, so an age over ~2 s means the viewer has gone. An empty list from any other viewer: keep a control() event for those.
Drive the Wolf dashboard of a driver sitting on this object: key/value pairs - type ("car", "truck", "bike", "speedboat", "spaceship", "submarine"), units ("kmh", "mph", "kn"), rpm, max_rpm, redline, max_speed, gear ("P", "R", "N", "D", "1".."18"), fuel, adblue (percent), temp (C), air1, air2 (bar), indicators (0 off, 1 left, 2 right, 3 hazard), lights (0, 1 dipped, 2 main), handbrake, retarder (0-5), cruise, drive_time (seconds), odo (km), warnings ("engine,oil,abs..."), clear; speedboat/spaceship/submarine: throttle (-100..100), trim (-5..5), anchor, engine, mode ("ship", "rocket"), stage, stages (0-9), boost, shield, hull, heat (percent), assist, landing_gear, ballast (0-100), max_depth (m), oxygen, battery (percent), planes (-100..100), periscope. The speed is measured by the viewer. At most 5 a second. TRUE when sent.
Effects: explosions, fire, smoke and camera shake (2 functions)
A script effect drawn by Wolf viewers, e.g. wolfEffect("explosion", llGetPos() + <0,0,1>, ["size", 6, "shake", 0.8]). Effects: explosion, fireball, smoke, sparks, fire, fireworks, dust, shockwave. Keys: size (metres), colour, colour2 (vectors 0..1), duration (seconds), intensity (0.1..2), shake (0..1), shake_radius (metres), sound (TRUE/FALSE), volume (0..1), direction (vector). In this region, within 96 m of the object; an object may start 5 at once then 2 a second. 1 when sent, 0 (wolfGetLastError says why) when refused.
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.
Roleplay: the game (11 functions)
Make a Wolf Roleplay game for this region, owned by the script's owner, who must hold the region. Rules: name (unique), kind (managed|external), theme (wolves|plain), description, website, rules, logo, currency, symbol, currencyicon (the currency's picture, a texture key), start, playerpay, death (spawn|home|stay), respawn (seconds), spawn (vector - defaults to this object), webhook, webhooksecret, starter (items a player's first join gives, e.g. "meat=3,water=2"). Register the game's own scripts with wolfGameTrustScript. TRUE when created.
Change this region's game (same rules as wolfGameCreate). Only the game's owner.
This region's game as key/value pairs, or an empty list. Includes "forced" (1 when the region forces Game Mode on).
Add or change a stat: label, min, max, start, rate (per minute, + regenerates, - decays), zero (none|die|slow|drain), target and amount (for drain), colour, icon (a texture key; or a short text glyph), visible, order, health (1 = tied to the avatar's health), keep (1 = kept through a respawn: xp, gold). At most 16 stats.
Remove a stat from this region's game.
The names of this region's game stats.
Run an existing game (one you own, or the Wolf Territories default game) on this region.
Stop running a game on this region.
This region's game key, or "" when it runs none.
Where this game's players respawn, on this region.
Receive game events on this channel as chat (from the game's name and key; check the av field - a game script hears every player): join|av, arrive|av (playing on this region now - set up their action bar), leave|av, death|av|killer|cause, respawn|av, zero|av|stat, pay|from|to|amount, item|av|item|+n, equip|av|slot|item, unequip|av|slot|item, target|av|key, buffend|av|id. 0 stops. The region's holder and the game's own scripts hear everyone; a WORN object hears only its own wearer's events.
Roleplay: players, stats and money (20 functions)
Join an avatar to this region's game. The region's holder, the avatar's own worn object, or a game-made item the avatar owns. On a forced region an avatar whose own switch is off is read in as on arrival (playing a moment later) - never re-joined to a game they left.
Take an avatar out of this region's game (their wallet stays).
TRUE when the avatar plays this region's game and is here.
The keys of everyone playing this region's game here.
Every stat back to its start value.
One stat's value. 0 and wolfGetLastError() set when it cannot be read.
Set a stat (held to its min and max). Reaching the minimum runs the stat's zero action.
Add to a stat (negative takes away) - eating, drinking, a stamina drink.
This player's own maximum for a stat - a skill that raises max stamina.
[name, value, max, ...] for every stat.
Take health away. At 0 the player dies and the game respawns them.
Give health back (not to the dead - wolfGameRespawn does that).
Kill the player now.
Bring a dead player back now instead of after the game's respawn time.
The avatar's balance of this game's currency.
Give game currency to a player.
Take game currency from a player; refused when they have too little.
Move game currency from one player to another. The payer's own object, when the game allows players to pay; or the region's holder.
Store a value for this player in this game (class, race, quest step...). "" removes it.
A value stored with wolfGameSetData, or "".
Roleplay: the player's screen (17 functions)
Show a bar on the player's Wolf viewer: name, value, max, colour (#rrggbb), icon (a texture key; or a short text glyph). For games that keep their own stats.
Remove a bar shown with wolfGameShowStat.
Show a balance from your own system on the player's screen ("KR$", 1500). "" hides it.
Show a level and XP bar on the player's screen.
A notice on the player's screen. Type: info, success, warning or danger.
A dialog on the player's Wolf viewer. The button pressed comes back on the channel as chat from the avatar, like llDialog.
Buttons in the player's Roleplay panel: [id, label, id, label...]. A press comes back on the channel as chat from the avatar: the id.
A screen effect: flash, pulse, blur, blackout, desaturate, shake or clear. Strength 0-100, seconds 0-600.
Down (TRUE) or up (FALSE): an overlay on the player's screen, and the region holds them still.
Walking/running speed, 0.1 to 2.0 (1.0 is normal). The region enforces it.
Your own https:// page in the player's viewer: mode panel, overlay or window; width and height 0 for automatic.
Close the page opened by wolfGameShowWeb.
Play a sound that only this player hears (name in this object, or a sound key). Volume 0.0-1.0.
A marker on the player's screen, minimap and world map: id, region ("" = this one), position, label, colour, seconds (0 = until cleared).
Remove a marker ("" removes them all).
A line under the avatar's name tag, seen by everyone using a Wolf viewer. "" removes it.
An information panel in the player's Roleplay floater: title, [label, value, ...].
Roleplay: items and pets (21 functions)
Define a game item (seeds, wheat, bread, lockpicks, a sword): label, icon (a texture key; or a short text glyph), max (per player, 0 = no limit), order; kind ("" | weapon | armour | spell | consumable | material); for weapons and armour a slot (weapons: main, off, ranged; armour: off, head, body, hands, legs, feet, neck, ring) and display stats - damage, range, firemode, magazine, ammo (its ammunition item), twohand (main only), defence. Only the game's owner.
Remove an item's definition (players keep what they hold).
Give a player some of an item. The game's owner or the game's own no-modify items only.
Take some of an item from a player; refused when they have too few.
How many of an item the player holds.
[item, quantity, ...] for everything the player holds.
One atomic swap: take [name, qty, ...] and give [name, qty, ...] - "$" is the game's money. Selling 10 wheat for 50 coins, planting a seed. All or nothing.
Define a pet type (wolf_pup, pony): label, icon (a texture key; or a short text glyph), max (per player, 0 = no limit), order. Only the game's owner.
Remove a pet type no pet still has.
A pet type's stat: label, min, max, start, rate (per minute, keeps running while the pet is in inventory), zero (none|die), colour, icon (a texture key; or a short text glyph), order.
Remove a stat from a pet type.
A new pet for a player (a pet shop, a hatchery, breeding): owner, type, name, [data key, value, ...]. Returns the pet's key - keep it in the pet object (linkset data). "" when refused.
[type, name, owner, alive, age seconds, stat, value, max, ...] - stats as they are NOW, aged by real time.
A value stored with the pet (genes, colour, tricks), or "".
Set a pet stat. The pet owner's own game items, or the game's own items on the game's land.
Add to a pet stat - feeding, playing, grooming.
Store a value with the pet. "" removes it.
Rename a pet.
Give or sell the pet to another player of the game.
Let the pet go: its record is deleted.
[pet key, type, name, alive, ...] for an avatar's pets in this game.
Roleplay: trusted scripts and forced Game Mode (3 functions)
Register a script in this object as one of the game's OWN scripts (by its asset - an edited copy is not). Only the game's owner. The game's own scripts are the only ones that may change players, money, items and pets.
Take a script in this object off the game's own list.
TRUE keeps Game Mode ON for everyone on this region (they cannot switch it off or leave the game here - "so people dont turn it off to avoid getting killed"); FALSE gives them their own choice back. Never changes anyone's own saved switch. The region's holder or a grid god.
Roleplay: combat (17 functions)
Put an item the player holds into its slot (a weapon or armour item - see wolfGameDefineItem). Kept per player per game. The game's own scripts; players equip from their viewer.
Empty an equipment slot: main, off, ranged, head, body, hands, legs, feet, neck or ring.
[slot, item, ...] - what the player has equipped.
Add or change a button on the player's action bar: label, icon, cooldown (s), cast (s), cost (a stat) and amount, key (hint), enabled, group (shared cooldown), weapon (a slot whose ammo it uses), ammo (rounds per use), target (1 = refused with "No target" when the player has none), order, channel. A press is checked by the region (cooldown, cast, ammo; the cost is TAKEN when the game's own script set it and it is a stat of the game - never down to the minimum of a stat whose emptiness does something, such as health) and comes back on the channel from the avatar's key under the name "#wolfgame" (listen with llListen(channel, "#wolfgame", avatar, "") - no viewer can chat under that name): cast|id|target, use|id|target, interrupted|id. At most 12.
Remove an action-bar button ("" removes them all).
Start an ability's cooldown for this many seconds (0 ends it).
Stop the player's cast in progress (a stun, a hit). Its script hears interrupted|id.
What an equipment slot shows on the player's weapons panel (for games that keep their own weapons): label, icon, damage, range, firemode, defence, ammoname, magazine, ammo, reserve, channel (reload requests come back as reload|slot, from the avatar under the name "#wolfgame"). [] clears it.
A slot's ammo: rounds in the magazine and in reserve (-1 = not shown). Ends a reload. The region takes the rounds an ability uses by itself.
Show a reload on a weapon slot for this many seconds (0 stops it); its abilities cannot fire meanwhile. Call wolfGameSetAmmo when it is done.
[ammo, magazine, reserve, reloading] for a slot.
The player's target frame: target key ("" clears), then name, health, max, level, hostility (hostile|neutral|friendly), icon, text (subtitle), dead. With no health, a player of this game shows their live health.
The player's current target, or NULL_KEY. Players pick targets in their viewer; you hear target|av|key.
Update the health bar on the target frame of everyone targeting this key (a monster taking hits).
A buff or debuff on the player's screen: label, icon, seconds (0 = until removed; given again it restarts), stacks, type (buff|debuff), text. At most 20. You hear buffend|av|id when it runs out.
Remove a buff or debuff ("" removes them all).
A floating combat number: over the target `at` (damage dealt, with a hit marker) or over the player (at = the player or "": damage taken). Kind: hit, crit, heal, miss, dodge, block, immune, absorb. Colour #rrggbb or "".
The rules list, shared by both setters
Key/value pairs in any order; kind is required. Every value is an integer percent except move, which is hundredths of a metre per second. An unknown key or an out-of-range value is refused rather than ignored, and wolfGetLastError says which.
| Key | Type | Values | Meaning |
|---|---|---|---|
| kind | string | clear, rain or snow | What falls. Required by both setters. "clear" on a parcel means no weather THERE even when the region is raining — a cave, a covered market. |
| level | integer | 1 – 4 | How heavy: 1 light, 2 moderate, 3 heavy, 4 torrential rain / blizzard. The level sets the base particle count and fall speed the other percentages scale. |
| bright | integer | 0 – 200 (%) | Brightness of the precipitation's lit colour. 100 is neutral. |
| colour | string | #rrggbb | The tint colour ("color" is accepted too). Rain's neutral is #aaccff, snow's is #ffffff. |
| tint | integer | 0 – 100 (%) | How far from the kind's neutral colour towards the tint colour. |
| move | integer | 0 – 1000 (hundredths m/s) | Sideways drift the weather leans on. 60 = 0.60 m/s. The direction turns slowly on its own. |
| density | integer | 10 – 4000 (%) | Particle count as a percentage of the level's own figure. Source: Wolf_Api.cs WEATHER_RANGES, the Weather tab's own range since 2026-09-18. |
| velocity | integer | 10 – 300 (%) | Fall speed as a percentage of the level's own figure. |
| size | integer | 10 – 400 (%) | Particle size as a percentage of the kind's own width. |
| sound | integer | 0 or 1 | Whether the weather makes any sound at all. |
| vol | integer | 0 – 100 (%) | Weather sound volume. |
| amb | string | none, thunder, steady, wind, distant | The ambience bed. "thunder" and "distant" are storms: they fork lightning and roll thunder in both viewers. |
| near | string | none, soft, heavy, leaves, water | The near layer — the sound of rain on what is around you. |
| fog | integer | 0 – 100 (%) | Thick air, 0 = none. Independent of the kind: fog with rain, with snow, or on its own under "clear". The number is a visibility: 2000 m × 0.02^(fog/100), so 50 is about 280 m and 100 is 40 m. |
| aurora | integer | 0 – 100 (%) | The northern lights, 0 = none. Night only: the viewers fade it in after dusk and out at dawn, so a script may leave it set all winter. 35 is a faint arc, 70 bright curtains, 100 a storm overhead. |
| acol | string | green, red, purple, blue, pink, multi | The aurora's colour. "multi" cycles through them. |
| on | integer | 0 or 1 | Region only. Whether the region weather is switched on. A script that sets a kind turns it on unless it says otherwise. |
wolfSetRegionWeather
Sets the weather for the whole region: what falls, how heavily, its colour, movement, density, size and sound, plus fog and the northern lights. Returns 1 when the grid accepted it and 0 when it refused; wolfGetLastError says why. The script's owner must hold the region (estate owner or manager), exactly as the About Land > Weather tab requires, because a script may only do what its owner could do by hand.
Example
default
{
touch_start(integer n)
{
// A heavy thunderstorm: dense rain, leaning on a 1.8 m/s wind, loud.
if (!wolfSetRegionWeather([ "kind", "rain", "level", 3,
"density", 140, "move", 180,
"amb", "thunder", "near", "heavy", "vol", 85 ]))
{
llOwnerSay("Weather refused: " + wolfGetLastError());
}
}
}A snowy night, quiet
wolfSetRegionWeather([ "kind", "snow", "level", 2, "colour", "#e6f0ff",
"tint", 60, "velocity", 80, "amb", "wind", "vol", 40 ]);Clear skies again
wolfSetRegionWeather([ "kind", "clear" ]);
A clear winter night under the northern lights (they only show after dark)
wolfSetRegionWeather([ "kind", "clear", "aurora", 60, "acol", "green" ]);
Fog on its own, about 280 m of visibility
wolfSetRegionWeather([ "kind", "clear", "fog", 50 ]);
Switch the region weather off without forgetting the settings
wolfSetRegionWeather([ "kind", "rain", "on", FALSE ]);
wolfGetRegionWeather
Reads the region's weather as the same key/value list the setter takes, so a script can read it, change one value and hand the whole list straight back. Returns an empty list when the region has no weather record. The list always starts with "kind" and "on"; the integer keys follow (including "fog" and "aurora"), then "colour", "sound", "amb", "near" and "acol" when they are stored.
Example
default
{
touch_start(integer n)
{
list w = wolfGetRegionWeather();
llOwnerSay("Weather now: " + llDumpList2String(w, " "));
// Make it one level heavier, keeping everything else as it is.
integer i = llListFindList(w, ["level"]);
if (i != -1)
{
integer level = llList2Integer(w, i + 1);
if (level < 4) w = llListReplaceList(w, [level + 1], i + 1, i + 1);
wolfSetRegionWeather(w);
}
}
}wolfSetParcelWeather
Weather for ONE parcel, carried by the prim the script is in: the function writes the weather keyword into the prim's description (the same "wolfrain3 dens=170 amb=thunder" form a builder can type by hand) and the viewers read it from there. The prim must stand on a parcel the script's owner owns (or the owner must hold the region). Parcel weather beats region weather; "clear" on a parcel keeps a region storm out of a cave or a covered market. Returns 1 or 0, and refuses rather than truncates when the options would not fit a 127-character description.
Example
// Put this in a prim on your parcel. The prim can be anything — a rock, a sign,
// an invisible cube — it only needs to sit on the parcel.
default
{
state_entry()
{
// Light rain with leaves rustling nearby, only on this parcel.
if (!wolfSetParcelWeather([ "kind", "rain", "level", 1,
"near", "leaves", "vol", 50 ]))
{
llOwnerSay("Parcel weather refused: " + wolfGetLastError());
}
}
touch_start(integer n)
{
// Touch to make this parcel a dry spot even when the region is raining.
wolfSetParcelWeather([ "kind", "clear" ]);
}
}Turn it off again
llSetObjectDesc(""); // no keyword, no parcel weather — the region's weather returnswolfGetLastError
Why the last wolf* call returned 0: the region refused it (the owner does not hold the region or the parcel, a bad key or value, the weather service could not be reached, or the functions are not enabled on this region). Empty after a call that succeeded.
Example
default
{
touch_start(integer n)
{
// A deliberate mistake: 5 is out of range (1 - 4), so this is refused.
if (!wolfSetRegionWeather([ "kind", "rain", "level", 5 ]))
{
llSay(0, "Refused: " + wolfGetLastError()); // "level must be 1..4"
}
}
}Vehicle couplings
A truck and its trailer, a car and its caravan, a locomotive and its carriages, joined by a real joint in the region’s physics rather than a script chasing the vehicle in front. The front gives itself a key and names its hitch points; the rear asks for “the front with this key, at that point”. Both must belong to the same owner and be physical. The coupling is kept through region restarts, editing and region crossings until the rear calls wolfDetach.
wolfAttach joint types
| Type | Value | What it is |
|---|---|---|
| WOLF_JOINT_BALL | 1 | A tow ball. Every rotation is free. Car and caravan, a boat trailer. |
| WOLF_JOINT_FIFTHWHEEL | 2 | A semi-trailer fifth wheel. Turns and nods within limits, cannot roll against the tractor unit. |
| WOLF_JOINT_COUPLER | 3 | A railway coupler. Like a fifth wheel with tighter limits. Locomotive and carriages. |
The options list
Key/value pairs in any order, or an empty list for the defaults. An unknown key or an out-of-range value is refused rather than ignored, and wolfGetLastError says which.
| Key | Type | Values | Meaning |
|---|---|---|---|
| yaw | float or integer | 0 – 170 (degrees) | How far the rear may turn either side of straight. Fifth wheel 90, coupler 35 by default. Not taken by WOLF_JOINT_BALL, which turns freely. |
| pitch | float or integer | 0 – 80 (degrees) | How far the rear may nod up or down either side of level. Fifth wheel 20, coupler 15 by default. Not taken by WOLF_JOINT_BALL. |
| reach | float or integer | 0.1 – 10 (metres) | The two hitch points join once they are this close, 3 m by default; the rear is then moved the rest of the way. Back the truck up to the trailer and it couples. |
| break | float or integer | 0.1 – 10 (metres) | If a coupled pair is pulled more than this far apart at the hitch, 2 m by default, the coupling breaks and wolfAttachInfo reports WOLF_ATTACH_BROKEN. |
wolfCouplerSetKey
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.
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("");wolfCouplerSetPoint
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.
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())); }wolfAttach
Couples this object — the REAR: a trailer, a caravan, a carriage — to the front with coupler key frontKey, joining myPoint on this object to the front's hitch point pointName. This is a real joint in the region's physics (ubODE and BulletSim both), not a script chasing the truck: the trailer swings, tracks and is pulled. Both objects must have the same owner and be physical. The request is stored in the object: the joint is made as soon as the two points are within reach (3 m unless you say otherwise), and it is made again after the region restarts, after either object has been edited, and in the next region after a crossing, until wolfDetach. Returns 1 when the request is accepted — check wolfAttachInfo to see it couple.
Example
// In the semi-trailer's root prim. The trailer should NOT have a vehicle motor of its
// own: VEHICLE_TYPE_NONE, or a car type with its motors at zero, whose sideways friction
// is what makes a trailer follow the tractor unit round a corner.
default
{
state_entry()
{
llSetStatus(STATUS_PHYSICS, TRUE);
// The kingpin: 5.5 m ahead of this trailer's centre, 1.1 m up.
if (!wolfAttach("wolfhaul", "fifthwheel", <5.5, 0.0, 1.1>,
WOLF_JOINT_FIFTHWHEEL, [ "yaw", 80 ]))
llOwnerSay("Couple refused: " + wolfGetLastError());
llSetTimerEvent(1.0);
}
timer()
{
integer st = llList2Integer(wolfAttachInfo(), 0);
if (st == WOLF_ATTACH_COUPLED) llSetText("", ZERO_VECTOR, 0.0);
else if (st == WOLF_ATTACH_WAITING) llSetText("Back the truck under me", <1, 1, 0>, 1.0);
else if (st == WOLF_ATTACH_BROKEN) llSetText("Broke away!", <1, 0, 0>, 1.0);
}
}A caravan on a tow ball
wolfAttach("wolfcar", "towball", <3.1, 0.0, 0.45>, WOLF_JOINT_BALL, []);A railway carriage: the same script in every carriage makes a train of any length — each couples its front to the "rear" of whatever is in front of it
wolfCouplerSetKey("wolfrail");
wolfCouplerSetPoint("rear", <-7.0, 0.0, 0.6>);
wolfAttach("wolfrail", "rear", <7.0, 0.0, 0.6>, WOLF_JOINT_COUPLER, []);Re-hitch after it broke away
wolfAttach("wolfhaul", "fifthwheel", <5.5, 0.0, 1.1>, WOLF_JOINT_FIFTHWHEEL, []);wolfAttachInfo
This object's coupling, as [status, front key, point name, front object key]. The status is WOLF_ATTACH_NONE (it asked for none), WOLF_ATTACH_WAITING (asked for, not joined: no front within reach, or one of the two is not physical, is being edited or is crossing a region border), WOLF_ATTACH_COUPLED, or WOLF_ATTACH_BROKEN (pulled apart — it stays broken until wolfAttach or wolfDetach). The front object key is NULL_KEY until a front has been found.
Example
default
{
touch_start(integer n)
{
list info = wolfAttachInfo();
list names = [ "none", "waiting", "coupled", "broken" ];
llOwnerSay("Coupling: " + llList2String(names, llList2Integer(info, 0))
+ " to \"" + llList2String(info, 1) + "\" at \"" + llList2String(info, 2)
+ "\", object " + llList2String(info, 3));
}
}wolfDetach
Uncouples this object and forgets its wolfAttach request, so it will not couple again after a restart or a crossing. Returns 1.
Example
default
{
touch_start(integer n)
{
if (llDetectedKey(0) == llGetOwner())
{
wolfDetach();
llOwnerSay("Uncoupled.");
}
}
}wolfCouplerRemovePoint
Removes a named hitch point. A rear coupled to it is released. Returns 1, or 0 when there is no point by that name.
Example
default
{
touch_start(integer n)
{
if (llDetectedKey(0) == llGetOwner())
wolfCouplerRemovePoint("towball"); // unhitch the caravan for good
}
}Effects: explosions, fire and camera shake
Explosions, fireballs, fire, smoke, sparks, fireworks, dust and shockwaves, drawn as layered particles by WolfViewer and WolfStorm, and a camera shake that fades with distance. The region checks every call: effects only over your own land, shakes only for people your object has a reason to shake, and a limit on how many a second.
wolfEffect effects
| Effect | Size | Lasts | What it is |
|---|---|---|---|
| explosion | 4 m | 1 s | A white flash, a fireball cooling from white-hot to dark red, a shock ring along the ground, sparks and dark debris that bounce, and a smoke column. Shakes the view (0.6) and booms by default. |
| fireball | 3 m | 1 s | A flash and a fireball with a little smoke: no shock ring, sparks or debris, and no shake unless you ask. Booms by default. |
| smoke | 3 m | 6 s | A column that keeps rising and spreading for the duration, grey by default. |
| sparks | 1.5 m | 0.5 s | Hot sparks streaking out along "direction" and falling, bouncing where they land, for the duration. |
| fire | 1.5 m | 10 s | Flames with embers and smoke above them, burning for the duration and leaning along "direction". |
| fireworks | 12 m | 1 s | A sphere of streaking stars: two in three are "colour", one in three "colour2". Plays the firework sound by default. |
| dust | 3 m | 1 s | A cloud of dust rolling out along the ground. |
| shockwave | 6 m | 1 s | A faint flash and a white ring racing out along the ground. |
The rules list
Key/value pairs in any order, or an empty list for the defaults. A number outside a key's range is held to it; an unknown key, a key given twice or a value of the wrong type is refused, and wolfGetLastError says which.
| Key | Type | Values | Meaning |
|---|---|---|---|
| size | float | 0.2 – 30 (metres) | The radius. The default depends on the effect (table above). |
| duration | float | 0.1 – 30 (seconds) | How long it lasts. Matters most for fire, smoke and sparks. |
| intensity | float | 0.1 – 2 | How many particles, 1 = normal. |
| colour | vector | <r, g, b>, each 0 – 1 | The main colour: the fireball, flames, smoke, dust or firework stars. Each effect has its own default (fire orange, smoke grey, dust brown, fireworks red). Sparks are always white-hot to orange and ignore it. |
| colour2 | vector | <r, g, b>, each 0 – 1 | The second colour: an explosion's debris and smoke, a fireball's smoke, one firework star in three (yellow by default). |
| direction | vector | any vector but ZERO_VECTOR | Which way sparks fly and flames lean. Straight up, <0, 0, 1>, by default. |
| shake | float | 0 – 1 | How hard the view shakes at the centre, fading to nothing at shake_radius. 0.6 for an explosion, 0 for the rest. |
| shake_radius | float | 0 – 150 (metres) | How far the shake reaches. By default 8 × size, at most 150 m. |
| sound | integer | TRUE or FALSE | Whether it makes a sound. On by default for explosion, fireball and fireworks. |
| volume | float | 0 – 1 | Sound volume, 1 by default. |
wolfEffect
Sets off an explosion, fireball, smoke, sparks, fire, fireworks, dust or a shockwave at a point, drawn by WolfViewer and WolfStorm (other viewers hear the sound but see nothing). The point must be in this region, within 96 m of the object, and over the object's own parcel or land its owner controls: no explosions on the neighbours. Numbers outside a key's range are held to it; an unknown effect or key, a key given twice or a value of the wrong type refuses the call. An object may set off 5 effects at once and then 2 a second, all of one owner's objects together 10 and then 3 a second, the region 30 and then 10 a second. Returns 1 when sent, or 0 with wolfGetLastError saying why.
Example
default
{
touch_start(integer n)
{
// A big bang a metre above this object: 6 m across, a strong shake nearby.
if (!wolfEffect("explosion", llGetPos() + <0, 0, 1>, [ "size", 6, "shake", 0.8 ]))
{
llOwnerSay("Effect refused: " + wolfGetLastError());
}
}
}A campfire that burns for half a minute
wolfEffect("fire", llGetPos(), [ "size", 0.8, "duration", 30 ]);Green and white fireworks 40 m up
wolfEffect("fireworks", llGetPos() + <0, 0, 40>,
[ "colour", <0.2, 1, 0.3>, "colour2", <1, 1, 1>, "size", 15 ]);Sparks from a grinder, flying out sideways for 3 seconds
wolfEffect("sparks", llGetPos(), [ "direction", <1, 0, 0.3>, "duration", 3 ]);Black smoke from a wreck
wolfEffect("smoke", llGetPos(), [ "colour", <0.1, 0.1, 0.1>, "duration", 20, "size", 4 ]);A quiet explosion that shakes nobody
wolfEffect("explosion", llGetPos(), [ "shake", 0, "sound", FALSE ]);wolfShakeCamera
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.
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);
Browse by family
Ours alone. Grid features you will not find on any other OpenSimulator grid.
103 functions
The Linden Scripting Library — what every SL-compatible grid provides.
482 functions
OpenSimulator extensions. Some are gated by threat level and a region may refuse them.
261 functions
Talking to server-side script modules.
9 functions
LightShare windlight control.
4 functions
A – Z
By the first letter after the prefix.
This reference is generated from the region software Wolf Territories runs, so it lists what the grid actually implements rather than what a wiki says it should. 181 of them have no written description yet; those say so rather than guessing.