wolfSetParcelWeather
Wolf Territoriesinteger wolfSetParcelWeather(list rules)
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).
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.
Parameters
| Type | Name | What it does |
|---|---|---|
| list | rules | The same key/value pairs as wolfSetRegionWeather, "kind" required. "on" is not used here — a parcel prim is on while it carries the keyword and off when the description is cleared. |
The rules list
Key/value pairs in any order. 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, 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 – 300 (hundredths m/s) | Sideways drift the weather leans on. 60 = 0.60 m/s. The direction turns slowly on its own. |
| density | integer | 10 – 300 (%) | Particle count as a percentage of the level's own figure. |
| 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. |
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 returnsOurs alone. Grid features you will not find on any other OpenSimulator grid.