<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.secondlife.com/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Kayaker+Magic</id>
	<title>Second Life Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.secondlife.com/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Kayaker+Magic"/>
	<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/wiki/Special:Contributions/Kayaker_Magic"/>
	<updated>2026-07-27T06:23:56Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.42.1</generator>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=LlAtan2&amp;diff=1200462</id>
		<title>LlAtan2</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=LlAtan2&amp;diff=1200462"/>
		<updated>2016-06-15T15:32:35Z</updated>

		<summary type="html">&lt;p&gt;Kayaker Magic: Adding a haiku&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{LSL Function&lt;br /&gt;
|func_id=3|func_sleep=0.0|func_energy=10.0&lt;br /&gt;
|func=llAtan2|sort=Atan2&lt;br /&gt;
|p1_type=float|p1_name=y|p1_desc&lt;br /&gt;
|p2_type=float|p2_name=x|p2_desc&lt;br /&gt;
|return_type=float&lt;br /&gt;
|return_text=that is the {{wikipedia|Atan2|arctangent2}} of {{LSLP|y}}, {{LSLP|x}}.&lt;br /&gt;
|func_footnote=Similar to the &amp;lt;span class=&amp;quot;plainlinks&amp;quot;&amp;gt;{{wikipedia|Inverse_trigonometric_functions|arctangent}}&amp;lt;/span&amp;gt;({{LSLP|y}}/{{LSLP|x}}) except it utilizes the signs of {{LSLP|x}} &amp;amp; {{LSLP|y}} to determine the quadrant and avoids  division by zero. &amp;lt;br /&amp;gt;&lt;br /&gt;
|spec=&lt;br /&gt;
If {{LSLP|x}} is positive zero and...&lt;br /&gt;
* {{LSLP|y}} is zero, &#039;&#039;&#039;zero&#039;&#039;&#039; is returned.&lt;br /&gt;
* {{LSLP|y}} is positive, &#039;&#039;&#039;PI/2&#039;&#039;&#039; is returned.&lt;br /&gt;
* {{LSLP|y}} is negative, &#039;&#039;&#039;-PI/2&#039;&#039;&#039; is returned.&lt;br /&gt;
If {{LSLP|x}} is negative zero and...&lt;br /&gt;
* {{LSLP|y}} is positive zero, &#039;&#039;&#039;PI&#039;&#039;&#039; is returned.&lt;br /&gt;
* {{LSLP|y}} is negative zero, &#039;&#039;&#039;-PI&#039;&#039;&#039; is returned.&lt;br /&gt;
* {{LSLP|y}} is positive, &#039;&#039;&#039;PI/2&#039;&#039;&#039; is returned.&lt;br /&gt;
* {{LSLP|y}} is negative, &#039;&#039;&#039;-PI/2&#039;&#039;&#039; is returned.&lt;br /&gt;
&lt;br /&gt;
Or&lt;br /&gt;
&amp;lt;source lang=&amp;quot;lsl2&amp;quot;&amp;gt;&lt;br /&gt;
if((string)x != (string)0.0 &amp;amp;&amp;amp; y == 0.0)//negative zero&lt;br /&gt;
    return PI * ~-2*((string)y != (string)0.0));&lt;br /&gt;
