LlWind
Looking for the current API? Open the llWind reference →
Return value notes
Examples
default
{
touch_start(integer num)
{
llSay(0, "Wind velocity: " + (string)llWind(ZERO_VECTOR));
}
}// wind interpretation as angle and speed
default
{
state_entry()
{
vector windVector = llWind( ZERO_VECTOR);
float windSpeed = llVecMag( windVector);
float windDirection = llAtan2( windVector.y, windVector.x);
integer compassWind = ( 450 - (integer)( RAD_TO_DEG*windDirection))%360;
llOwnerSay( "\nWind direction: "+(string)compassWind+"°\nWind speed: "+(string)windSpeed+" m/S");
}
}See also: functions
See also: articles
Known issues
SVC-3131: llWind() and viewer wind effects do not match
Shared wiki helpers
The original page also injects shared parameter notes, caveats or issue information through these helpers. Their conditional MediaWiki logic is not reproduced here; inspect the preserved helper source for additional material.
Original shared helper source (conditional wiki logic is not evaluated)
{{LSL Injection Test}}<noinclude></noinclude>{{#if:
{{#vardefine:p_{{{1|}}}_desc|offset relative to the {{#switch:{{{local|}}}|*|=prim's|#default={{{local|}}}|object=object's}} position and expressed in [[Viewer coordinate frames#Local|local coordinates]]{{#if:{{{dead|}}}| and is completely ignored.}}{{{desc|}}}}}
{{#vardefine:p_{{{1|}}}_hover|offset relative to the {{#switch:{{{local|}}}|*|=prim's|#default={{{local|}}}|object=object's}} position and expressed in local coordinates{{#if:{{{dead|}}}| and is completely ignored.}}{{#if:{{{hover|}}}|{{{hover|}}}|{{{desc|}}}}}}}
{{#if:{{{dead|}}}|{{#vardefine:caveats|{{#var:caveats}}
*{{LSLP|{{{1|}}}}} functionality {{#switch:{{{dead|}}}|never=has not been implemented|*|#default=has been removed}}, any value provided is completely ignored. For future proofing purposes, you should use a [[ZERO_VECTOR]] for it's value.}}
}}
{{#if:{{{sim|}}}{{{region|}}}|
{{#vardefine:header_footnote|{{#var:header_footnote}}{{PBR}}
The requested position needs to be in the same region.}}
}}
{{#if:{{{noZ|}}}|
{{#vardefine:header_footnote|{{#var:header_footnote}}{{PBR}}
Only the {{LSLP|x}} and {{LSLP|y}} coordinates in {{LSLP|offset}} are important, the {{lSLP|z}} component is ignored.}}
}}
}}<noinclude>
{| {{Prettytable}}
|-{{Hl2}}
!var
!value
|-
|desc
|{{#var:p_{{{1|}}}_desc}}
|-
|hover
|{{#var:p_{{{1|}}}_hover}}
|}
</noinclude>Original wiki source
Some wiki templates and tables need their original context. View this article on the Second Life Wiki. Technical wording and examples are retained from the source; historical guidance may differ from current behavior.