wolfBreath
Wolf Territoriesinteger wolfBreath(integer kind, float seconds, list options)
From a worn script (a HUD or an attachment): its wearer breathes WOLF_BREATH_FIRE or WOLF_BREATH_ICE for `seconds` (0.5 to 20; 0 = 3), or WOLF_BREATH_STOP stops a breath. The stream comes from the object the script is in when it is worn on the body, else from the wearer's attachment with "[wolfBreath]" in its description (a WolfAvatars dragon's breath object, worn at the mouth); every viewer sees it, with a sound. In the region's game, players in the breath (WOLF_BREATH_REACH metres from WOLF_BREATH_ORIGIN along the wearer's facing) lose health (ice also slows them) when the wearer is playing too; never on safe land, never anyone not playing. A 4 s rest after each breath. options: [WOLF_BREATH_ORIGIN, vector, WOLF_BREATH_REACH, float]. Returns 1, or 0 with wolfGetLastError saying why. Defined on Wolf_Api.wolfBreath / WolfBreath.
Makes the avatar wearing this script breathe fire or ice, like a dragon. Only from a worn script - a HUD or something attached to the body. The stream comes out of the worn object the script is in, or, from a HUD, out of the wearer's attachment whose description contains [wolfBreath] (a WolfAvatars dragon wears one at the mouth). Everyone nearby sees it and hears it. WOLF_BREATH_FIRE is flames, embers and smoke; WOLF_BREATH_ICE is frost, crystals and mist; WOLF_BREATH_STOP ends a breath early. It lasts seconds (0.5 to 20; 0 gives 3), then rests for 4 seconds before the next. When the region has a game with health and the wearer is playing it, every other player caught in the breath loses health (ice also slows them for a moment); never on land marked safe, and never anyone who is not playing - they only see it. Returns 1, or 0 with wolfGetLastError saying why.
Parameters
| Type | Name | What it does |
|---|---|---|
| integer | kind | WOLF_BREATH_FIRE, WOLF_BREATH_ICE or WOLF_BREATH_STOP. |
| float | seconds | How long, 0.5 to 20 (0 = 3). |
| list | options | [WOLF_BREATH_ORIGIN, <x, y, z>] where it starts, metres from the wearer's centre (+x ahead); [WOLF_BREATH_REACH, 7.0] how far it reaches, 2 to 10 m. |
How players use it, and more examples: Dragons, in the WolfNPC guide.
Example
// A dragon HUD button: breathe fire for 3 seconds from the mouth.
touch_start(integer n)
{
if (!wolfBreath(WOLF_BREATH_FIRE, 3.0, [WOLF_BREATH_ORIGIN, <0.6, 0.0, 0.4>, WOLF_BREATH_REACH, 7.0]))
llOwnerSay("No breath: " + wolfGetLastError());
}Ours alone. Grid features you will not find on any other OpenSimulator grid.