return ((y &amp;gt; 0) - (y &amp;lt; 0)) * PI_BY_TWO;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
The returned value is in the range {{Interval|gte=-[[PI]]|gteh=-PI|lte=PI|center=return}}{{Interval/Footnote}}.&lt;br /&gt;
|caveats&lt;br /&gt;
|constants&lt;br /&gt;
|examples=&amp;lt;source lang=&amp;quot;lsl2&amp;quot;&amp;gt;default&lt;br /&gt;
{&lt;br /&gt;
  state_entry()&lt;br /&gt;
  {&lt;br /&gt;
    float num1 = llFrand(100.0);&lt;br /&gt;
    float num2 = llFrand(100.0);&lt;br /&gt;
&lt;br /&gt;
    llOwnerSay(&amp;quot;y = &amp;quot; + (string)num1);&lt;br /&gt;
    llOwnerSay(&amp;quot;x = &amp;quot; + (string)num2);&lt;br /&gt;
&lt;br /&gt;
    llOwnerSay(&amp;quot;The arctangent of y divided by x is &amp;quot; + (string)llAtan2(num1, num2));&lt;br /&gt;
  }&lt;br /&gt;
}&amp;lt;/source&amp;gt;&amp;lt;source lang=&amp;quot;lsl2&amp;quot;&amp;gt;//Function with input of a vector determining the position of a target and returning&lt;br /&gt;
//a string with the literal compass-direction of that target towards your position&lt;br /&gt;
//by Ramana Sweetwater 2009/01, any use allowed license :-)&lt;br /&gt;
//corrected by Patrick Muggins&lt;br /&gt;
&lt;br /&gt;
string compass (vector target) &lt;br /&gt;
{&lt;br /&gt;
    vector source = llGetPos();&lt;br /&gt;
    list DIRS =[&amp;quot;W&amp;quot;,&amp;quot;NW&amp;quot;,&amp;quot;N&amp;quot;,&amp;quot;NE&amp;quot;,&amp;quot;E&amp;quot;,&amp;quot;SE&amp;quot;,&amp;quot;S&amp;quot;,&amp;quot;SW&amp;quot;,&amp;quot;W&amp;quot;];&lt;br /&gt;
    integer index = llCeil(3.5 - (4 * llAtan2(target.y - source.y, target.x - source.x) / PI));&lt;br /&gt;
    return llList2String(DIRS, index);&lt;br /&gt;
}&amp;lt;/source&amp;gt;&lt;br /&gt;
[[/Compass QA]]&lt;br /&gt;
|helpers&lt;br /&gt;
|also_functions=&lt;br /&gt;
{{LSL DefineRow|[[llSin]]|[[llAsin]]|sine &amp;amp; inverse Sine}}&lt;br /&gt;
{{LSL DefineRow|[[llCos]]|[[llAcos]]|cosine &amp;amp; inverse cosine}}&lt;br /&gt;
{{LSL DefineRow|[[llTan]]||tangent}}&lt;br /&gt;
|also_articles=&lt;br /&gt;
{{LSL DefineRow||{{wikipedia|Atan2}}|}}&lt;br /&gt;
{{LSL DefineRow||{{wikipedia|Inverse trigonometric function}}|}}&lt;br /&gt;
|notes&lt;br /&gt;
|haiku=&lt;br /&gt;
{{Haiku|An analog clock|passes through infinity|twice every single hour}}&lt;br /&gt;
|cat1=Math/Trigonometry&lt;br /&gt;
|cat2&lt;br /&gt;
|cat3&lt;br /&gt;
|cat4&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Kayaker Magic</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=LlAxes2Rot&amp;diff=1199673</id>
		<title>LlAxes2Rot</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=LlAxes2Rot&amp;diff=1199673"/>
		<updated>2016-03-07T12:10:09Z</updated>

		<summary type="html">&lt;p&gt;Kayaker Magic: Added a Haiku&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{LSL_Function&lt;br /&gt;
|func_id=17|func_sleep=0.0|sort=Axes2Rot|func_energy=10.0&lt;br /&gt;
|func=llAxes2Rot|sort=Axes2Rot&lt;br /&gt;
|func_footnote=All three vectors must be mutually orthogonal unit vectors.&lt;br /&gt;
|return_type=rotation&lt;br /&gt;
|p1_type=vector|p1_name=fwd&lt;br /&gt;
|p2_type=vector|p2_name=left&lt;br /&gt;
|p3_type=vector|p3_name=up&lt;br /&gt;
|return_text=that is defined by the 3 coordinate axes&lt;br /&gt;
|notes=Technically, only the first two vectors are needed to define this rotation, which can be done by calling any of these:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;lsl2&amp;quot;&amp;gt;llAxes2Rot(fwd, left, fwd % left);&lt;br /&gt;
llAxes2Rot(left % up, left, up);&lt;br /&gt;
llAxes2Rot(fwd, up % fwd, up);&amp;lt;/source&amp;gt;&lt;br /&gt;
|spec&lt;br /&gt;
|caveats&lt;br /&gt;
|examples=&amp;lt;source lang=&amp;quot;lsl2&amp;quot;&amp;gt;default&lt;br /&gt;
{&lt;br /&gt;
    state_entry()&lt;br /&gt;
    {&lt;br /&gt;
        vector i = &amp;lt; 1.0, 0.0, 0.0&amp;gt;;&lt;br /&gt;
        vector j = &amp;lt; 0.0, 1.0, 0.0&amp;gt;;&lt;br /&gt;
        vector k = &amp;lt; 0.0, 0.0, 1.0&amp;gt;;&lt;br /&gt;
&lt;br /&gt;
        rotation rot = llAxes2Rot( j, -i, k );&lt;br /&gt;
&lt;br /&gt;
        llSay(0, (string) (llRot2Euler(rot) * RAD_TO_DEG) );&lt;br /&gt;
    }&lt;br /&gt;
}&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This script displays:&lt;br /&gt;
   Object: &amp;lt;-0.00000, 0.00000, 90.00000&amp;gt;&lt;br /&gt;
which shows that (&#039;&#039;&#039;j&#039;&#039;&#039;, &#039;&#039;&#039;-i&#039;&#039;&#039;, &#039;&#039;&#039;k&#039;&#039;&#039;) is obtained by rotating (&#039;&#039;&#039;i&#039;&#039;&#039;, &#039;&#039;&#039;j&#039;&#039;&#039;, &#039;&#039;&#039;k&#039;&#039;&#039;) 90 degrees around z direction.&lt;br /&gt;
|helpers&lt;br /&gt;
|also_functions&lt;br /&gt;
|also_events&lt;br /&gt;
|also_tests=&lt;br /&gt;
{{LSL_DefineRow||[[User:Dora_Gustafson/llAxes2Rot_right_and_wrong|Visual illustration]]|Importance of mutually orthogonal unit vectors}}&lt;br /&gt;
|also_articles&lt;br /&gt;
|cat1=Math/3D&lt;br /&gt;
|cat2=Rotation&lt;br /&gt;
|cat3&lt;br /&gt;
|cat4&lt;br /&gt;
|haiku={{Haiku|quaternions rule|the whole world spins at your whim|or crashes and burns}}&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Kayaker Magic</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=LlCastRay&amp;diff=1198851</id>
		<title>LlCastRay</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=LlCastRay&amp;diff=1198851"/>
		<updated>2016-01-14T22:53:19Z</updated>

		<summary type="html">&lt;p&gt;Kayaker Magic: caveats for the cases where the cast ray starts inside a prim and detecting the prim the script is in&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{LSL_Function&lt;br /&gt;
|inject-2={{Issues/VWR-1331}}&lt;br /&gt;
|func=llCastRay&lt;br /&gt;
|func_id=?&lt;br /&gt;
|func_sleep&lt;br /&gt;
|func_energy&lt;br /&gt;
&lt;br /&gt;
|func_desc=Cast a ray from {{LSLP|start}} to {{LSLP|end}} and report collision data for intersections with objects&lt;br /&gt;
&lt;br /&gt;
|return_type=list&lt;br /&gt;
|return_text=of strided values with an additional integer [[#status_code|status_code]] on the end. Each stride consists of two mandatory values {[[key]] {{LSLP|uuid}}, [[vector]] {{LSLP|position}}} and possibly some optional values {[[integer]] {{LSLP|link_number}}, [[vector]] {{LSLP|normal}}} see [[#RC_DATA_FLAGS|RC_DATA_FLAGS]] for details. The {{LSLP|status_code}} if it is negative is an [[#error_code|error code]], otherwise it is the number of hits (and strides) returned.&lt;br /&gt;
|func_footnote&lt;br /&gt;
&lt;br /&gt;
|p1_type=vector|p1_name=start|p1_desc=starting location &lt;br /&gt;
|p2_type=vector|p2_name=end|p2_desc=ending location &lt;br /&gt;
|p3_type=list|p3_subtype=instructions|p3_name=options|p3_desc=can consists of any number of [[#options|option flag]]s and their parameters.&lt;br /&gt;
|constants&lt;br /&gt;
|caveats=*Depending upon the value of {{LSLP|flags}} (provided via [[#RC_DATA_FLAGS|RC_DATA_FLAGS]]), the number and types of values in the strides will vary. See [[#RC_DATA_FLAGS|RC_DATA_FLAGS]] for details.&lt;br /&gt;
*[[llGetRot]] will not return an avatar&#039;s exact visual rotation because the viewer doesn&#039;t update the avatar&#039;s rotation under a threshold (see {{jira|VWR-1331}}). To get an avatar&#039;s exact looking direction while in mouselook, use [[llGetCameraRot]] instead.&lt;br /&gt;
*[[llCastRay]] will not detect prims having no physics shape ([[PRIM_PHYSICS_SHAPE_TYPE]] = [[PRIM_PHYSICS_SHAPE_NONE]]).&lt;br /&gt;
*[[llCastRay]] will not detect a prim if the ray starts inside the prim. This makes it safe to use the prim position as the start location.&lt;br /&gt;
*[[llCastRay]] can detect the prim the script is in, if the start location is outside the prim.&lt;br /&gt;
|spec=&lt;br /&gt;
===={{LSL Param|status_code}}====&lt;br /&gt;
&lt;br /&gt;
{{LSLP|status_code}} is a number tacked onto the end of the strided list to give you extra information about the ray cast. If the cast succeeded, it will be &amp;amp;gt;=0 and will indicate the number of hits. If the ray cast failed (which should only happen right now if the simulator performance is running low), you&#039;ll get a negative status code. [[RCERR_SIM_PERF_LOW]] will be used as the status code if the overall physics time in the simulator is too high to perform raycasts. The idea is that you will know to try your cast again in a few frames.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table class=&amp;quot;lltable&amp;quot; border=&amp;quot;1&amp;quot; id=&amp;quot;error_code&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;caption&amp;gt;&#039;&#039;&#039;status_code&#039;&#039;&#039; error codes and their meanings.&amp;lt;/caption&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Status Code&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th title=&#039;Value&#039;&amp;gt;V&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Description&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;{{LSL Const|RCERR_UNKNOWN|integer|-1}}&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;{{#var:value}}&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;The raycast failed for an unspecified reason. Please submit a bug report.&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;{{LSL Const|RCERR_SIM_PERF_LOW|integer|-2}}&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;{{#var:value}}&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;The raycast failed because simulator performance is low. Wait a while and then try again. If possible reduce the scene complexity.&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;{{LSL Const|RCERR_CAST_TIME_EXCEEDED|integer|-3}}&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;{{#var:value}}&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;The raycast failed because the parcel or agent has exceeded the maximum time allowed for raycasting. This resource pool is continually replenished, so waiting a few frames and retrying is likely to succeed.&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====[[RCERR_CAST_TIME_EXCEEDED]]=====&lt;br /&gt;
Ray casts are throttled by the amount of time actually taken to perform the cast. Full regions are each allotted a 4ms pool, divided proportionally over parcels the same way prim limits are. Homestead and Openspace regions behave similarly, except that their pool size is limited to 1ms.  Each agent is allotted 200us. All scripts in attachments and, scripts in vehicles, use the agent pool whereas all other scripts use the parcel pool. For the purpose of ray cast accounting (and script limits in general), a &#039;vehicle&#039; is defined as an object which had one or more avatars seated on it when it entered the parcel. A ray cast can be performed if at least 30us of raycast time remain in the appropriate pool. If there is insufficient time remaining, [[RCERR_CAST_TIME_EXCEEDED]] is returned as the status code. The exact time used by the ray cast is measured when it is performed and that number (in microseconds) is subtracted from the pool. (The time remaining can be a negative number.) Over time, the pool is automatically replenished (at a rate of 25% of the max time per frame).&lt;br /&gt;
&lt;br /&gt;
For example, if you start out with 100us and perform a 50us raycast, 50us will be remain. If you then a 70us raycast during the same frame, you will have -20us remaining. Subsequent calls to llCastRay that frame will fail with status code [[RCERR_CAST_TIME_EXCEEDED]]. At the start of the next frame, you will have 5us available (25us are restored each frame) and any attempt to call llCastRay will again fail as you need 30us to execute a raycast. One frame after that, 30us will be available and a raycast can once again be performed.&lt;br /&gt;
&lt;br /&gt;
This method of throttling puts the scripter &amp;quot;closer to the machine&amp;quot;. That is, you&#039;re only being charged for what you use, and more efficient raycast techniques will automatically be charged less than less efficient ones. The exact throttle values are subject to change at any time. To ensure robust results, be sure to check for [[RCERR_CAST_TIME_EXCEEDED]] and [[RCERR_SIM_PERF_LOW]] and sleep or do other work for a while before trying again. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Tips for Efficient Raycasts:&#039;&#039;&#039;&lt;br /&gt;
*Keep the max number of hits returned as small as possible&lt;br /&gt;
*Set as many [[RC_REJECT_TYPES]] as possible (of factors you can control, this will likely have the largest impact). For example, if you only want to know where the nearest agent is along a ray, use &amp;lt;code&amp;gt;[[RC_REJECT_LAND]] {{!}} [[RC_REJECT_PHYSICAL]] {{!}} [[RC_REJECT_NONPHYSICAL]]&amp;lt;/code&amp;gt;&lt;br /&gt;
*When possible, avoid raycasting through piles of prims and avoid raycasting against concave physics objects (anything with cut, hollow, twist, and so on, and any mesh object that has no decomposition and has physics type &amp;quot;prim&amp;quot;). Obviously this can&#039;t always be avoided, so some casts may take significantly longer than others. Plan for that with robust scripts that handle [[RCERR_CAST_TIME_EXCEEDED]] responsibly, namely by sleeping briefly after the call and waiting for a few frames to go by before trying again.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; [https://jira.secondlife.com/browse/SCR-199 SCR-199] indicates that pools have been removed from the main grid, so this return code should not appear.&lt;br /&gt;
&lt;br /&gt;
==== {{LSL Param|options}} parameter ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table class=lltable border=1 id=&amp;quot;options&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;caption&amp;gt;{{LSLP|options}} flags and their parameters&amp;lt;/caption&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Flag&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th title=&#039;Value&#039;&amp;gt;V&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Parameters&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Default Value&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Description&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;[&amp;amp;nbsp;{{LSL Const|RC_REJECT_TYPES|integer|0}}&amp;amp;nbsp;] &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;{{#var:value}}&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;[&amp;amp;nbsp;[[integer]]&amp;amp;nbsp;{{LSLPT|filter}}&amp;amp;nbsp;]&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;[ 0 ]&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt; Mask used to ignore specific types of objects (and avatars). &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;[&amp;amp;nbsp;{{LSL Const|RC_DATA_FLAGS|integer|2}}&amp;amp;nbsp;] &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;{{#var:value}}&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;[&amp;amp;nbsp;[[integer]]&amp;amp;nbsp;{{LSLPT|flags}}&amp;amp;nbsp;]&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;[ 0 ]&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt; Described in the [[#RC_DATA_FLAGS|RC_DATA_FLAGS]] section. &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;[&amp;amp;nbsp;{{LSL Const|RC_MAX_HITS|integer|3}}&amp;amp;nbsp;] &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;{{#var:value}}&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;[&amp;amp;nbsp;[[integer]]&amp;amp;nbsp;{{LSLPT|max_hits}}&amp;amp;nbsp;]&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;[ 1 ]&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt; Maximum number of hits to return. Maximum value is 256. &#039;&#039;To avoid performance issues, keep it small.&#039;&#039;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;[&amp;amp;nbsp;{{LSL Const|RC_DETECT_PHANTOM|integer|1}}&amp;amp;nbsp;] &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;{{#var:value}}&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;[&amp;amp;nbsp;[[integer]]&amp;amp;nbsp;{{LSLPT|detect_phantom}}&amp;amp;nbsp;]&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;[ [[FALSE]] ]&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Set to [[TRUE]] (or nonzero) to detect phantom AND volume detect objects. It is not possible to detect only phantom objects or only volume detect objects. If set to [[TRUE]], phantom and volume detect objects will always be detected, even if [[RC_REJECT_NONPHYSICAL]] and [[RC_REJECT_PHYSICAL]] are set in [[RC_REJECT_TYPES]].&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====[[RC_REJECT_TYPES]]=====&lt;br /&gt;
&lt;br /&gt;
{{LSLP|filter}} is a bitwise-or combination of the following constants: [[RC_REJECT_AGENTS]], [[RC_REJECT_PHYSICAL]], [[RC_REJECT_NONPHYSICAL]], and [[RC_REJECT_LAND]] except that if you select all four of them, a script runtime error will be generated (it makes no sense to cast a ray and reject everything!). Note that phantom and volume detect objects are never returned and that seated agents are treated like unseated agents. I.e., you either get seated and unseated agents in your results, or you use [[RC_REJECT_AGENTS]] and get neither. Using 0 as the filter value will return all hits.&lt;br /&gt;
&lt;br /&gt;
=====[[RC_DATA_FLAGS]]=====&lt;br /&gt;
&lt;br /&gt;
{{LSLP|flags}} is a bitwise-or combination of: [[RC_GET_NORMAL]], [[RC_GET_ROOT_KEY]], and [[RC_GET_LINK_NUM]]. These select whether you want link numbers and hit normals in your results list. By default, you will get the UUID (&#039;key&#039;) of the exact child prim hit. If instead you want the key of the root prim, set [[RC_GET_ROOT_KEY]]. A terrain hit will register as [[NULL_KEY]].&lt;br /&gt;
&lt;br /&gt;
|examples=&lt;br /&gt;
&amp;lt;source lang=&amp;quot;lsl2&amp;quot;&amp;gt;&lt;br /&gt;
integer filter;// default is 0&lt;br /&gt;
&lt;br /&gt;
default&lt;br /&gt;
{&lt;br /&gt;
    state_entry()&lt;br /&gt;
    {&lt;br /&gt;
        string ownerName = llKey2Name(llGetOwner());&lt;br /&gt;
        llOwnerSay(&amp;quot;Hello, &amp;quot; + ownerName + &amp;quot;!&amp;quot;);&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    touch_start(integer total_number)&lt;br /&gt;
    {&lt;br /&gt;
        vector start = llGetPos();&lt;br /&gt;
        vector end = start - &amp;lt;0.0, -25.0, 0.0&amp;gt;;&lt;br /&gt;
&lt;br /&gt;
        if ( filter &amp;gt; 8 )&lt;br /&gt;
            filter = 0;&lt;br /&gt;
&lt;br /&gt;
        llOwnerSay(&amp;quot;Filter &amp;quot; + (string)filter);&lt;br /&gt;
&lt;br /&gt;
        list results = llCastRay(start, end, [RC_REJECT_TYPES, filter, RC_MAX_HITS, 4] );&lt;br /&gt;
&lt;br /&gt;
        integer hitNum = 0;&lt;br /&gt;
        // Handle error conditions here by checking llList2Integer(results, -1) &amp;gt;= 0&lt;br /&gt;
        while (hitNum &amp;lt; llList2Integer(results, -1))&lt;br /&gt;
        {&lt;br /&gt;
            // Stride is 2 because we didn&#039;t request normals or link numbers&lt;br /&gt;
            key uuid = llList2Key(results, 2*hitNum);&lt;br /&gt;
&lt;br /&gt;
            string name = &amp;quot;Land&amp;quot;; // if (uuid == NULL_KEY)&lt;br /&gt;
&lt;br /&gt;
            if (uuid != NULL_KEY)&lt;br /&gt;
                name = llKey2Name(uuid);&lt;br /&gt;
&lt;br /&gt;
            llOwnerSay(&amp;quot;Hit &amp;quot; + name + &amp;quot;.&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
            ++hitNum;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        ++filter;&lt;br /&gt;
    }&lt;br /&gt;
}&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;lsl2&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
// Fire a weapon at a target, report a hit&lt;br /&gt;
&lt;br /&gt;
integer gTargetChan = -9934917;&lt;br /&gt;
&lt;br /&gt;
default&lt;br /&gt;
{&lt;br /&gt;
    attach(key id)&lt;br /&gt;
    {&lt;br /&gt;
        if (id != NULL_KEY)&lt;br /&gt;
        { &lt;br /&gt;
            llRequestPermissions(id,PERMISSION_TAKE_CONTROLS|PERMISSION_TRACK_CAMERA);&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    run_time_permissions (integer perm)&lt;br /&gt;
    {&lt;br /&gt;
        if (perm &amp;amp; PERMISSION_TAKE_CONTROLS|PERMISSION_TRACK_CAMERA) &lt;br /&gt;
        {&lt;br /&gt;
            llTakeControls(CONTROL_LBUTTON|CONTROL_ML_LBUTTON,TRUE,FALSE);&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    control (key id, integer level, integer edge)&lt;br /&gt;
    {&lt;br /&gt;
        // User must be in mouselook to aim the weapon&lt;br /&gt;
        if (level &amp;amp; edge &amp;amp; CONTROL_LBUTTON)&lt;br /&gt;
        {&lt;br /&gt;
            llSay(0,&amp;quot;You must be in Mouselook to shoot.  Type \&amp;quot;CTRL + M\&amp;quot; or type \&amp;quot;Esc\&amp;quot; and scroll your mouse wheel forward to enter Mouselook.&amp;quot;);&lt;br /&gt;
        }&lt;br /&gt;
        // User IS in mouselook        &lt;br /&gt;
        if (level &amp;amp; edge &amp;amp; CONTROL_ML_LBUTTON)&lt;br /&gt;
        {&lt;br /&gt;
            vector start = llGetCameraPos();&lt;br /&gt;
            // Detect only a non-physical, non-phantom object. Report its root prim&#039;s UUID.&lt;br /&gt;
            list results = llCastRay(start, start+&amp;lt;60.0,0.0,0.0&amp;gt;*llGetCameraRot(),[RC_REJECT_TYPES,RC_REJECT_PHYSICAL|RC_REJECT_AGENTS|RC_REJECT_LAND,RC_DETECT_PHANTOM,FALSE,RC_DATA_FLAGS,RC_GET_ROOT_KEY,RC_MAX_HITS,1]);&lt;br /&gt;
            llTriggerSound(llGetInventoryName(INVENTORY_SOUND,0),1.0);&lt;br /&gt;
            llSleep(0.03);&lt;br /&gt;
            key target = llList2Key(results,0);&lt;br /&gt;
            // Tell target that it has been hit. &lt;br /&gt;
            llRegionSayTo(target,gTargetChan,&amp;quot;HIT&amp;quot;);&lt;br /&gt;
            // Target, scripted to listen on gTargetChan, can explode, change color, fall over .....&lt;br /&gt;
        }&lt;br /&gt;
    }            &lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
|notes=&lt;br /&gt;
Use [[llDumpList2String]] to see what the output looks like when you try a new set of flags.&lt;br /&gt;
&lt;br /&gt;
To quickly get the status code use &amp;lt;code&amp;gt;[[llList2Integer]](result, -1)&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Ideas for uses&#039;&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Weapons&#039;&#039;&#039; - Raycasts are the traditional tool used in game development for simulating projectile weapons. They are orders of magnitude more efficient than rezzing a prim and launching it from a weapon.&lt;br /&gt;
* &#039;&#039;&#039;AI Objects&#039;&#039;&#039; - Line-of-sight detection of avatars and other objects, or for navigating an environment by tracing rays about themselves. For example; casting rays directly downwards to determine the height and angle (normal) of the current floor surface, useful for non-physical object movement.&lt;br /&gt;
* &#039;&#039;&#039;Intelligent Object Placement&#039;&#039;&#039; - Static objects can be placed in-scene, but adjust themselves to their environment. For example; an object rezzed too high up may adjust its height to floor-level, or a computer console placed low down may cause an avatar to kneel to use it rather than standing.&lt;br /&gt;
* &#039;&#039;&#039;Environment Analysis&#039;&#039;&#039; - Can be used to determine the limitations of a surrounding area, such as determining if an object has been placed within a closed room. Not a test to be performed frequently due to quantity of rays required, but could be used by objects to switch off effects if unobserved (no-one within the room). Auto-adjusting furniture or objects to snap to walls, floors, and ceilings.&lt;br /&gt;
|cat1=Physics&lt;br /&gt;
|cat2=Light&lt;br /&gt;
|history = *Date of Release  [[ Release_Notes/Second_Life_Server/11#11.09.23.241511 | 23/09/2011 ]]&lt;br /&gt;
* {{jira|SCR-199}} - fixed - The throttle was too low and thus rendered the function not as useful as it could be.&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Kayaker Magic</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=LlGroundNormal&amp;diff=1169273</id>
		<title>LlGroundNormal</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=LlGroundNormal&amp;diff=1169273"/>
		<updated>2012-06-16T08:21:47Z</updated>

		<summary type="html">&lt;p&gt;Kayaker Magic: changed the caveat to say &amp;quot;unit normal&amp;quot; instead of just normal&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{LSL_Function&lt;br /&gt;
|func_id=222|func_sleep=0.0|func_energy=10.0&lt;br /&gt;
|func=llGroundNormal&lt;br /&gt;
|return_type=vector|p1_type=vector|p1_name=offset&lt;br /&gt;
|func_footnote=The requested position needs to be in the same sim.&lt;br /&gt;
|func_desc&lt;br /&gt;
|return_text=that is the ground normal from the current [[llGetPos|position]] + &#039;&#039;&#039;offset&#039;&#039;&#039;.&lt;br /&gt;
|spec=This function is defined as:&lt;br /&gt;
&amp;lt;lsl&amp;gt;&lt;br /&gt;
vector llGroundNormal(vector offset)&lt;br /&gt;
{&lt;br /&gt;
    vector slope = llGroundSlope(offset);&lt;br /&gt;
    return &amp;lt;slope.x, slope.y, 1.0&amp;gt;;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/lsl&amp;gt;&lt;br /&gt;
|caveats=*Despite the name, [[llGroundNormal]] DOES NOT RETURN A NORMAL UNIT VECTOR!!! If your calculation requires a unit normal (for example if you are using the result as an argument to [[llAxes2Rot]]) then you must force it to be a unit normal with [[llVecNorm]]([[llGroundNormal]](offset));&lt;br /&gt;
|constants&lt;br /&gt;
|examples&lt;br /&gt;
|helpers&lt;br /&gt;
|also_functions={{LSL DefineRow||[[llGround]]|Gets the ground height}}&lt;br /&gt;
{{LSL DefineRow||[[llGroundContour]]|Gets the ground contour}}&lt;br /&gt;
{{LSL DefineRow||[[llGroundSlope]]|Gets the ground slope}}&lt;br /&gt;
|also_tests&lt;br /&gt;
|also_events&lt;br /&gt;
|also_articles&lt;br /&gt;
|notes&lt;br /&gt;
|cat1=Ground&lt;br /&gt;
|cat2=Region&lt;br /&gt;
|cat3&lt;br /&gt;
|cat4&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Kayaker Magic</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=LlGroundNormal&amp;diff=1169272</id>
		<title>LlGroundNormal</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=LlGroundNormal&amp;diff=1169272"/>
		<updated>2012-06-16T08:19:58Z</updated>

		<summary type="html">&lt;p&gt;Kayaker Magic: marking references to llGroundNormal itself as links, so they are formatted to show up better in the text&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{LSL_Function&lt;br /&gt;
|func_id=222|func_sleep=0.0|func_energy=10.0&lt;br /&gt;
|func=llGroundNormal&lt;br /&gt;
|return_type=vector|p1_type=vector|p1_name=offset&lt;br /&gt;
|func_footnote=The requested position needs to be in the same sim.&lt;br /&gt;
|func_desc&lt;br /&gt;
|return_text=that is the ground normal from the current [[llGetPos|position]] + &#039;&#039;&#039;offset&#039;&#039;&#039;.&lt;br /&gt;
|spec=This function is defined as:&lt;br /&gt;
&amp;lt;lsl&amp;gt;&lt;br /&gt;
vector llGroundNormal(vector offset)&lt;br /&gt;
{&lt;br /&gt;
    vector slope = llGroundSlope(offset);&lt;br /&gt;
    return &amp;lt;slope.x, slope.y, 1.0&amp;gt;;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/lsl&amp;gt;&lt;br /&gt;
|caveats=*Despite the name, [[llGroundNormal]] DOES NOT RETURN A NORMAL VECTOR!!! If your calculation requires a normal (for example if you are using the result as an argument to [[llAxes2Rot]]) then you must force it to be a normal with [[llVecNorm]]([[llGroundNormal]](offset));&lt;br /&gt;
|constants&lt;br /&gt;
|examples&lt;br /&gt;
|helpers&lt;br /&gt;
|also_functions={{LSL DefineRow||[[llGround]]|Gets the ground height}}&lt;br /&gt;
{{LSL DefineRow||[[llGroundContour]]|Gets the ground contour}}&lt;br /&gt;
{{LSL DefineRow||[[llGroundSlope]]|Gets the ground slope}}&lt;br /&gt;
|also_tests&lt;br /&gt;
|also_events&lt;br /&gt;
|also_articles&lt;br /&gt;
|notes&lt;br /&gt;
|cat1=Ground&lt;br /&gt;
|cat2=Region&lt;br /&gt;
|cat3&lt;br /&gt;
|cat4&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Kayaker Magic</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=LlGroundNormal&amp;diff=1169271</id>
		<title>LlGroundNormal</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=LlGroundNormal&amp;diff=1169271"/>
		<updated>2012-06-16T08:14:38Z</updated>

		<summary type="html">&lt;p&gt;Kayaker Magic: fixing the links I just added&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{LSL_Function&lt;br /&gt;
|func_id=222|func_sleep=0.0|func_energy=10.0&lt;br /&gt;
|func=llGroundNormal&lt;br /&gt;
|return_type=vector|p1_type=vector|p1_name=offset&lt;br /&gt;
|func_footnote=The requested position needs to be in the same sim.&lt;br /&gt;
|func_desc&lt;br /&gt;
|return_text=that is the ground normal from the current [[llGetPos|position]] + &#039;&#039;&#039;offset&#039;&#039;&#039;.&lt;br /&gt;
|spec=This function is defined as:&lt;br /&gt;
&amp;lt;lsl&amp;gt;&lt;br /&gt;
vector llGroundNormal(vector offset)&lt;br /&gt;
{&lt;br /&gt;
    vector slope = llGroundSlope(offset);&lt;br /&gt;
    return &amp;lt;slope.x, slope.y, 1.0&amp;gt;;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/lsl&amp;gt;&lt;br /&gt;
|caveats=*Despite the name, llGroundNormal DOES NOT RETURN A NORMAL VECTOR!!! If your calculation requires a normal (for example if you are using the result as an argument to [[llAxes2Rot]]) then you must force it to be a normal with [[llVecNorm]](llGroundNormal(offset));&lt;br /&gt;
|constants&lt;br /&gt;
|examples&lt;br /&gt;
|helpers&lt;br /&gt;
|also_functions={{LSL DefineRow||[[llGround]]|Gets the ground height}}&lt;br /&gt;
{{LSL DefineRow||[[llGroundContour]]|Gets the ground contour}}&lt;br /&gt;
{{LSL DefineRow||[[llGroundSlope]]|Gets the ground slope}}&lt;br /&gt;
|also_tests&lt;br /&gt;
|also_events&lt;br /&gt;
|also_articles&lt;br /&gt;
|notes&lt;br /&gt;
|cat1=Ground&lt;br /&gt;
|cat2=Region&lt;br /&gt;
|cat3&lt;br /&gt;
|cat4&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Kayaker Magic</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=LlGroundNormal&amp;diff=1169270</id>
		<title>LlGroundNormal</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=LlGroundNormal&amp;diff=1169270"/>
		<updated>2012-06-16T08:13:33Z</updated>

		<summary type="html">&lt;p&gt;Kayaker Magic: Putting links in my recent change&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{LSL_Function&lt;br /&gt;
|func_id=222|func_sleep=0.0|func_energy=10.0&lt;br /&gt;
|func=llGroundNormal&lt;br /&gt;
|return_type=vector|p1_type=vector|p1_name=offset&lt;br /&gt;
|func_footnote=The requested position needs to be in the same sim.&lt;br /&gt;
|func_desc&lt;br /&gt;
|return_text=that is the ground normal from the current [[llGetPos|position]] + &#039;&#039;&#039;offset&#039;&#039;&#039;.&lt;br /&gt;
|spec=This function is defined as:&lt;br /&gt;
&amp;lt;lsl&amp;gt;&lt;br /&gt;
vector llGroundNormal(vector offset)&lt;br /&gt;
{&lt;br /&gt;
    vector slope = llGroundSlope(offset);&lt;br /&gt;
    return &amp;lt;slope.x, slope.y, 1.0&amp;gt;;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/lsl&amp;gt;&lt;br /&gt;
|caveats=*Despite the name, llGroundNormal DOES NOT RETURN A NORMAL VECTOR!!! If your calculation requires a normal (for example if you are using the result as an argument to [llAxes2Rot]) then you must force it to be a normal with [llVecNorm](llGroundNormal(offset));&lt;br /&gt;
|constants&lt;br /&gt;
|examples&lt;br /&gt;
|helpers&lt;br /&gt;
|also_functions={{LSL DefineRow||[[llGround]]|Gets the ground height}}&lt;br /&gt;
{{LSL DefineRow||[[llGroundContour]]|Gets the ground contour}}&lt;br /&gt;
{{LSL DefineRow||[[llGroundSlope]]|Gets the ground slope}}&lt;br /&gt;
|also_tests&lt;br /&gt;
|also_events&lt;br /&gt;
|also_articles&lt;br /&gt;
|notes&lt;br /&gt;
|cat1=Ground&lt;br /&gt;
|cat2=Region&lt;br /&gt;
|cat3&lt;br /&gt;
|cat4&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Kayaker Magic</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=LlGroundNormal&amp;diff=1169269</id>
		<title>LlGroundNormal</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=LlGroundNormal&amp;diff=1169269"/>
		<updated>2012-06-16T08:09:40Z</updated>

		<summary type="html">&lt;p&gt;Kayaker Magic: I wish I had known 8 hours ago that llGroundNormal does not return a normal&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{LSL_Function&lt;br /&gt;
|func_id=222|func_sleep=0.0|func_energy=10.0&lt;br /&gt;
|func=llGroundNormal&lt;br /&gt;
|return_type=vector|p1_type=vector|p1_name=offset&lt;br /&gt;
|func_footnote=The requested position needs to be in the same sim.&lt;br /&gt;
|func_desc&lt;br /&gt;
|return_text=that is the ground normal from the current [[llGetPos|position]] + &#039;&#039;&#039;offset&#039;&#039;&#039;.&lt;br /&gt;
|spec=This function is defined as:&lt;br /&gt;
&amp;lt;lsl&amp;gt;&lt;br /&gt;
vector llGroundNormal(vector offset)&lt;br /&gt;
{&lt;br /&gt;
    vector slope = llGroundSlope(offset);&lt;br /&gt;
    return &amp;lt;slope.x, slope.y, 1.0&amp;gt;;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/lsl&amp;gt;&lt;br /&gt;
|caveats=*Despite the name, llGroundNormal DOES NOT RETURN A NORMAL VECTOR!!! If your calculation requires a normal (for example if you are using the result as an argument to llAxes2Rot) then you must force it to be a normal with llVecNorm(llGroundNormal(offset));&lt;br /&gt;
|constants&lt;br /&gt;
|examples&lt;br /&gt;
|helpers&lt;br /&gt;
|also_functions={{LSL DefineRow||[[llGround]]|Gets the ground height}}&lt;br /&gt;
{{LSL DefineRow||[[llGroundContour]]|Gets the ground contour}}&lt;br /&gt;
{{LSL DefineRow||[[llGroundSlope]]|Gets the ground slope}}&lt;br /&gt;
|also_tests&lt;br /&gt;
|also_events&lt;br /&gt;
|also_articles&lt;br /&gt;
|notes&lt;br /&gt;
|cat1=Ground&lt;br /&gt;
|cat2=Region&lt;br /&gt;
|cat3&lt;br /&gt;
|cat4&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Kayaker Magic</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=Collision_end&amp;diff=1015523</id>
		<title>Collision end</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=Collision_end&amp;diff=1015523"/>
		<updated>2010-08-23T21:17:55Z</updated>

		<summary type="html">&lt;p&gt;Kayaker Magic: Listed caveats about when collsions do not trigger.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Issues/SVC-3306}}{{LSL_Event|event_id=7|event_delay|event=collision_end&lt;br /&gt;
|p1_type=integer|p1_name=num_detected|p1_desc&lt;br /&gt;
|event_desc=Triggered when task stops colliding with another task&lt;br /&gt;
|constants&lt;br /&gt;
|spec&lt;br /&gt;
|caveats=*This event does not always trigger reliably.&lt;br /&gt;
* Phantom objects can never receive trigger collision events.&lt;br /&gt;
* llVolumeDetect(TRUE) objects get trigger collision_start and collision_end but not collision() events.&lt;br /&gt;
* A collision with a hovering avatar does not trigger collisions, unless the avatar turns or moves.&lt;br /&gt;
* Only a physical object will get collision events from colliding with a non-physical object.&lt;br /&gt;
&lt;br /&gt;
|examples=&amp;lt;lsl&amp;gt;collision_end(integer total_number)&lt;br /&gt;
{&lt;br /&gt;
    llOwnerSay(&amp;quot;The collision I&#039;ve had with &amp;quot; + llDetectedName(0) + &amp;quot;has ended.&amp;quot;);&lt;br /&gt;
}&amp;lt;/lsl&amp;gt;&lt;br /&gt;
|helpers&lt;br /&gt;
|also_header&lt;br /&gt;
|also_events={{LSL DefineRow||[[collision_start]]|}}&lt;br /&gt;
{{LSL DefineRow||[[collision]]|}}&lt;br /&gt;
|also_functions={{LSL DefineRow||[[llPassCollisions]]|}}&lt;br /&gt;
{{LSL DefineRow||[[llCollisionFilter]]|}}&lt;br /&gt;
{{LSL DefineRow||[[llCollisionSound]]|}}&lt;br /&gt;
{{LSL DefineRow||[[llCollisionSprite]]|}}&lt;br /&gt;
{{LSL DefineRow||[[llVolumeDetect]]|}}&lt;br /&gt;
|also_articles&lt;br /&gt;
|also_footer&lt;br /&gt;
|notes&lt;br /&gt;
|issues&lt;br /&gt;
|cat1=Collision&lt;br /&gt;
|cat2=Detected&lt;br /&gt;
|cat3=Collision Events&lt;br /&gt;
|cat4}}&lt;/div&gt;</summary>
		<author><name>Kayaker Magic</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=Collision&amp;diff=1015513</id>
		<title>Collision</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=Collision&amp;diff=1015513"/>
		<updated>2010-08-23T21:15:27Z</updated>

		<summary type="html">&lt;p&gt;Kayaker Magic: Added caveats for more times when collisions do not work.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Issues/SVC-3306}}{{LSL_Event|event_id=6|event_delay|event=collision&lt;br /&gt;
|p1_type=integer|p1_name=num_detected|p1_desc&lt;br /&gt;
|event_desc=Triggered while task is [[colliding]] with another task.&lt;br /&gt;
|constants&lt;br /&gt;
|spec&lt;br /&gt;
|caveats=&lt;br /&gt;
* Will not detect collisions with [[ground]]; use [[land_collision]] instead.&lt;br /&gt;
* Will not detect collisions between an avatar sitting on the task and the task itself (avatars are linked to objects they sit on so there is no collision, use the [[changed]] event to detect sits).&lt;br /&gt;
* Phantom objects can never receive trigger collision events.&lt;br /&gt;
* llVolumeDetect(TRUE) objects get trigger collision_start and collision_end but not collision() events.&lt;br /&gt;
* A collision with a hovering avatar does not trigger collisions, unless the avatar turns or moves.&lt;br /&gt;
* Only a physical object will get collision events from colliding with a non-physical object.&lt;br /&gt;
|examples=&amp;lt;lsl&amp;gt;//Will turn phantom when someone bumps into it if on the list&lt;br /&gt;
&lt;br /&gt;
list access_list = [&amp;quot;Governor Linden&amp;quot;];&lt;br /&gt;
&lt;br /&gt;
default&lt;br /&gt;
{&lt;br /&gt;
    collision(integer num_detected)&lt;br /&gt;
    {&lt;br /&gt;
        if(~llListFindList(access_list, (list)llDetectedName(0)))&lt;br /&gt;
        {&lt;br /&gt;
            llSetStatus(STATUS_PHANTOM, TRUE);&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
}&amp;lt;/lsl&amp;gt;&lt;br /&gt;
|helpers&lt;br /&gt;
|also_header&lt;br /&gt;
|also_events=&lt;br /&gt;
{{LSL DefineRow||[[collision_start]]|}}&lt;br /&gt;
{{LSL DefineRow||[[collision_end]]|}}&lt;br /&gt;
|also_functions={{LSL DefineRow||[[llPassCollisions]]|}}&lt;br /&gt;
{{LSL DefineRow||[[llCollisionFilter]]|}}&lt;br /&gt;
{{LSL DefineRow||[[llCollisionSound]]|}}&lt;br /&gt;
{{LSL DefineRow||[[llCollisionSprite]]|}}&lt;br /&gt;
{{LSL DefineRow||[[llVolumeDetect]]|}}&lt;br /&gt;
|also_articles&lt;br /&gt;
|also_footer&lt;br /&gt;
|notes&lt;br /&gt;
|issues&lt;br /&gt;
|cat1=Collision&lt;br /&gt;
|cat2=Detected&lt;br /&gt;
|cat3=Collision Events&lt;br /&gt;
|cat4}}&lt;/div&gt;</summary>
		<author><name>Kayaker Magic</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=Collision_start&amp;diff=1015493</id>
		<title>Collision start</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=Collision_start&amp;diff=1015493"/>
		<updated>2010-08-23T21:13:21Z</updated>

		<summary type="html">&lt;p&gt;Kayaker Magic: oops, missed one bullet&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Issues/SVC-3306}}{{LSL_Event|event_id=5|event_delay|event=collision_start&lt;br /&gt;
|p1_type=integer|p1_name=num_detected|p1_desc&lt;br /&gt;
|event_desc=Triggered when task starts colliding with another task&lt;br /&gt;
|constants&lt;br /&gt;
|spec&lt;br /&gt;
|caveats=&lt;br /&gt;
* Will not detect collisions with ground.  Use [[land_collision_start]] instead.&lt;br /&gt;
* Phantom objects can never receive trigger collision events.&lt;br /&gt;
* llVolumeDetect(TRUE) objects get trigger collision_start and collision_end but not collision() events.&lt;br /&gt;
* A collision with a hovering avatar does not trigger collisions, unless the avatar turns or moves.&lt;br /&gt;
* Only a physical object will get collision events from colliding with a non-physical object.&lt;br /&gt;
|examples=&amp;lt;lsl&amp;gt;default&lt;br /&gt;
{&lt;br /&gt;
    collision_start(integer num)&lt;br /&gt;
    {&lt;br /&gt;
        llSay(0,&amp;quot;No pushing.&amp;quot;);&lt;br /&gt;
    }&lt;br /&gt;
}&amp;lt;/lsl&amp;gt;&lt;br /&gt;
|helpers&lt;br /&gt;
|also_header&lt;br /&gt;
|also_events={{LSL DefineRow||[[collision]]|}}&lt;br /&gt;
{{LSL DefineRow||[[collision_end]]|}}&lt;br /&gt;
|also_functions={{LSL DefineRow||[[llPassCollisions]]|}}&lt;br /&gt;
{{LSL DefineRow||[[llCollisionFilter]]|}}&lt;br /&gt;
{{LSL DefineRow||[[llCollisionSound]]|}}&lt;br /&gt;
{{LSL DefineRow||[[llCollisionSprite]]|}}&lt;br /&gt;
{{LSL DefineRow||[[llVolumeDetect]]|}}&lt;br /&gt;
|also_articles&lt;br /&gt;
|also_footer&lt;br /&gt;
|notes&lt;br /&gt;
|mode&lt;br /&gt;
|issues&lt;br /&gt;
|cat1=Collision&lt;br /&gt;
|cat2=Detected&lt;br /&gt;
|cat3=Collision Events&lt;br /&gt;
|cat4&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Kayaker Magic</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=Collision_start&amp;diff=1015483</id>
		<title>Collision start</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=Collision_start&amp;diff=1015483"/>
		<updated>2010-08-23T21:12:13Z</updated>

		<summary type="html">&lt;p&gt;Kayaker Magic: Listed times when collisions will won&amp;#039;t work in the caveats.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Issues/SVC-3306}}{{LSL_Event|event_id=5|event_delay|event=collision_start&lt;br /&gt;
|p1_type=integer|p1_name=num_detected|p1_desc&lt;br /&gt;
|event_desc=Triggered when task starts colliding with another task&lt;br /&gt;
|constants&lt;br /&gt;
|spec&lt;br /&gt;
|caveats=&lt;br /&gt;
* Will not detect collisions with ground.  Use [[land_collision_start]] instead.&lt;br /&gt;
* Phantom objects can never receive trigger collision events.&lt;br /&gt;
llVolumeDetect(TRUE) objects get trigger collision_start and collision_end but not collision() events.&lt;br /&gt;
* A collision with a hovering avatar does not trigger collisions, unless the avatar turns or moves.&lt;br /&gt;
* Only a physical object will get collision events from colliding with a non-physical object.&lt;br /&gt;
|examples=&amp;lt;lsl&amp;gt;default&lt;br /&gt;
{&lt;br /&gt;
    collision_start(integer num)&lt;br /&gt;
    {&lt;br /&gt;
        llSay(0,&amp;quot;No pushing.&amp;quot;);&lt;br /&gt;
    }&lt;br /&gt;
}&amp;lt;/lsl&amp;gt;&lt;br /&gt;
|helpers&lt;br /&gt;
|also_header&lt;br /&gt;
|also_events={{LSL DefineRow||[[collision]]|}}&lt;br /&gt;
{{LSL DefineRow||[[collision_end]]|}}&lt;br /&gt;
|also_functions={{LSL DefineRow||[[llPassCollisions]]|}}&lt;br /&gt;
{{LSL DefineRow||[[llCollisionFilter]]|}}&lt;br /&gt;
{{LSL DefineRow||[[llCollisionSound]]|}}&lt;br /&gt;
{{LSL DefineRow||[[llCollisionSprite]]|}}&lt;br /&gt;
{{LSL DefineRow||[[llVolumeDetect]]|}}&lt;br /&gt;
|also_articles&lt;br /&gt;
|also_footer&lt;br /&gt;
|notes&lt;br /&gt;
|mode&lt;br /&gt;
|issues&lt;br /&gt;
|cat1=Collision&lt;br /&gt;
|cat2=Detected&lt;br /&gt;
|cat3=Collision Events&lt;br /&gt;
|cat4&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Kayaker Magic</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=LlSitTarget&amp;diff=1015163</id>
		<title>LlSitTarget</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=LlSitTarget&amp;diff=1015163"/>
		<updated>2010-08-23T02:36:00Z</updated>

		<summary type="html">&lt;p&gt;Kayaker Magic: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{LSL_Function&lt;br /&gt;
|func_id=238|func_sleep=0.0|func_energy=10.0&lt;br /&gt;
|sort=SitTarget&lt;br /&gt;
|func=llSitTarget&lt;br /&gt;
|p1_type=vector|p1_name=offset|p1_desc=Additional position for the sit target in local prim coordinates.&lt;br /&gt;
|p2_type=rotation|p2_name=rot|p2_desc=Additional rotation for the sit target relative to the prim rotation.&lt;br /&gt;
|func_footnote=If &#039;&#039;&#039;offset&#039;&#039;&#039; == [[ZERO_VECTOR|{{LSL VR|0.0|0.0|0.0}}]] then the sit target is removed.&lt;br /&gt;
|func_desc=Set the sit location for the prim. The sit location is relative to the prim&#039;s position and rotation.&lt;br /&gt;
|return_text&lt;br /&gt;
|spec=llSitTarget sets the position for the Agent Target (Advanced -&amp;gt; Character -&amp;gt; View Agent Target). The position of the target is based on &#039;&#039;&#039;rot&#039;&#039;&#039; and the &#039;&#039;&#039;offset&#039;&#039;&#039;{{Footnote|It is widely considered that the &#039;&#039;&#039;rot&#039;&#039;&#039; should not affect the position, unfortunately the sit target code is a {{Wikipedia|Lava_flow_(programming)|lava-flow}}. ~ {{JIRA|SVC-2277}}|It is widely considered that the &#039;&#039;&#039;rot&#039;&#039;&#039; should not affect the position, unfortunately the sit target code is a lava-flow. - SVC-2277|handle=rot-offset}}.&lt;br /&gt;
|caveats=*Once a sit target is removed [[llAvatarOnSitTarget]] will only return {{LSL_Constant/NULL_KEY}}.&lt;br /&gt;
*Removing or deactivating the script that sets the sit target will not remove the prim&#039;s sit target.&lt;br /&gt;
**Sit target is a prim property and not dependent on a script for its continued existence. &lt;br /&gt;
*To remove sit target, use the following: &lt;br /&gt;
&amp;lt;lsl&amp;gt;llSitTarget(ZERO_VECTOR,ZERO_ROTATION);&amp;lt;/lsl&amp;gt;&lt;br /&gt;
*Shift-copying a prim with a sit target, without a script that will set the sit target again, will not keep the sit target on the copy. (The copy is in the original location when shift-copying.)&lt;br /&gt;
*There is no way to remove the Sit option from the pie menu.&lt;br /&gt;
**It will appear to be removed if the [[llSetSitText]] is set to a space &amp;quot;&amp;amp;nbsp;&amp;quot; or similar transparent string.&lt;br /&gt;
*Attachments cannot be sat upon.&lt;br /&gt;
*&#039;&#039;&#039;rot&#039;&#039;&#039; affects the position of the sit-target in a buggy way way.&lt;br /&gt;
**To correct for the &#039;&#039;rot&#039;&#039; bug, simply subtract &amp;lt;0,0,0.4&amp;gt; from the position when &#039;&#039;rot&#039;&#039; is zero. See example below.&lt;br /&gt;
**[[llSetLinkPrimitiveParams]] is a more difficult work-around.&lt;br /&gt;
**Animations are relative to the Agent Target, but the Agent Target isn&#039;t described by the animation.&lt;br /&gt;
*[[llSitTarget]] does not update position of an already seated avatar.&lt;br /&gt;
**[[#UpdateSitTarget|UpdateSitTarget]] described below works around this problem. It works by converting the sit target information into a link position that is passed along to [[llSetLinkPrimitiveParams]]. &lt;br /&gt;
* &#039;&#039;&#039;offset&#039;&#039;&#039; is limited to 300.0 meters on each axis. The x, y and z components must be in the range {{Interval|lte=300.0|gte=-300}}{{Footnote|handle=interval}}.&lt;br /&gt;
** If they are outside the acceptable range they are rounded to the closest limit.&lt;br /&gt;
|constants&lt;br /&gt;
|examples=&lt;br /&gt;
&amp;lt;lsl&amp;gt;default&lt;br /&gt;
{&lt;br /&gt;
    state_entry()&lt;br /&gt;
    {&lt;br /&gt;
        llSitTarget(&amp;lt;0.0, 0.0, 1.0&amp;gt;, ZERO_ROTATION); //The vector&#039;s components must not all be set to 0 for effect to take place.&lt;br /&gt;
    }&lt;br /&gt;
}&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&amp;lt;lsl&amp;gt;default     //example with work-around for llSetTarget rot bug&lt;br /&gt;
{           //place in any prim large enough to sit on at any angle&lt;br /&gt;
            //click once to choose a place to sit, a second time to sit there&lt;br /&gt;
    touch_start(integer num)&lt;br /&gt;
    {&lt;br /&gt;
        vector pos=llDetectedTouchPos(0);       //use touch to set sit target&lt;br /&gt;
        vector lft=llDetectedTouchBinormal(0);  //use normals to rotate avatar to&lt;br /&gt;
        vector up=llDetectedTouchNormal(0);     //sit upright&lt;br /&gt;
        rotation rot=llAxes2Rot(lft%up,lft,up)/llGetRot();  //rotate avatar to stand there&lt;br /&gt;
        vector siz=llGetAgentSize(llDetectedKey(0));&lt;br /&gt;
        pos += 0.65*siz.z*up;       //this places MY avatars feet close to the surface&lt;br /&gt;
        pos = (pos-llGetPos())/llGetRot();  //llSetTarget expects local co-ordinates&lt;br /&gt;
        if (rot!=ZERO_ROTATION) pos -=&amp;lt;0,0,0.4&amp;gt;;  //here is the work around&lt;br /&gt;
        llSitTarget(pos,rot);&lt;br /&gt;
        llSetClickAction(CLICK_ACTION_SIT);   //switch to sit for second click&lt;br /&gt;
    }&lt;br /&gt;
    changed(integer change)&lt;br /&gt;
    {&lt;br /&gt;
        if (llAvatarOnSitTarget()==NULL_KEY)    //if they unsit,&lt;br /&gt;
            llSetClickAction(CLICK_ACTION_TOUCH);   //go back to click mode&lt;br /&gt;
    }&lt;br /&gt;
}&amp;lt;/lsl&amp;gt;&lt;br /&gt;
|helpers= ===UpdateSitTarget===&lt;br /&gt;
&amp;lt;lsl&amp;gt;//Sets / Updates the sit target moving the avatar on it if necessary.&lt;br /&gt;
UpdateSitTarget(vector pos, rotation rot)&lt;br /&gt;
{//Using this while the object is moving may give unpredictable results.&lt;br /&gt;
    llSitTarget(pos, rot);//Set the sit target&lt;br /&gt;
    key user = llAvatarOnSitTarget();&lt;br /&gt;
    if(user)//true if there is a user seated on the sittarget, if so update their position&lt;br /&gt;
    {&lt;br /&gt;
        vector size = llGetAgentSize(user);&lt;br /&gt;
        if(size)//This tests to make sure the user really exists.&lt;br /&gt;
        {&lt;br /&gt;
            //We need to make the position and rotation local to the current prim&lt;br /&gt;
            rotation localrot = ZERO_ROTATION;&lt;br /&gt;
            vector localpos = ZERO_VECTOR;&lt;br /&gt;
            if(llGetLinkNumber() &amp;gt; 1)//only need the local rot if it&#039;s not the root.&lt;br /&gt;
            {&lt;br /&gt;
                localrot = llGetLocalRot();&lt;br /&gt;
                localpos = llGetLocalPos();&lt;br /&gt;
            }&lt;br /&gt;
            pos.z += 0.4;&lt;br /&gt;
            integer linkNum = llGetNumberOfPrims();&lt;br /&gt;
            do{&lt;br /&gt;
                if(user == llGetLinkKey( linkNum ))//just checking to make sure the index is valid.&lt;br /&gt;
                {&lt;br /&gt;
                    llSetLinkPrimitiveParams(linkNum,&lt;br /&gt;
                                            [PRIM_POSITION, ((pos - (llRot2Up(rot) * size.z * 0.02638)) * localrot) + localpos,&lt;br /&gt;
                                             PRIM_ROTATION, rot * localrot / llGetRootRotation()]);&lt;br /&gt;
                    jump end;//cheaper but a tad slower then return&lt;br /&gt;
                }&lt;br /&gt;
            }while( --linkNum );&lt;br /&gt;
        }&lt;br /&gt;
        else&lt;br /&gt;
        {//It is rare that the sit target will bork but it does happen, this can help to fix it.&lt;br /&gt;
            llUnSit(user);&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
    @end;&lt;br /&gt;
}//Written by Strife Onizuka, size adjustment provided by Escort DeFarge&amp;lt;/lsl&amp;gt;&lt;br /&gt;
===GetSitTarget===&lt;br /&gt;
&amp;lt;lsl&amp;gt;list GetSitTarget(integer prim, key av)&lt;br /&gt;
{//WARNING: llGetObjectDetails can introduce an error that goes as far as the 5th decimal place!&lt;br /&gt;
 //This is highly unlikely to be ever noticed unless compounded over time.&lt;br /&gt;
 //Do not use while moving (like in a moving vehicle)!!!&lt;br /&gt;
    vector tp = llGetAgentSize(av);&lt;br /&gt;
    if(tp)&lt;br /&gt;
    {&lt;br /&gt;
        if(prim == LINK_THIS)//llGetLinkKey doesn&#039;t like LINK_THIS&lt;br /&gt;
            prim = llGetLinkNumber();&lt;br /&gt;
        &lt;br /&gt;
        list details = [OBJECT_POS, OBJECT_ROT];&lt;br /&gt;
        rotation f = llList2Rot(details = (llGetObjectDetails(llGetLinkKey(prim), details) + llGetObjectDetails(av, details)), 1);&lt;br /&gt;
        rotation r = llList2Rot(details, 3) / f;&lt;br /&gt;
	&lt;br /&gt;
        return [((llList2Vector(details, 2) - llList2Vector(details, 0)) / f) + (llRot2Up(r) * tp.z * 0.02638) - &amp;lt;0.0, 0.0, 0.4&amp;gt;, r];&lt;br /&gt;
    }&lt;br /&gt;
    return [];&lt;br /&gt;
}//Written by Strife Onizuka&amp;lt;/lsl&amp;gt;&lt;br /&gt;
|also_functions={{LSL DefineRow||[[llSetSitText]]|}}&lt;br /&gt;
{{LSL DefineRow||[[llAvatarOnSitTarget]]|}}&lt;br /&gt;
{{LSL DefineRow||[[llUnSit]]|}}&lt;br /&gt;
|also_events={{LSL DefineRow||[[changed]]|}}&lt;br /&gt;
|also_articles&lt;br /&gt;
|notes&lt;br /&gt;
|cat1=Sit&lt;br /&gt;
|cat2=Vehicle&lt;br /&gt;
|cat3=Prim&lt;br /&gt;
|cat4=Effects&lt;br /&gt;
|cat5=Teleport&lt;br /&gt;
|cat6=Stop&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Kayaker Magic</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=LlGetLinkName&amp;diff=466742</id>
		<title>LlGetLinkName</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=LlGetLinkName&amp;diff=466742"/>
		<updated>2009-08-20T02:08:03Z</updated>

		<summary type="html">&lt;p&gt;Kayaker Magic: Most of the LINK_* constants do not apply, and LINK_THIS does not work properly.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{LSL_Function/link|linknum|}}{{LSL_Function/limits}}&lt;br /&gt;
{{LSL_Function&lt;br /&gt;
|func_id=145|func_sleep=0.0|func_energy=10.0&lt;br /&gt;
|func=llGetLinkName&lt;br /&gt;
|return_type=string|p1_type=integer|p1_name=linknum&lt;br /&gt;
|func_footnote&lt;br /&gt;
|func_desc&lt;br /&gt;
|return_text=that is the name of &#039;&#039;&#039;linknum&#039;&#039;&#039; in link set&lt;br /&gt;
|spec&lt;br /&gt;
|caveats=*The prim name attribute is limited to 63 bytes, any string longer then that will be truncated. This truncation does not always happen when the attribute is set or read.&lt;br /&gt;
*The only LINK_* flag that &#039;&#039;&#039;linknum&#039;&#039;&#039; currently supports  is [[LINK_ROOT]]. [[#SVC-3510|SVC-3510]]&lt;br /&gt;
**Use [[llGetLinkNumber]]() as the parameter to retreive the prim&#039;s name, not [[LINK_THIS]].&lt;br /&gt;
|constants&lt;br /&gt;
|examples=Listen on channel 10 for a name; check if a prim with that name is part of this object&lt;br /&gt;
&amp;lt;lsl&amp;gt;&lt;br /&gt;
integer check_for_prim(string name)&lt;br /&gt;
{&lt;br /&gt;
    integer i = llGetNumberOfPrims();&lt;br /&gt;
    for (; i &amp;gt;= 0; --i)&lt;br /&gt;
    {&lt;br /&gt;
        if (llGetLinkName(i) == name)&lt;br /&gt;
        {&lt;br /&gt;
            return TRUE;&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
    return FALSE;&lt;br /&gt;
}&lt;br /&gt;
default&lt;br /&gt;
{&lt;br /&gt;
    state_entry()&lt;br /&gt;
    {&lt;br /&gt;
        llListen(10, &amp;quot;&amp;quot;, llGetOwner(), &amp;quot;&amp;quot;);&lt;br /&gt;
    }&lt;br /&gt;
    listen(integer chan, string obj, key id, string msg)&lt;br /&gt;
    {&lt;br /&gt;
        if (check_for_prim(msg))&lt;br /&gt;
        {&lt;br /&gt;
            llOwnerSay(&amp;quot;found a linked prim named \&amp;quot;&amp;quot; + msg + &amp;quot;\&amp;quot;&amp;quot;);&lt;br /&gt;
        }&lt;br /&gt;
        else&lt;br /&gt;
        {&lt;br /&gt;
            llOwnerSay(&amp;quot;this object does not have any linked prims named \&amp;quot;&amp;quot; + msg + &amp;quot;\&amp;quot;&amp;quot;);&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
}&amp;lt;/lsl&amp;gt;&lt;br /&gt;
|helpers&lt;br /&gt;
|also_functions=&lt;br /&gt;
{{LSL DefineRow||[[llGetLinkKey]]|Gets the instance UUID of the link}}&lt;br /&gt;
{{LSL DefineRow||[[llGetObjectName]]|Get the prims name}}&lt;br /&gt;
{{LSL DefineRow||[[llSetObjectName]]|Set the prims name}}&lt;br /&gt;
{{LSL DefineRow||[[llGetObjectDesc]]|Get the prims description}}&lt;br /&gt;
{{LSL DefineRow||[[llSetObjectDesc]]|Set the prims description}}&lt;br /&gt;
{{LSL DefineRow||[[llGetObjectDetails]]}}&lt;br /&gt;
|also_tests&lt;br /&gt;
|also_events&lt;br /&gt;
|also_articles=&lt;br /&gt;
{{LSL DefineRow||[[Prim Attribute Overloading]]}}&lt;br /&gt;
|notes&lt;br /&gt;
|cat1=Link&lt;br /&gt;
|cat2=Link/Get&lt;br /&gt;
|cat3&lt;br /&gt;
|cat4&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Kayaker Magic</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=LlBreakLink&amp;diff=170003</id>
		<title>LlBreakLink</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=LlBreakLink&amp;diff=170003"/>
		<updated>2008-12-10T06:12:04Z</updated>

		<summary type="html">&lt;p&gt;Kayaker Magic: changing order of caveats&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{LSL_Function/link|linknum}}&lt;br /&gt;
{{LSL_Function/permission|PERMISSION_CHANGE_LINKS|grant=the owner}}&lt;br /&gt;
{{LSL_Function|func_id=142|func_sleep=0.0|func_energy=10.0|func=llBreakLink&lt;br /&gt;
|p1_type=integer|p1_name=linknum&lt;br /&gt;
|func_desc=Delinks the prim with the given link number in a linked object set&lt;br /&gt;
|func_footnote&lt;br /&gt;
|return_text&lt;br /&gt;
|spec&lt;br /&gt;
|caveats=*This function removes sitting avatars from the object, even if not sitting on the unlinked prim.&lt;br /&gt;
*This function silently fails if called from a script inside an attachment.&lt;br /&gt;
*This function fails if the owner does not have edit permissions on the object containing the script, the system message &amp;quot;&#039;&#039;Delink failed because you do not have edit permission&#039;&#039;&amp;quot; is received by the owner.&lt;br /&gt;
*A prim with PERMISSION_CHANGE_LINKS can delink any prim in the linked object set even itself or the root&lt;br /&gt;
*LINK_ROOT delinks only the root prim, even if that is this prim&lt;br /&gt;
*LINK_THIS does not unlink this prim: It delinks the root prim, unless the root prim is this one. In that case LINK_THIS unlinks the first child prim&lt;br /&gt;
*Use llGetLinkNumber() as the parameter to unlink this prim, not LINK_THIS&lt;br /&gt;
*Link_ALL_CHILDREN, LINK_SET and LINK_ALL_OTHERS behave exactly the same as LINK_THIS&lt;br /&gt;
|constants&lt;br /&gt;
|examples=&lt;br /&gt;
&amp;lt;lsl&amp;gt;//-- requests permission to change links, then breaks the link&lt;br /&gt;
//-- between the prim and the rest of the object, on touch.&lt;br /&gt;
default{&lt;br /&gt;
  state_entry(){&lt;br /&gt;
    llRequestPermissions( llGetOwner(), PERMISSION_CHANGE_LINKS );&lt;br /&gt;
  }&lt;br /&gt;
 &lt;br /&gt;
  touch_start( integer vIntTouched ){&lt;br /&gt;
    llBreakLink( llGetLinkNumber() );&lt;br /&gt;
  }&lt;br /&gt;
}&amp;lt;/lsl&amp;gt;&lt;br /&gt;
|helpers&lt;br /&gt;
|also_functions={{LSL DefineRow||[[llBreakAllLinks]]|Break all links}}&lt;br /&gt;
{{LSL DefineRow||[[llCreateLink]]|Link to another object}}&lt;br /&gt;
|also_tests&lt;br /&gt;
|also_events={{LSL DefineRow||[[changed]]|[[CHANGED_LINK]]}}&lt;br /&gt;
|also_articles&lt;br /&gt;
|notes&lt;br /&gt;
|permission&lt;br /&gt;
|cat1=Link&lt;br /&gt;
|cat2=Link/Management&lt;br /&gt;
|cat3&lt;br /&gt;
|cat4&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Kayaker Magic</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=LlBreakLink&amp;diff=169993</id>
		<title>LlBreakLink</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=LlBreakLink&amp;diff=169993"/>
		<updated>2008-12-10T06:07:36Z</updated>

		<summary type="html">&lt;p&gt;Kayaker Magic: some spelling and capitalization&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{LSL_Function/link|linknum}}&lt;br /&gt;
{{LSL_Function/permission|PERMISSION_CHANGE_LINKS|grant=the owner}}&lt;br /&gt;
{{LSL_Function|func_id=142|func_sleep=0.0|func_energy=10.0|func=llBreakLink&lt;br /&gt;
|p1_type=integer|p1_name=linknum&lt;br /&gt;
|func_desc=Delinks the prim with the given link number in a linked object set&lt;br /&gt;
|func_footnote&lt;br /&gt;
|return_text&lt;br /&gt;
|spec&lt;br /&gt;
|caveats=*This function removes sitting avatars from the object, even if not sitting on the unlinked prim.&lt;br /&gt;
*This function silently fails if called from a script inside an attachment.&lt;br /&gt;
*This function fails if the owner does not have edit permissions on the object containing the script, the system message &amp;quot;&#039;&#039;Delink failed because you do not have edit permission&#039;&#039;&amp;quot; is received by the owner.&lt;br /&gt;
*A prim with PERMISSION_CHANGE_LINKS can delink any prim in the linked object set even itself or the root&lt;br /&gt;
*Use llGetLinkNumber() as the parameter to unlink this prim&lt;br /&gt;
*LINK_ROOT delinks only the root prim, even if that is this prim&lt;br /&gt;
*LINK_THIS does not unlink this prim: It delinks the root prim, unless the root prim is this one. In that case LINK_THIS unlinks the first child prim&lt;br /&gt;
*Link_ALL_CHILDREN, LINK_SET and LINK_ALL_OTHERS behave exactly the same as LINK_THIS&lt;br /&gt;
|constants&lt;br /&gt;
|examples=&lt;br /&gt;
&amp;lt;lsl&amp;gt;//-- requests permission to change links, then breaks the link&lt;br /&gt;
//-- between the prim and the rest of the object, on touch.&lt;br /&gt;
default{&lt;br /&gt;
  state_entry(){&lt;br /&gt;
    llRequestPermissions( llGetOwner(), PERMISSION_CHANGE_LINKS );&lt;br /&gt;
  }&lt;br /&gt;
 &lt;br /&gt;
  touch_start( integer vIntTouched ){&lt;br /&gt;
    llBreakLink( llGetLinkNumber() );&lt;br /&gt;
  }&lt;br /&gt;
}&amp;lt;/lsl&amp;gt;&lt;br /&gt;
|helpers&lt;br /&gt;
|also_functions={{LSL DefineRow||[[llBreakAllLinks]]|Break all links}}&lt;br /&gt;
{{LSL DefineRow||[[llCreateLink]]|Link to another object}}&lt;br /&gt;
|also_tests&lt;br /&gt;
|also_events={{LSL DefineRow||[[changed]]|[[CHANGED_LINK]]}}&lt;br /&gt;
|also_articles&lt;br /&gt;
|notes&lt;br /&gt;
|permission&lt;br /&gt;
|cat1=Link&lt;br /&gt;
|cat2=Link/Management&lt;br /&gt;
|cat3&lt;br /&gt;
|cat4&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Kayaker Magic</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=LlBreakLink&amp;diff=169983</id>
		<title>LlBreakLink</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=LlBreakLink&amp;diff=169983"/>
		<updated>2008-12-10T06:05:22Z</updated>

		<summary type="html">&lt;p&gt;Kayaker Magic: Clariffying the behavior of the LINK_* flags&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{LSL_Function/link|linknum}}&lt;br /&gt;
{{LSL_Function/permission|PERMISSION_CHANGE_LINKS|grant=the owner}}&lt;br /&gt;
{{LSL_Function|func_id=142|func_sleep=0.0|func_energy=10.0|func=llBreakLink&lt;br /&gt;
|p1_type=integer|p1_name=linknum&lt;br /&gt;
|func_desc=Delinks the prim with the given link number in a linked object set&lt;br /&gt;
|func_footnote&lt;br /&gt;
|return_text&lt;br /&gt;
|spec&lt;br /&gt;
|caveats=*This function removes sitting avatars from the object, even if not sitting on the unlinked prim.&lt;br /&gt;
*This function silently fails if called from a script inside an attachment.&lt;br /&gt;
*This function fails if the owner does not have edit permissions on the object containing the script, the system message &amp;quot;&#039;&#039;Delink failed because you do not have edit permission&#039;&#039;&amp;quot; is received by the owner.&lt;br /&gt;
*A prim with PERMISSION_CHANGE_LINKS can delink any prim in the linked object set even itself or the root&lt;br /&gt;
*Use llGetLinkNumber() as the parameter to unlink this prim&lt;br /&gt;
*LINK_ROOT delinks only the root prim, even if that is this prim&lt;br /&gt;
*LINK_THIS does not unlink this prim: Tt delinks the root prim, unless the root prim is this one. In that case LINK_This unlinks the first child prim&lt;br /&gt;
*Link_ALL_CHILDREN, LINK_SET and LINK_ALL_OTHERS behave exactly the same as LINK_THIS&lt;br /&gt;
|constants&lt;br /&gt;
|examples=&lt;br /&gt;
&amp;lt;lsl&amp;gt;//-- requests permission to change links, then breaks the link&lt;br /&gt;
//-- between the prim and the rest of the object, on touch.&lt;br /&gt;
default{&lt;br /&gt;
  state_entry(){&lt;br /&gt;
    llRequestPermissions( llGetOwner(), PERMISSION_CHANGE_LINKS );&lt;br /&gt;
  }&lt;br /&gt;
 &lt;br /&gt;
  touch_start( integer vIntTouched ){&lt;br /&gt;
    llBreakLink( llGetLinkNumber() );&lt;br /&gt;
  }&lt;br /&gt;
}&amp;lt;/lsl&amp;gt;&lt;br /&gt;
|helpers&lt;br /&gt;
|also_functions={{LSL DefineRow||[[llBreakAllLinks]]|Break all links}}&lt;br /&gt;
{{LSL DefineRow||[[llCreateLink]]|Link to another object}}&lt;br /&gt;
|also_tests&lt;br /&gt;
|also_events={{LSL DefineRow||[[changed]]|[[CHANGED_LINK]]}}&lt;br /&gt;
|also_articles&lt;br /&gt;
|notes&lt;br /&gt;
|permission&lt;br /&gt;
|cat1=Link&lt;br /&gt;
|cat2=Link/Management&lt;br /&gt;
|cat3&lt;br /&gt;
|cat4&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Kayaker Magic</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=LlBreakLink&amp;diff=169963</id>
		<title>LlBreakLink</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=LlBreakLink&amp;diff=169963"/>
		<updated>2008-12-10T05:52:59Z</updated>

		<summary type="html">&lt;p&gt;Kayaker Magic: Simplifying example, the run_time_permissions state is not necessary if you grant before touching&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{LSL_Function/link|linknum}}&lt;br /&gt;
{{LSL_Function/permission|PERMISSION_CHANGE_LINKS|grant=the owner}}&lt;br /&gt;
{{LSL_Function|func_id=142|func_sleep=0.0|func_energy=10.0|func=llBreakLink&lt;br /&gt;
|p1_type=integer|p1_name=linknum&lt;br /&gt;
|func_desc=Delinks the prim with the given link number in a linked object set&lt;br /&gt;
|func_footnote&lt;br /&gt;
|return_text&lt;br /&gt;
|spec&lt;br /&gt;
|caveats=*This function removes sitting avatars from the object, even if not sitting on the unlinked prim.&lt;br /&gt;
*This function silently fails if called from a script inside an attachment.&lt;br /&gt;
*This function fails if the owner does not have edit permissions on the object containing the script, the system message &amp;quot;&#039;&#039;Delink failed because you do not have edit permission&#039;&#039;&amp;quot; is received by the owner.&lt;br /&gt;
|constants&lt;br /&gt;
|examples=&lt;br /&gt;
&amp;lt;lsl&amp;gt;//-- requests permission to change links, then breaks the link&lt;br /&gt;
//-- between the prim and the rest of the object, on touch.&lt;br /&gt;
default{&lt;br /&gt;
  state_entry(){&lt;br /&gt;
    llRequestPermissions( llGetOwner(), PERMISSION_CHANGE_LINKS );&lt;br /&gt;
  }&lt;br /&gt;
 &lt;br /&gt;
  touch_start( integer vIntTouched ){&lt;br /&gt;
    llBreakLink( llGetLinkNumber() );&lt;br /&gt;
  }&lt;br /&gt;
}&amp;lt;/lsl&amp;gt;&lt;br /&gt;
|helpers&lt;br /&gt;
|also_functions={{LSL DefineRow||[[llBreakAllLinks]]|Break all links}}&lt;br /&gt;
{{LSL DefineRow||[[llCreateLink]]|Link to another object}}&lt;br /&gt;
|also_tests&lt;br /&gt;
|also_events={{LSL DefineRow||[[changed]]|[[CHANGED_LINK]]}}&lt;br /&gt;
|also_articles&lt;br /&gt;
|notes&lt;br /&gt;
|permission&lt;br /&gt;
|cat1=Link&lt;br /&gt;
|cat2=Link/Management&lt;br /&gt;
|cat3&lt;br /&gt;
|cat4&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Kayaker Magic</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=VEHICLE_HOVER_HEIGHT&amp;diff=141753</id>
		<title>VEHICLE HOVER HEIGHT</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=VEHICLE_HOVER_HEIGHT&amp;diff=141753"/>
		<updated>2008-11-14T20:56:40Z</updated>

		<summary type="html">&lt;p&gt;Kayaker Magic: set to zero to disable hover&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{LSL Constant&lt;br /&gt;
|name=VEHICLE_HOVER_HEIGHT&lt;br /&gt;
|type=integer&lt;br /&gt;
|value=24&lt;br /&gt;
|desc=height the vehicle will try to hover above ground. Set to zero to disable hover.&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;lsl&amp;gt;&lt;br /&gt;
&amp;lt;/lsl&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
|functions=&lt;br /&gt;
{{LSL DefineRow||[[llSetVehicleFloatParam]]|}}&lt;br /&gt;
|events=&lt;br /&gt;
&amp;lt;!--{{LSL DefineRow||[[changed]]|}}--&amp;gt;&lt;br /&gt;
|also_articles={{LSL DefineRow||[[Linden Vehicle Tutorial]]}}&lt;br /&gt;
|cat1&lt;br /&gt;
|cat2&lt;br /&gt;
|cat3&lt;br /&gt;
|cat4&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Kayaker Magic</name></author>
	</entry>
</feed>