<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd">
<HTML
><HEAD
><TITLE
>Linden Scripting Language Guide</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.79"></HEAD
><BODY
CLASS="book"
BGCOLOR="#FFFFFF"
TEXT="#000000"
LINK="#0000FF"
VLINK="#840084"
ALINK="#0000FF"
><DIV
CLASS="BOOK"
><A
NAME="AEN1"
></A
><DIV
CLASS="TITLEPAGE"
><H1
CLASS="title"
><A
NAME="AEN2"
>Linden Scripting Language Guide</A
></H1
><H3
CLASS="author"
><A
NAME="AEN4"
></A
>Aaron Brashears</H3
><H3
CLASS="author"
><A
NAME="AEN7"
></A
>Andrew Meadows</H3
><H3
CLASS="author"
><A
NAME="AEN10"
></A
>Cory Ondrejka</H3
><H3
CLASS="author"
><A
NAME="AEN13"
></A
>Doug Soo</H3
><H3
CLASS="author"
><A
NAME="AEN16"
></A
>Donald Kjer</H3
><P
CLASS="copyright"
>Copyright &copy; 2007 Linden Lab</P
><DIV
CLASS="legalnotice"
><P
></P
><A
NAME="AEN22"
></A
><P
><SPAN
CLASS="trademark"
>Linden Lab</SPAN
>&reg; and
      <SPAN
CLASS="trademark"
>Second Life</SPAN
>&reg; are registered
      trademarks of Linden Research, Inc.</P
><P
></P
></DIV
><HR></DIV
><DIV
CLASS="TOC"
><DL
><DT
><B
>Table of Contents</B
></DT
><DT
>1. <A
HREF="#AEN27"
>Introduction</A
></DT
><DT
>2. <A
HREF="#AEN33"
>Getting Started</A
></DT
><DD
><DL
><DT
>2.1. <A
HREF="#AEN36"
>Hello Avatar</A
></DT
><DD
><DL
><DT
>2.1.1. <A
HREF="#AEN50"
>Creating the Script</A
></DT
><DT
>2.1.2. <A
HREF="#AEN56"
>Default State</A
></DT
><DT
>2.1.3. <A
HREF="#AEN67"
>Functions</A
></DT
><DT
>2.1.4. <A
HREF="#AEN82"
>Touch Event</A
></DT
><DT
>2.1.5. <A
HREF="#AEN90"
>Try it Out</A
></DT
></DL
></DD
><DT
>2.2. <A
HREF="#AEN103"
>Using The Built-In Editor</A
></DT
><DT
>2.3. <A
HREF="#AEN106"
>Using Alternative Editors</A
></DT
></DL
></DD
><DT
>3. <A
HREF="#AEN109"
>Basics</A
></DT
><DD
><DL
><DT
>3.1. <A
HREF="#AEN112"
>Comments</A
></DT
><DT
>3.2. <A
HREF="#AEN129"
>Arithmetic Operations</A
></DT
><DD
><DL
><DT
>3.2.1. <A
HREF="#AEN132"
>Assignment</A
></DT
><DT
>3.2.2. <A
HREF="#AEN139"
>Hexadecimal Entry</A
></DT
><DT
>3.2.3. <A
HREF="#AEN145"
>Binary Arithmetic Operators</A
></DT
><DT
>3.2.4. <A
HREF="#AEN185"
>Boolean Operators</A
></DT
><DT
>3.2.5. <A
HREF="#AEN217"
>Bitwise Operators</A
></DT
></DL
></DD
><DT
>3.3. <A
HREF="#AEN237"
>Types</A
></DT
><DD
><DL
><DT
>3.3.1. <A
HREF="#AEN318"
>Type Conversion</A
></DT
></DL
></DD
><DT
>3.4. <A
HREF="#AEN360"
>Global Functions</A
></DT
><DT
>3.5. <A
HREF="#AEN365"
>Global Variables</A
></DT
><DT
>3.6. <A
HREF="#AEN373"
>Local Variables</A
></DT
></DL
></DD
><DT
>4. <A
HREF="#AEN378"
>Flow Control</A
></DT
><DD
><DL
><DT
>4.1. <A
HREF="#AEN381"
>Conditional Statements</A
></DT
><DT
>4.2. <A
HREF="#AEN394"
>Loop Constructs</A
></DT
><DD
><DL
><DT
>4.2.1. <A
HREF="#AEN397"
>for loop</A
></DT
><DT
>4.2.2. <A
HREF="#AEN403"
>do-while loop</A
></DT
><DT
>4.2.3. <A
HREF="#AEN409"
>while loop</A
></DT
></DL
></DD
><DT
>4.3. <A
HREF="#AEN415"
>Jumps</A
></DT
><DT
>4.4. <A
HREF="#AEN421"
>State Change</A
></DT
></DL
></DD
><DT
>5. <A
HREF="#AEN427"
>States</A
></DT
><DD
><DL
><DT
>5.1. <A
HREF="#AEN431"
>state_entry()</A
></DT
><DT
>5.2. <A
HREF="#AEN440"
>state_exit()</A
></DT
><DT
>5.3. <A
HREF="#AEN449"
>States vs. Global variables</A
></DT
></DL
></DD
><DT
>6. <A
HREF="#AEN452"
>Math</A
></DT
><DD
><DL
><DT
>6.1. <A
HREF="#AEN454"
>Tables of Functions</A
></DT
></DL
></DD
><DT
>7. <A
HREF="#AEN561"
>Strings</A
></DT
><DD
><DL
><DT
>7.1. <A
HREF="#AEN563"
>Tables of Functions</A
></DT
></DL
></DD
><DT
>8. <A
HREF="#AEN605"
>Lists</A
></DT
><DD
><DL
><DT
>8.1. <A
HREF="#AEN607"
>Tables of Functions</A
></DT
></DL
></DD
><DT
>9. <A
HREF="#AEN670"
>Communication</A
></DT
><DD
><DL
><DT
>9.1. <A
HREF="#AEN672"
>Tables of Functions</A
></DT
></DL
></DD
><DT
>10. <A
HREF="#AEN715"
>Inventory</A
></DT
><DD
><DL
><DT
>10.1. <A
HREF="#AEN717"
>Tables of Functions</A
></DT
></DL
></DD
><DT
>11. <A
HREF="#AEN768"
>Vehicles</A
></DT
><DD
><DL
><DT
>11.1. <A
HREF="#AEN790"
>Overview</A
></DT
><DT
>11.2. <A
HREF="#AEN801"
>Warnings</A
></DT
><DT
>11.3. <A
HREF="#AEN815"
>Definitions</A
></DT
><DT
>11.4. <A
HREF="#AEN826"
>Setting the Vehicle Type</A
></DT
><DT
>11.5. <A
HREF="#AEN837"
>Linear and Angular Deflection</A
></DT
><DT
>11.6. <A
HREF="#AEN853"
>Moving and Steering the Vehicle</A
></DT
><DT
>11.7. <A
HREF="#AEN866"
>The Linear Motor</A
></DT
><DT
>11.8. <A
HREF="#AEN898"
>The Angular Motor</A
></DT
><DT
>11.9. <A
HREF="#AEN921"
>Using the Camera to Steer</A
></DT
><DT
>11.10. <A
HREF="#AEN938"
>The Vertical Attractor</A
></DT
><DT
>11.11. <A
HREF="#AEN949"
>Banking</A
></DT
><DT
>11.12. <A
HREF="#AEN956"
>Friction Timescales</A
></DT
><DT
>11.13. <A
HREF="#AEN972"
>Buoyancy</A
></DT
><DT
>11.14. <A
HREF="#AEN979"
>Hover</A
></DT
><DT
>11.15. <A
HREF="#AEN990"
>Reference Frame</A
></DT
></DL
></DD
><DT
>A. <A
HREF="#AEN999"
>Linden Library Functions</A
></DT
><DD
><DL
><DT
>A.1. <A
HREF="#AEN1002"
>llAbs</A
></DT
><DT
>A.2. <A
HREF="#AEN1012"
>llAcos</A
></DT
><DT
>A.3. <A
HREF="#AEN1022"
>llAddToLandPassList</A
></DT
><DT
>A.4. <A
HREF="#AEN1035"
>llAdjustSoundVolume</A
></DT
><DT
>A.5. <A
HREF="#AEN1047"
>llAllowInventoryDrop</A
></DT
><DT
>A.6. <A
HREF="#AEN1057"
>llAngleBetween</A
></DT
><DT
>A.7. <A
HREF="#AEN1070"
>llApplyImpulse</A
></DT
><DT
>A.8. <A
HREF="#AEN1083"
>llApplyRotationalImpulse</A
></DT
><DT
>A.9. <A
HREF="#AEN1096"
>llAsin</A
></DT
><DT
>A.10. <A
HREF="#AEN1106"
>llAtan2</A
></DT
><DT
>A.11. <A
HREF="#AEN1119"
>llAttachToAvatar</A
></DT
><DT
>A.12. <A
HREF="#AEN1134"
>llAvatarOnSitTarget</A
></DT
><DT
>A.13. <A
HREF="#AEN1144"
>llAxes2Rot</A
></DT
><DT
>A.14. <A
HREF="#AEN1160"
>llAxisAngle2Rot</A
></DT
><DT
>A.15. <A
HREF="#AEN1173"
>llBase64ToString</A
></DT
><DT
>A.16. <A
HREF="#AEN1182"
>llBreakAllLinks</A
></DT
><DT
>A.17. <A
HREF="#AEN1191"
>llBreakLink</A
></DT
><DT
>A.18. <A
HREF="#AEN1202"
>llCSV2List</A
></DT
><DT
>A.19. <A
HREF="#AEN1212"
>llCeil</A
></DT
><DT
>A.20. <A
HREF="#AEN1222"
>llCloseRemoteDataChannel</A
></DT
><DT
>A.21. <A
HREF="#AEN1231"
>llCloud</A
></DT
><DT
>A.22. <A
HREF="#AEN1241"
>llCollisionFilter</A
></DT
><DT
>A.23. <A
HREF="#AEN1260"
>llCollisionSound</A
></DT
><DT
>A.24. <A
HREF="#AEN1272"
>llCollisionSprite</A
></DT
><DT
>A.25. <A
HREF="#AEN1282"
>llCos</A
></DT
><DT
>A.26. <A
HREF="#AEN1292"
>llCreateLink</A
></DT
><DT
>A.27. <A
HREF="#AEN1306"
>llDeleteSubList</A
></DT
><DT
>A.28. <A
HREF="#AEN1326"
>llDeleteSubString</A
></DT
><DT
>A.29. <A
HREF="#AEN1345"
>llDetachFromAvatar</A
></DT
><DT
>A.30. <A
HREF="#lib_lldetected"
>llDetectedGrab</A
></DT
><DT
>A.31. <A
HREF="#AEN1365"
>llDetectedGroup</A
></DT
><DT
>A.32. <A
HREF="#AEN1375"
>llDetectedKey</A
></DT
><DT
>A.33. <A
HREF="#AEN1386"
>llDetectedLinkNumber</A
></DT
><DT
>A.34. <A
HREF="#AEN1395"
>llDetectedName</A
></DT
><DT
>A.35. <A
HREF="#AEN1406"
>llDetectedOwner</A
></DT
><DT
>A.36. <A
HREF="#AEN1417"
>llDetectedPos</A
></DT
><DT
>A.37. <A
HREF="#AEN1428"
>llDetectedRot</A
></DT
><DT
>A.38. <A
HREF="#AEN1439"
>llDetectedType</A
></DT
><DT
>A.39. <A
HREF="#AEN1453"
>llDetectedVel</A
></DT
><DT
>A.40. <A
HREF="#AEN1464"
>llDialog</A
></DT
><DT
>A.41. <A
HREF="#AEN1481"
>llDie</A
></DT
><DT
>A.42. <A
HREF="#AEN1489"
>llDumpList2String</A
></DT
><DT
>A.43. <A
HREF="#AEN1500"
>llEscapeURL</A
></DT
><DT
>A.44. <A
HREF="#AEN1510"
>llEdgeOfWorld</A
></DT
><DT
>A.45. <A
HREF="#AEN1523"
>llEjectFromLand</A
></DT
><DT
>A.46. <A
HREF="#AEN1533"
>llEmail</A
></DT
><DT
>A.47. <A
HREF="#AEN1549"
>llEuler2Rot</A
></DT
><DT
>A.48. <A
HREF="#AEN1559"
>llFabs</A
></DT
><DT
>A.49. <A
HREF="#AEN1569"
>llFloor</A
></DT
><DT
>A.50. <A
HREF="#AEN1579"
>llFrand</A
></DT
><DT
>A.51. <A
HREF="#AEN1589"
>llGetAccel</A
></DT
><DT
>A.52. <A
HREF="#AEN1597"
>llGetAttached</A
></DT
><DT
>A.53. <A
HREF="#AEN1605"
>llGetAgentInfo</A
></DT
><DT
>A.54. <A
HREF="#AEN1616"
>llGetAgentSize</A
></DT
><DT
>A.55. <A
HREF="#AEN1626"
>llGetAlpha</A
></DT
><DT
>A.56. <A
HREF="#AEN1638"
>llGetAndResetTime</A
></DT
><DT
>A.57. <A
HREF="#AEN1648"
>llGetAnimation</A
></DT
><DT
>A.58. <A
HREF="#AEN1658"
>llGetAnimationList</A
></DT
><DT
>A.59. <A
HREF="#AEN1668"
>llGetBoundingBox</A
></DT
><DT
>A.60. <A
HREF="#AEN1678"
>llGetCenterOfMass</A
></DT
><DT
>A.61. <A
HREF="#AEN1686"
>llGetColor</A
></DT
><DT
>A.62. <A
HREF="#AEN1698"
>llGetCreator</A
></DT
><DT
>A.63. <A
HREF="#AEN1706"
>llGetDate</A
></DT
><DT
>A.64. <A
HREF="#AEN1714"
>llGetEnergy</A
></DT
><DT
>A.65. <A
HREF="#AEN1722"
>llGetForce</A
></DT
><DT
>A.66. <A
HREF="#AEN1730"
>llGetFreeMemory</A
></DT
><DT
>A.67. <A
HREF="#AEN1738"
>llGetGeometricCenter</A
></DT
><DT
>A.68. <A
HREF="#AEN1746"
>llGetGMTclock</A
></DT
><DT
>A.69. <A
HREF="#AEN1754"
>llGetInventoryCreator</A
></DT
><DT
>A.70. <A
HREF="#AEN1764"
>llGetInventoryKey</A
></DT
><DT
>A.71. <A
HREF="#AEN1774"
>llGetInventoryName</A
></DT
><DT
>A.72. <A
HREF="#AEN1789"
>llGetInventoryNumber</A
></DT
><DT
>A.73. <A
HREF="#AEN1801"
>llGetInventoryPermMask</A
></DT
><DT
>A.74. <A
HREF="#AEN1816"
>llGetInventoryType</A
></DT
><DT
>A.75. <A
HREF="#AEN1828"
>llGetKey</A
></DT
><DT
>A.76. <A
HREF="#AEN1836"
>llGetLandOwnerAt</A
></DT
><DT
>A.77. <A
HREF="#AEN1847"
>llGetLinkKey</A
></DT
><DT
>A.78. <A
HREF="#AEN1857"
>llGetLinkName</A
></DT
><DT
>A.79. <A
HREF="#AEN1867"
>llGetLinkNumber</A
></DT
><DT
>A.80. <A
HREF="#AEN1875"
>llGetListEntryType</A
></DT
><DT
>A.81. <A
HREF="#AEN1889"
>llGetListLength</A
></DT
><DT
>A.82. <A
HREF="#AEN1899"
>llGetLocalPos</A
></DT
><DT
>A.83. <A
HREF="#AEN1907"
>llGetLocalRot</A
></DT
><DT
>A.84. <A
HREF="#AEN1915"
>llGetMass</A
></DT
><DT
>A.85. <A
HREF="#AEN1923"
>llGetObjectMass</A
></DT
><DT
>A.86. <A
HREF="#AEN1933"
>llGetNextEmail</A
></DT
><DT
>A.87. <A
HREF="#AEN1946"
>llGetNotecardLine</A
></DT
><DT
>A.88. <A
HREF="#AEN1964"
>llGetNumberOfNotecardLines</A
></DT
><DT
>A.89. <A
HREF="#AEN1977"
>llGetNumberOfPrims</A
></DT
><DT
>A.90. <A
HREF="#AEN1985"
>llGetNumberOfSides</A
></DT
><DT
>A.91. <A
HREF="#AEN1993"
>llGetObjectDesc</A
></DT
><DT
>A.92. <A
HREF="#AEN2001"
>llGetObjectName</A
></DT
><DT
>A.93. <A
HREF="#AEN2009"
>llGetObjectPermMask</A
></DT
><DT
>A.94. <A
HREF="#AEN2022"
>llGetOmega</A
></DT
><DT
>A.95. <A
HREF="#AEN2030"
>llGetOwner</A
></DT
><DT
>A.96. <A
HREF="#AEN2038"
>llGetOwnerKey</A
></DT
><DT
>A.97. <A
HREF="#AEN2048"
>llGetPermissions</A
></DT
><DT
>A.98. <A
HREF="#AEN2058"
>llGetPermissionsKey</A
></DT
><DT
>A.99. <A
HREF="#AEN2067"
>llGetPos</A
></DT
><DT
>A.100. <A
HREF="#AEN2075"
>llGetPrimitiveParams</A
></DT
><DT
>A.101. <A
HREF="#AEN2092"
>llGetRegionCorner</A
></DT
><DT
>A.102. <A
HREF="#AEN2100"
>llGetRegionFPS</A
></DT
><DT
>A.103. <A
HREF="#AEN2108"
>llGetRegionName</A
></DT
><DT
>A.104. <A
HREF="#AEN2116"
>llGetRegionTimeDilation</A
></DT
><DT
>A.105. <A
HREF="#AEN2124"
>llGetRootPosition</A
></DT
><DT
>A.106. <A
HREF="#AEN2132"
>llGetRootRotation</A
></DT
><DT
>A.107. <A
HREF="#AEN2140"
>llGetRot</A
></DT
><DT
>A.108. <A
HREF="#AEN2148"
>llGetScale</A
></DT
><DT
>A.109. <A
HREF="#AEN2156"
>llGetScriptName</A
></DT
><DT
>A.110. <A
HREF="#AEN2164"
>llGetStartParameter</A
></DT
><DT
>A.111. <A
HREF="#AEN2174"
>llGetScriptState</A
></DT
><DT
>A.112. <A
HREF="#AEN2184"
>llGetStatus</A
></DT
><DT
>A.113. <A
HREF="#AEN2195"
>llGetSubString</A
></DT
><DT
>A.114. <A
HREF="#AEN2214"
>llGetSunDirection</A
></DT
><DT
>A.115. <A
HREF="#AEN2222"
>llGetTexture</A
></DT
><DT
>A.116. <A
HREF="#AEN2232"
>llGetTextureOffset</A
></DT
><DT
>A.117. <A
HREF="#AEN2242"
>llGetTextureRot</A
></DT
><DT
>A.118. <A
HREF="#AEN2252"
>llGetTextureScale</A
></DT
><DT
>A.119. <A
HREF="#AEN2262"
>llGetTime</A
></DT
><DT
>A.120. <A
HREF="#AEN2273"
>llGetTimeOfDay</A
></DT
><DT
>A.121. <A
HREF="#AEN2281"
>llGetTimestamp</A
></DT
><DT
>A.122. <A
HREF="#AEN2289"
>llGetTorque</A
></DT
><DT
>A.123. <A
HREF="#AEN2297"
>llGetVel</A
></DT
><DT
>A.124. <A
HREF="#AEN2306"
>llGetWallclock</A
></DT
><DT
>A.125. <A
HREF="#AEN2314"
>llGiveInventory</A
></DT
><DT
>A.126. <A
HREF="#AEN2326"
>llGiveInventoryList</A
></DT
><DT
>A.127. <A
HREF="#AEN2342"
>llGiveMoney</A
></DT
><DT
>A.128. <A
HREF="#AEN2356"
>llGround</A
></DT
><DT
>A.129. <A
HREF="#AEN2366"
>llGroundContour</A
></DT
><DT
>A.130. <A
HREF="#AEN2376"
>llGroundNormal</A
></DT
><DT
>A.131. <A
HREF="#AEN2386"
>llGroundRepel</A
></DT
><DT
>A.132. <A
HREF="#AEN2405"
>llGroundSlope</A
></DT
><DT
>A.133. <A
HREF="#AEN2415"
>llInsertString</A
></DT
><DT
>A.134. <A
HREF="#AEN2431"
>llInstantMessage</A
></DT
><DT
>A.135. <A
HREF="#AEN2444"
>llKey2Name</A
></DT
><DT
>A.136. <A
HREF="#AEN2454"
>llList2CSV</A
></DT
><DT
>A.137. <A
HREF="#AEN2464"
>llList2Float</A
></DT
><DT
>A.138. <A
HREF="#AEN2477"
>llList2Integer</A
></DT
><DT
>A.139. <A
HREF="#AEN2490"
>llList2Key</A
></DT
><DT
>A.140. <A
HREF="#AEN2503"
>llList2List</A
></DT
><DT
>A.141. <A
HREF="#AEN2526"
>llList2ListStrided</A
></DT
><DT
>A.142. <A
HREF="#AEN2544"
>llList2Rot</A
></DT
><DT
>A.143. <A
HREF="#AEN2557"
>llList2String</A
></DT
><DT
>A.144. <A
HREF="#AEN2570"
>llList2Vector</A
></DT
><DT
>A.145. <A
HREF="#AEN2583"
>llListFindList</A
></DT
><DT
>A.146. <A
HREF="#AEN2598"
>llListInsertList</A
></DT
><DT
>A.147. <A
HREF="#AEN2614"
>llListRandomize</A
></DT
><DT
>A.148. <A
HREF="#AEN2629"
>llListReplaceList</A
></DT
><DT
>A.149. <A
HREF="#AEN2648"
>llListSort</A
></DT
><DT
>A.150. <A
HREF="#AEN2665"
>llListen</A
></DT
><DT
>A.151. <A
HREF="#AEN2686"
>llListenControl</A
></DT
><DT
>A.152. <A
HREF="#AEN2701"
>llListenRemove</A
></DT
><DT
>A.153. <A
HREF="#AEN2712"
>llLoadURL</A
></DT
><DT
>A.154. <A
HREF="#AEN2731"
>llLog</A
></DT
><DT
>A.155. <A
HREF="#AEN2742"
>llLog10</A
></DT
><DT
>A.156. <A
HREF="#AEN2753"
>llLookAt</A
></DT
><DT
>A.157. <A
HREF="#AEN2773"
>llLoopSound</A
></DT
><DT
>A.158. <A
HREF="#AEN2790"
>llLoopSoundMaster</A
></DT
><DT
>A.159. <A
HREF="#AEN2802"
>llLoopSoundSlave</A
></DT
><DT
>A.160. <A
HREF="#AEN2814"
>llMakeExplosion</A
></DT
><DT
>A.161. <A
HREF="#AEN2836"
>llMakeFire</A
></DT
><DT
>A.162. <A
HREF="#AEN2858"
>llMakeFountain</A
></DT
><DT
>A.163. <A
HREF="#AEN2880"
>llMakeSmoke</A
></DT
><DT
>A.164. <A
HREF="#AEN2902"
>llMD5String</A
></DT
><DT
>A.165. <A
HREF="#AEN2919"
>llMessageLinked</A
></DT
><DT
>A.166. <A
HREF="#AEN2940"
>llMinEventDelay</A
></DT
><DT
>A.167. <A
HREF="#AEN2949"
>llModifyLand</A
></DT
><DT
>A.168. <A
HREF="#AEN2963"
>llModPow</A
></DT
><DT
>A.169. <A
HREF="#AEN2980"
>llMoveToTarget</A
></DT
><DT
>A.170. <A
HREF="#AEN2995"
>llOffsetTexture</A
></DT
><DT
>A.171. <A
HREF="#AEN3011"
>llOpenRemoteDataChannel</A
></DT
><DT
>A.172. <A
HREF="#AEN3019"
>llOverMyLand</A
></DT
><DT
>A.173. <A
HREF="#AEN3031"
>llParcelMediaCommandList</A
></DT
><DT
>A.174. <A
HREF="#AEN3091"
>llParcelMediaQuery</A
></DT
><DT
>A.175. <A
HREF="#AEN3105"
>llParseString2List</A
></DT
><DT
>A.176. <A
HREF="#AEN3127"
>llParseStringKeepNulls</A
></DT
><DT
>A.177. <A
HREF="#AEN3149"
>llParticleSystem</A
></DT
><DT
>A.178. <A
HREF="#AEN3162"
>llPassCollisions</A
></DT
><DT
>A.179. <A
HREF="#AEN3173"
>llPassTouches</A
></DT
><DT
>A.180. <A
HREF="#AEN3184"
>llPlaySound</A
></DT
><DT
>A.181. <A
HREF="#AEN3198"
>llPlaySoundSlave</A
></DT
><DT
>A.182. <A
HREF="#AEN3210"
>llPointAt</A
></DT
><DT
>A.183. <A
HREF="#AEN3220"
>llPow</A
></DT
><DT
>A.184. <A
HREF="#AEN3233"
>llPreloadSound</A
></DT
><DT
>A.185. <A
HREF="#AEN3243"
>llPushObject</A
></DT
><DT
>A.186. <A
HREF="#AEN3261"
>llReleaseControls</A
></DT
><DT
>A.187. <A
HREF="#AEN3271"
>llRemoteDataReply</A
></DT
><DT
>A.188. <A
HREF="#AEN3284"
>llRemoteDataSetRegion</A
></DT
><DT
>A.189. <A
HREF="#AEN3292"
>llRemoteLoadScript</A
></DT
><DT
>A.190. <A
HREF="#AEN3300"
>llRemoteLoadScriptPin</A
></DT
><DT
>A.191. <A
HREF="#AEN3325"
>llRemoveInventory</A
></DT
><DT
>A.192. <A
HREF="#AEN3335"
>llRemoveVehicleFlags</A
></DT
><DT
>A.193. <A
HREF="#AEN3346"
>llRequestAgentData</A
></DT
><DT
>A.194. <A
HREF="#AEN3363"
>llRequestInventoryData</A
></DT
><DT
>A.195. <A
HREF="#AEN3375"
>llRequestPermissions</A
></DT
><DT
>A.196. <A
HREF="#AEN3391"
>llRequestSimulatorData</A
></DT
><DT
>A.197. <A
HREF="#AEN3408"
>llResetScript</A
></DT
><DT
>A.198. <A
HREF="#AEN3416"
>llResetOtherScript</A
></DT
><DT
>A.199. <A
HREF="#AEN3426"
>llResetTime</A
></DT
><DT
>A.200. <A
HREF="#AEN3434"
>llRezAtRoot</A
></DT
><DT
>A.201. <A
HREF="#AEN3461"
>llRezObject</A
></DT
><DT
>A.202. <A
HREF="#AEN3486"
>llRot2Angle</A
></DT
><DT
>A.203. <A
HREF="#AEN3496"
>llRot2Axis</A
></DT
><DT
>A.204. <A
HREF="#AEN3506"
>llRot2Euler</A
></DT
><DT
>A.205. <A
HREF="#AEN3516"
>llRot2Fwd</A
></DT
><DT
>A.206. <A
HREF="#AEN3526"
>llRot2Left</A
></DT
><DT
>A.207. <A
HREF="#AEN3536"
>llRot2Up</A
></DT
><DT
>A.208. <A
HREF="#AEN3546"
>llRotBetween</A
></DT
><DT
>A.209. <A
HREF="#AEN3559"
>llRotLookAt</A
></DT
><DT
>A.210. <A
HREF="#AEN3579"
>llRotTarget</A
></DT
><DT
>A.211. <A
HREF="#AEN3593"
>llRotTargetRemove</A
></DT
><DT
>A.212. <A
HREF="#AEN3603"
>llRotateTexture</A
></DT
><DT
>A.213. <A
HREF="#AEN3618"
>llRound</A
></DT
><DT
>A.214. <A
HREF="#AEN3628"
>llSameGroup</A
></DT
><DT
>A.215. <A
HREF="#AEN3640"
>llSay</A
></DT
><DT
>A.216. <A
HREF="#AEN3654"
>llScaleTexture</A
></DT
><DT
>A.217. <A
HREF="#AEN3671"
>llScriptDanger</A
></DT
><DT
>A.218. <A
HREF="#AEN3680"
>llSendRemoteData</A
></DT
><DT
>A.219. <A
HREF="#AEN3693"
>llSensor</A
></DT
><DT
>A.220. <A
HREF="#AEN3720"
>llSensorRemove</A
></DT
><DT
>A.221. <A
HREF="#AEN3728"
>llSensorRepeat</A
></DT
><DT
>A.222. <A
HREF="#AEN3758"
>llSetAlpha</A
></DT
><DT
>A.223. <A
HREF="#AEN3773"
>llSetBuoyancy</A
></DT
><DT
>A.224. <A
HREF="#AEN3782"
>llSetCameraAtOffset</A
></DT
><DT
>A.225. <A
HREF="#AEN3791"
>llSetClickAction</A
></DT
><DT
>A.226. <A
HREF="#AEN3800"
>llForceMouselook</A
></DT
><DT
>A.227. <A
HREF="#AEN3809"
>llSetCameraEyeOffset</A
></DT
><DT
>A.228. <A
HREF="#AEN3818"
>llSetColor</A
></DT
><DT
>A.229. <A
HREF="#AEN3832"
>llSetDamage</A
></DT
><DT
>A.230. <A
HREF="#AEN3841"
>llSetForce</A
></DT
><DT
>A.231. <A
HREF="#AEN3855"
>llSetForceAndTorque</A
></DT
><DT
>A.232. <A
HREF="#AEN3872"
>llSetHoverHeight</A
></DT
><DT
>A.233. <A
HREF="#AEN3887"
>llSetLinkAlpha</A
></DT
><DT
>A.234. <A
HREF="#AEN3906"
>llSetLinkColor</A
></DT
><DT
>A.235. <A
HREF="#AEN3925"
>llSetLinkPrimitiveParams</A
></DT
><DT
>A.236. <A
HREF="#AEN3941"
>llSetLinkTexture</A
></DT
><DT
>A.237. <A
HREF="#AEN3960"
>llSetLocalRot</A
></DT
><DT
>A.238. <A
HREF="#AEN3969"
>llSetObjectDesc</A
></DT
><DT
>A.239. <A
HREF="#AEN3979"
>llSetObjectName</A
></DT
><DT
>A.240. <A
HREF="#AEN3989"
>llSetParcelMusicURL</A
></DT
><DT
>A.241. <A
HREF="#AEN3999"
>llSetPayPrice</A
></DT
><DT
>A.242. <A
HREF="#AEN4011"
>llSetPos</A
></DT
><DT
>A.243. <A
HREF="#AEN4020"
>llSetPrimitiveParams</A
></DT
><DT
>A.244. <A
HREF="#AEN4034"
>llSetRemoteScriptAccessPin</A
></DT
><DT
>A.245. <A
HREF="#AEN4043"
>llSetRot</A
></DT
><DT
>A.246. <A
HREF="#AEN4052"
>llSetScale</A
></DT
><DT
>A.247. <A
HREF="#AEN4061"
>llSetScriptState</A
></DT
><DT
>A.248. <A
HREF="#AEN4072"
>llSetSitText</A
></DT
><DT
>A.249. <A
HREF="#AEN4082"
>llSetSoundQueueing</A
></DT
><DT
>A.250. <A
HREF="#AEN4095"
>llSetStatus</A
></DT
><DT
>A.251. <A
HREF="#AEN4110"
>llSetText</A
></DT
><DT
>A.252. <A
HREF="#AEN4126"
>llSetTexture</A
></DT
><DT
>A.253. <A
HREF="#AEN4140"
>llSetTextureAnim</A
></DT
><DT
>A.254. <A
HREF="#AEN4188"
>llSetTimerEvent</A
></DT
><DT
>A.255. <A
HREF="#AEN4200"
>llSetTorque</A
></DT
><DT
>A.256. <A
HREF="#AEN4214"
>llSetTouchText</A
></DT
><DT
>A.257. <A
HREF="#AEN4224"
>llSetVehicleFlags</A
></DT
><DT
>A.258. <A
HREF="#AEN4235"
>llSetVehicleFloatParam</A
></DT
><DT
>A.259. <A
HREF="#AEN4249"
>llSetVehicleType</A
></DT
><DT
>A.260. <A
HREF="#AEN4260"
>llSetVehicleRotationParam</A
></DT
><DT
>A.261. <A
HREF="#AEN4274"
>llSetVehicleVectorParam</A
></DT
><DT
>A.262. <A
HREF="#AEN4288"
>llShout</A
></DT
><DT
>A.263. <A
HREF="#AEN4302"
>llSin</A
></DT
><DT
>A.264. <A
HREF="#AEN4312"
>llSitTarget</A
></DT
><DT
>A.265. <A
HREF="#AEN4325"
>llSleep</A
></DT
><DT
>A.266. <A
HREF="#AEN4335"
>llSqrt</A
></DT
><DT
>A.267. <A
HREF="#AEN4346"
>llStartAnimation</A
></DT
><DT
>A.268. <A
HREF="#AEN4578"
>llStopAnimation</A
></DT
><DT
>A.269. <A
HREF="#AEN4588"
>llStopHover</A
></DT
><DT
>A.270. <A
HREF="#AEN4596"
>llStopLookAt</A
></DT
><DT
>A.271. <A
HREF="#AEN4604"
>llStopMoveToTarget</A
></DT
><DT
>A.272. <A
HREF="#AEN4612"
>llStopPointAt</A
></DT
><DT
>A.273. <A
HREF="#AEN4620"
>llStopSound</A
></DT
><DT
>A.274. <A
HREF="#AEN4631"
>llStringLength</A
></DT
><DT
>A.275. <A
HREF="#AEN4641"
>llSubStringIndex</A
></DT
><DT
>A.276. <A
HREF="#AEN4652"
>llStringToBase64</A
></DT
><DT
>A.277. <A
HREF="#AEN4661"
>llTakeControls</A
></DT
><DT
>A.278. <A
HREF="#AEN4678"
>llTan</A
></DT
><DT
>A.279. <A
HREF="#AEN4688"
>llTarget</A
></DT
><DT
>A.280. <A
HREF="#AEN4701"
>llTargetOmega</A
></DT
><DT
>A.281. <A
HREF="#AEN4718"
>llTargetRemove</A
></DT
><DT
>A.282. <A
HREF="#AEN4728"
>llTeleportAgentHome</A
></DT
><DT
>A.283. <A
HREF="#AEN4737"
>llToLower</A
></DT
><DT
>A.284. <A
HREF="#AEN4746"
>llToUpper</A
></DT
><DT
>A.285. <A
HREF="#AEN4756"
>llTriggerSound</A
></DT
><DT
>A.286. <A
HREF="#AEN4770"
>llTriggerSoundLimited</A
></DT
><DT
>A.287. <A
HREF="#AEN4790"
>llUnescapeURL</A
></DT
><DT
>A.288. <A
HREF="#AEN4800"
>llUnSit</A
></DT
><DT
>A.289. <A
HREF="#AEN4810"
>llVecDist</A
></DT
><DT
>A.290. <A
HREF="#AEN4823"
>llVecMag</A
></DT
><DT
>A.291. <A
HREF="#AEN4833"
>llVecNorm</A
></DT
><DT
>A.292. <A
HREF="#AEN4843"
>llVolumeDetect</A
></DT
><DT
>A.293. <A
HREF="#AEN4852"
>llWater</A
></DT
><DT
>A.294. <A
HREF="#AEN4862"
>llWhisper</A
></DT
><DT
>A.295. <A
HREF="#AEN4876"
>llWind</A
></DT
><DT
>A.296. <A
HREF="#AEN4886"
>llXorBase64Strings</A
></DT
></DL
></DD
><DT
>B. <A
HREF="#AEN4899"
>Events</A
></DT
><DD
><DL
><DT
>B.1. <A
HREF="#AEN4902"
>at_rot_target</A
></DT
><DT
>B.2. <A
HREF="#AEN4916"
>at_target</A
></DT
><DT
>B.3. <A
HREF="#AEN4930"
>attach</A
></DT
><DT
>B.4. <A
HREF="#AEN4940"
>changed</A
></DT
><DT
>B.5. <A
HREF="#AEN4951"
>collision</A
></DT
><DT
>B.6. <A
HREF="#AEN4961"
>collision_end</A
></DT
><DT
>B.7. <A
HREF="#AEN4971"
>collision_start</A
></DT
><DT
>B.8. <A
HREF="#AEN4981"
>control</A
></DT
><DT
>B.9. <A
HREF="#AEN4997"
>dataserver</A
></DT
><DT
>B.10. <A
HREF="#AEN5012"
>email</A
></DT
><DT
>B.11. <A
HREF="#AEN5030"
>land_collision</A
></DT
><DT
>B.12. <A
HREF="#AEN5039"
>land_collision_end</A
></DT
><DT
>B.13. <A
HREF="#AEN5048"
>land_collision_start</A
></DT
><DT
>B.14. <A
HREF="#AEN5057"
>link_message</A
></DT
><DT
>B.15. <A
HREF="#AEN5073"
>listen</A
></DT
><DT
>B.16. <A
HREF="#AEN5092"
>money</A
></DT
><DT
>B.17. <A
HREF="#AEN5105"
>moving_end</A
></DT
><DT
>B.18. <A
HREF="#AEN5113"
>moving_start</A
></DT
><DT
>B.19. <A
HREF="#AEN5121"
>no_sensor</A
></DT
><DT
>B.20. <A
HREF="#AEN5130"
>not_at_rot_target</A
></DT
><DT
>B.21. <A
HREF="#AEN5139"
>not_at_target</A
></DT
><DT
>B.22. <A
HREF="#AEN5148"
>object_rez</A
></DT
><DT
>B.23. <A
HREF="#AEN5159"
>on_rez</A
></DT
><DT
>B.24. <A
HREF="#AEN5171"
>run_time_permissions</A
></DT
><DT
>B.25. <A
HREF="#AEN5183"
>sensor</A
></DT
><DT
>B.26. <A
HREF="#AEN5195"
>state_entry</A
></DT
><DT
>B.27. <A
HREF="#AEN5203"
>state_exit</A
></DT
><DT
>B.28. <A
HREF="#AEN5211"
>timer</A
></DT
><DT
>B.29. <A
HREF="#AEN5220"
>touch</A
></DT
><DT
>B.30. <A
HREF="#AEN5231"
>touch_end</A
></DT
><DT
>B.31. <A
HREF="#AEN5242"
>touch_start</A
></DT
><DT
>B.32. <A
HREF="#AEN5253"
>remote_data</A
></DT
></DL
></DD
><DT
>C. <A
HREF="#AEN5292"
>Constants</A
></DT
><DD
><DL
><DT
>C.1. <A
HREF="#AEN5295"
>Boolean Constants</A
></DT
><DT
>C.2. <A
HREF="#AEN5304"
>Status Constants</A
></DT
><DT
>C.3. <A
HREF="#AEN5338"
>Object Type Constants</A
></DT
><DT
>C.4. <A
HREF="#AEN5360"
>Permission Constants</A
></DT
><DT
>C.5. <A
HREF="#AEN5411"
>Inventory Constants</A
></DT
><DT
>C.6. <A
HREF="#AEN5434"
>Pay Price Constants</A
></DT
><DT
>C.7. <A
HREF="#AEN5448"
>Attachment Constants</A
></DT
><DT
>C.8. <A
HREF="#AEN5574"
>Land Constants</A
></DT
><DT
>C.9. <A
HREF="#AEN5616"
>Link Constants</A
></DT
><DT
>C.10. <A
HREF="#AEN5643"
>Control Constants</A
></DT
><DT
>C.11. <A
HREF="#AEN5690"
>Change Constants</A
></DT
><DT
>C.12. <A
HREF="#AEN5733"
>Type Constants</A
></DT
><DT
>C.13. <A
HREF="#AEN5767"
>Agent Info Constants</A
></DT
><DT
>C.14. <A
HREF="#AEN5817"
>Texture Animation
    Constants</A
></DT
><DT
>C.15. <A
HREF="#AEN5851"
>Particle System Constants</A
></DT
><DT
>C.16. <A
HREF="#AEN6005"
>Agent Data Constants</A
></DT
><DT
>C.17. <A
HREF="#AEN6041"
>Float Constants</A
></DT
><DT
>C.18. <A
HREF="#AEN6070"
>Key Constant</A
></DT
><DT
>C.19. <A
HREF="#AEN6073"
>Miscellaneous Integer Constants</A
></DT
><DT
>C.20. <A
HREF="#AEN6076"
>Miscellaneous String
    Constants</A
></DT
><DT
>C.21. <A
HREF="#AEN6080"
>Vector Constant</A
></DT
><DT
>C.22. <A
HREF="#AEN6083"
>Rotation Constant</A
></DT
><DT
>C.23. <A
HREF="#AEN6086"
>Simulator Data Constants</A
></DT
><DT
>C.24. <A
HREF="#AEN6112"
>Vehicle Parameters</A
></DT
><DT
>C.25. <A
HREF="#AEN6231"
>Vehicle Flags</A
></DT
><DT
>C.26. <A
HREF="#AEN6288"
>Vehicle Types</A
></DT
><DT
>C.27. <A
HREF="#AEN6323"
>Primitive Constants</A
></DT
><DT
>C.28. <A
HREF="#AEN6409"
>XML-RPC Constants</A
></DT
><DT
>C.29. <A
HREF="#AEN6412"
>Permission Mask Constants</A
></DT
><DT
>C.30. <A
HREF="#AEN6459"
>Parcel Media Constants</A
></DT
><DT
>C.31. <A
HREF="#AEN6521"
>Click Action Constants</A
></DT
></DL
></DD
></DL
></DIV
><DIV
CLASS="LOT"
><DL
CLASS="LOT"
><DT
><B
>List of Tables</B
></DT
><DT
>3-1. <A
HREF="#AEN148"
>Binary Arithmetic Operators</A
></DT
><DT
>3-2. <A
HREF="#AEN188"
>Boolean Operators</A
></DT
><DT
>3-3. <A
HREF="#AEN220"
>Bitwise Operators</A
></DT
><DT
>3-4. <A
HREF="#AEN258"
>Vector Arithmetic Operators</A
></DT
><DT
>3-5. <A
HREF="#AEN282"
>Rotation Arithmetic Operators</A
></DT
><DT
>6-1. <A
HREF="#AEN456"
>Trigonometry Functions</A
></DT
><DT
>6-2. <A
HREF="#AEN505"
>Vector Functions</A
></DT
><DT
>6-3. <A
HREF="#AEN521"
>Rotation Functions</A
></DT
><DT
>7-1. <A
HREF="#AEN565"
>String Functions</A
></DT
><DT
>8-1. <A
HREF="#AEN609"
>List Functions</A
></DT
><DT
>9-1. <A
HREF="#AEN674"
>In World Functions</A
></DT
><DT
>9-2. <A
HREF="#AEN699"
>Messaging Functions</A
></DT
><DT
>10-1. <A
HREF="#AEN719"
>Inventory Functions</A
></DT
></DL
></DIV
><DIV
CLASS="chapter"
><HR><H1
><A
NAME="AEN27"
></A
>Chapter 1. Introduction</H1
><P
>The Linden Scripting Language (LSL) is a simple, powerful
  language used to attach behaviors to the objects found in Second
  Life. It follows the familiar syntax of a c/Java style language,
  with an implicit state machine for every script.</P
><P
>Multiple scripts may also be attached to the same object,
  allowing a style of small, single-function scripts to evolve.  This
  leads to scripts that perform specific functions ("hover", "follow",
  etc.) and allows them to be combined to form new behaviors.</P
><P
>The text of the script is compiled into an executable byte
  code, much like Java.  This byte code is then run within a virtual
  machine on the simulator.  Each script receives a time slice of the
  total simulator time allocated to scripts, so a simulator with many
  scripts would allow each individual script less time rather than
  degrading its own performance.  In addition, each script executes
  within its own chunk of memory, preventing scripts from writing into
  protected simulator memory or into other scripts, making it much
  harder for scripts to crash the simulator.</P
><P
>This tutorial introduces the reader to the basic features of
  LSL, how to edit and apply your scripts, and a complete reference
  for standard linden constants, events, and library functions.</P
></DIV
><DIV
CLASS="chapter"
><HR><H1
><A
NAME="AEN33"
></A
>Chapter 2. Getting Started</H1
><P
>You're probably wondering what you can do with LSL, and how
  quickly you can do it. We'll start with some simple examples, dissect
  them, and introduce you the script development process while
  we're at it.</P
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN36"
>2.1. Hello Avatar</A
></H2
><P
>Continuing a long tradition of getting started by looking at
    a script that says "Hello", we'll do just that. Though obviously
    not a particularly useful example on it's own, this example will
    introduce us to:</P
><P
></P
><UL
><LI
><P
>Creating a basic script</P
></LI
><LI
><P
>Script states</P
></LI
><LI
><P
>Calling functions</P
></LI
><LI
><P
>Script events</P
></LI
><LI
><P
>Applying a script to an object</P
></LI
></UL
><DIV
CLASS="section"
><HR><H3
CLASS="section"
><A
NAME="AEN50"
>2.1.1. Creating the Script</A
></H3
><P
>Start by opening your inventory and selecting 'Create|New
      Script' from the inventory pull down menu. This will create an
      empty script called 'New Script' in your 'Scripts'
      folder. Double click on the text or icon of the script to open
      the script in the built in editor. When you open the script, the
      viewer will automatically insert a basic skeleton for lsl. It
      should look like:</P
><P
><PRE
CLASS="programlisting"
>&#13;default
{
    state_entry()
    {
        llSay(0, "Hello, Avatar!");
    }

    touch_start(integer total_number)
    {
        llSay(0, "Touched.");
    }
}
      </PRE
></P
><P
>A casual inspection of this script reveals that this script
      probably says 'Hello, Avatar!' when it enters some state, and it
      says 'Touched.' when it is touched. But since this is also
      probably the first time you have seen a script we'll dissect this
      short listing, explaining each segment individually.</P
></DIV
><DIV
CLASS="section"
><HR><H3
CLASS="section"
><A
NAME="AEN56"
>2.1.2. Default State</A
></H3
><P
><DIV
CLASS="informalexample"
><P
></P
><A
NAME="AEN59"
></A
><PRE
CLASS="programlisting"
>&#13;default
{
...
}
      </PRE
><P
></P
></DIV
></P
><P
>All LSL scripts have a simple implicit state machine with
      one or more states. All scripts must have a default state, so
      if there is only one state, it will be the 'default'
      state. When a script is first started or reset, it will start
      out in the default state.</P
><P
>The default state is declared by placing the default at
      the root level of the document, and marking the beginning with
      an open brace '{' and ending with a close brace '}'. Because of
      it's privileged status, you do not declare that it is fact a
      state like you normally would with other states.</P
><P
>Every time you enter a state, the script engine will
      automatically call the state_entry() event and execute the code
      found there. On state exit, the script engine will automatically
      call the state_exit() event before calling the next state's
      state_entry handler. In our example, we call the 
	  <A
HREF="#AEN3640"
>llSay()</A
>
      function in state_entry() and do not bother to define a
      state_exit() handler. the state entry and exit handlers are a
      convenient place to initialize state data and clean up state
      specific data such as listen event callback.</P
><P
>You can read more about the default state, and how to
      create and utilize other states in the <A
HREF="#AEN427"
>states chapter</A
>.</P
></DIV
><DIV
CLASS="section"
><HR><H3
CLASS="section"
><A
NAME="AEN67"
>2.1.3. Functions</A
></H3
><P
>The language comes with well over 200 <A
HREF="#AEN999"
>built in functions</A
> which allow scripts and
      objects to interact with their environment. All of the built in
      functions start with 'll'.</P
><P
>The example calls the <A
HREF="#AEN3640"
>llSay()</A
> 
	  function twice, which is used to emit text on the specified channel.
	  </P
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN73"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>llSay</CODE
>(
	    integer channel
	    string text
	  );</CODE
></P
><P
></P
></DIV
><P
>Say text on channel. Channel 0 is the public chat channel
      that all avatars see as chat text. Channels 1 to 2,147,483,648
      are private channels that aren't sent to avatars but other
      scripts can listen for.</P
><P
>You can define your own functions as long as the name does
      not conflict with a reserved word, built in constant, or built
      in function.</P
></DIV
><DIV
CLASS="section"
><HR><H3
CLASS="section"
><A
NAME="AEN82"
>2.1.4. Touch Event</A
></H3
><P
><DIV
CLASS="informalexample"
><P
></P
><A
NAME="AEN85"
></A
><PRE
CLASS="programlisting"
>&#13;touch_start(integer total_number)
{
    llSay(0, "Touched.");
}
      </PRE
><P
></P
></DIV
></P
><P
>There are many <A
HREF="#AEN4899"
>events</A
> that can 
	  be detected in your scripts by declaring a handler. The 
	  <A
HREF="#AEN5242"
> touch_start()</A
> 
	  event is raised when a
      user touches the object through the user interface.</P
></DIV
><DIV
CLASS="section"
><HR><H3
CLASS="section"
><A
NAME="AEN90"
>2.1.5. Try it Out</A
></H3
><P
>Now that we have seen the default script, and examined it
      in some detail, it is time to see the script in action. Save
      the script by clicking on <SPAN
CLASS="guibutton"
>Save</SPAN
>. During
      the save process, the editor will save the text of the script
      and compile the script into bytecode and then save that. When
      you see message 'Compile successful!' in the preview window, you
      know the compile and save is done.</P
><P
>To test the script you will have to apply it to an object
      in the world. Create a new object in the world by
      <SPAN
CLASS="mousebutton"
>context clicking</SPAN
> in the main world
      view and selecting <SPAN
CLASS="guimenu"
>Create</SPAN
>. When the wand
      appears, you can create a simple primitive by
      <SPAN
CLASS="mousebutton"
>clicking</SPAN
> in the world. Once the
      object appears, you can drag your newly created script onto the
      object to start the script.</P
><P
>Soon after dragging the script onto the object, you will
      see the message <SAMP
CLASS="computeroutput"
>Object: Hello
      Avatar!</SAMP
></P
><P
>Make sure the touch event is working by
      <SPAN
CLASS="mousebutton"
>clicking</SPAN
> on the object. You should
      see the message <SAMP
CLASS="computeroutput"
>Touched printed into the chat
      history.</SAMP
></P
></DIV
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN103"
>2.2. Using The Built-In Editor</A
></H2
><P
>The built in editor comes with most of the typical features
    you would expect from a basic text editor. Highlight text with the
    mouse, or by holding down the shift key while using the arrow
    keys. You can cut, copy, paste, and delete your selection using
    the 'Edit' pull down menu or by pressing the usual shortcut
    key.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN106"
>2.3. Using Alternative Editors</A
></H2
><P
>Since the built-in editor supports pasting text from the
    clipboard, you can employ a different editor to edit your scripts,
    copying them into Second Life when you're ready to save them.</P
></DIV
></DIV
><DIV
CLASS="chapter"
><HR><H1
><A
NAME="AEN109"
></A
>Chapter 3. Basics</H1
><P
>Now that we have seen a very simple script in action, we need
  to look at the our toolchest for writing scripts. The next set of
  tools we will consider are the basic building blocks for programming
  a script, and will be used in every non-trivial script you write.</P
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN112"
>3.1. Comments</A
></H2
><P
>Commenting your scripts is a good idea, and will help when
    you update and modify the script, or when you adapt parts of it
    into other scripts. Unless the meaning is obvious, you should add
    comments:</P
><P
><P
></P
><UL
><LI
><P
>at the start of the script to explain the
	purpose of the script</P
></LI
><LI
><P
>before every global variable to describe what
	it holds</P
></LI
><LI
><P
>before every global function to describe what
	it does</P
></LI
><LI
><P
>sprinkled through your script wherever the code
	solves a problem that took you more than a few minutes to
	figure out.</P
></LI
></UL
></P
><P
>LSL uses Java/C++ style single line comments.</P
><P
><DIV
CLASS="informalexample"
><P
></P
><A
NAME="AEN127"
></A
><PRE
CLASS="programlisting"
>&#13;// This script toggles a the rotation of an object

// g_is_rotating stores the current state of the rotation. TRUE is
// rotating, FALSE otherwise.
integer g_is_rotating = FALSE;
default
{
    // toggle state during the touch handler
    touch(integer num)
    {
        if(g_is_rotating)
        {
            // turn off rotation
            llTargetOmega(&#60;0,0,1&#62;, 0, 0);
            g_is_rotating = FALSE;
        }
        else
        {
            // rotate around the positive z axis - up.
            llTargetOmega(&#60;0,0,1&#62;, 4, 1);
            g_is_rotating = TRUE;
        }
    }
}
    </PRE
><P
></P
></DIV
></P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN129"
>3.2. Arithmetic Operations</A
></H2
><P
>Most of the common arithmetic operations are supported in
    lsl, and follow the C/Java syntax.</P
><DIV
CLASS="section"
><HR><H3
CLASS="section"
><A
NAME="AEN132"
>3.2.1. Assignment</A
></H3
><P
>The most common arithmetic operation is assignment,
      denoted with the '=' sign. Loosely translated, it means, take
      what you find on the right hand side of the equal sign and
      assign it to the left hand side. Any expression that evaluates
      to a basic type can be used as the right hand side of an
      assignment, but the left hand side must be a normal
      variable.</P
><P
>All basic types support assignment '=', equality '==' and
      inequality '!=' operators.</P
><P
><DIV
CLASS="informalexample"
><P
></P
><A
NAME="AEN137"
></A
><PRE
CLASS="programlisting"
>&#13;// variables to hold a information about the target
key g_target;
vector g_target_postion;
float g_target_distance;

// function that demonstrates assignment
set_globals(key target, vector pos)
{
    g_target = target;
    g_target_position = pos;

    // assignment from the return value of a function
    vector my_pos = llGetPos(); 
    g_target_distance = llVecDist(g_target_position, my_pos);
}
      </PRE
><P
></P
></DIV
></P
></DIV
><DIV
CLASS="section"
><HR><H3
CLASS="section"
><A
NAME="AEN139"
>3.2.2. Hexadecimal Entry</A
></H3
><P
>Integers may be entered in hex form (e.g. 0xffff).  For example:</P
><P
><DIV
CLASS="informalexample"
><P
></P
><A
NAME="AEN143"
></A
><PRE
CLASS="programlisting"
>&#13;integer Mask = 0xff;  // Equivalent to integer Mask = 255;
integer Bit  = 0x0100 // Equivalent to integer Mask = 256;
	</PRE
><P
></P
></DIV
></P
></DIV
><DIV
CLASS="section"
><HR><H3
CLASS="section"
><A
NAME="AEN145"
>3.2.3. Binary Arithmetic Operators</A
></H3
><P
>Binary arithmetic operators behave like a function call
      that accepts two parameters of the same type, and then return
      that type; however, the syntax is slightly different.</P
><DIV
CLASS="table"
><A
NAME="AEN148"
></A
><P
><B
>Table 3-1. Binary Arithmetic Operators</B
></P
><TABLE
BORDER="1"
CLASS="CALSTABLE"
><COL><COL><THEAD
><TR
><TH
>Operator</TH
><TH
>Meaning</TH
></TR
></THEAD
><TBODY
><TR
><TD
>+</TD
><TD
>Addition</TD
></TR
><TR
><TD
>-</TD
><TD
>Subtraction</TD
></TR
><TR
><TD
>*</TD
><TD
>Multiplication</TD
></TR
><TR
><TD
>/</TD
><TD
>Division</TD
></TR
><TR
><TD
>%</TD
><TD
>Modulo (remainder)</TD
></TR
><TR
><TD
>^</TD
><TD
>Exclusive OR</TD
></TR
><TR
><TD
>&#60;&#60;</TD
><TD
>Shift Left</TD
></TR
><TR
><TD
>&#62;&#62;</TD
><TD
>Shift Right</TD
></TR
></TBODY
></TABLE
></DIV
><P
>Where noted, each type may have a special interpretation
      of a binary arithmetic operator. See the <A
HREF="#AEN237"
>lsl types</A
> section for more
      details.</P
><P
><DIV
CLASS="informalexample"
><P
></P
><A
NAME="AEN183"
></A
><PRE
CLASS="programlisting"
>&#13;      </PRE
><P
></P
></DIV
></P
></DIV
><DIV
CLASS="section"
><HR><H3
CLASS="section"
><A
NAME="AEN185"
>3.2.4. Boolean Operators</A
></H3
><P
></P
><DIV
CLASS="table"
><A
NAME="AEN188"
></A
><P
><B
>Table 3-2. Boolean Operators</B
></P
><TABLE
BORDER="1"
CLASS="CALSTABLE"
><COL><COL><THEAD
><TR
><TH
>Operator</TH
><TH
>Meaning</TH
></TR
></THEAD
><TBODY
><TR
><TD
>&#60;</TD
><TD
>Operator returns TRUE if the left hand side is less
	      than the right hand side.</TD
></TR
><TR
><TD
>&#62;</TD
><TD
>Operator returns TRUE if the left hand side is greater
	      than the right hand side.</TD
></TR
><TR
><TD
>&#60;=</TD
><TD
>Operator returns TRUE if the left hand side is less
	      than or equal to the right hand side.</TD
></TR
><TR
><TD
>&#62;=</TD
><TD
>Operator returns TRUE if the left hand side is greater
	      than or equal to the right hand side.</TD
></TR
><TR
><TD
>&#38;&#38;</TD
><TD
>Operator returns TRUE if the left hand side and right
	      hand side are both true.</TD
></TR
><TR
><TD
>||</TD
><TD
>Operator returns TRUE if either the left hand or right
	      hand side are true.</TD
></TR
><TR
><TD
>!</TD
><TD
>Unary operator returns the logical negation of the
	      expression to the right.</TD
></TR
></TBODY
></TABLE
></DIV
></DIV
><DIV
CLASS="section"
><HR><H3
CLASS="section"
><A
NAME="AEN217"
>3.2.5. Bitwise Operators</A
></H3
><P
></P
><DIV
CLASS="table"
><A
NAME="AEN220"
></A
><P
><B
>Table 3-3. Bitwise Operators</B
></P
><TABLE
BORDER="1"
CLASS="CALSTABLE"
><COL><COL><THEAD
><TR
><TH
>Operator</TH
><TH
>Meaning</TH
></TR
></THEAD
><TBODY
><TR
><TD
>&#38;</TD
><TD
>Returns the bitwise and of the left and right hand
	      side.</TD
></TR
><TR
><TD
>|</TD
><TD
>Returns the bitwise or of the left and right hand
	      side.</TD
></TR
><TR
><TD
>~</TD
><TD
>Unary operator returns the bitwise complement of the
	      expression to the right.</TD
></TR
></TBODY
></TABLE
></DIV
></DIV
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN237"
>3.3. Types</A
></H2
><P
>Variables, return values, and parameters have type
    information. LSL provides a small set of basic types that are used
    throughout the language.</P
><P
></P
><DIV
CLASS="variablelist"
><P
><B
>LSL Types</B
></P
><DL
><DT
>integer</DT
><DD
><P
>A signed, 32-bit integer value with valid range from
	  -2147483648 to 2147483647.</P
></DD
><DT
>float</DT
><DD
><P
>An IEEE 32-bit floating point value with
	values ranging from 1.175494351E-38 to
	3.402823466E+38.</P
></DD
><DT
>key</DT
><DD
><P
>A unique identifier that can be used to
	reference objects and agents in Second Life.</P
></DD
><DT
>vector</DT
><DD
><P
>3 floats that are used together as a single
	item. A vector can be used to represent a 3 dimensional
	position, direction, velocity, force, impulse, or a
	color. Each component can be accessed via '.x', '.y', and
	'.z'.</P
><DIV
CLASS="table"
><A
NAME="AEN258"
></A
><P
><B
>Table 3-4. Vector Arithmetic Operators</B
></P
><TABLE
BORDER="1"
CLASS="CALSTABLE"
><COL><COL><THEAD
><TR
><TH
>Operator</TH
><TH
>Meaning</TH
></TR
></THEAD
><TBODY
><TR
><TD
>+</TD
><TD
>Add two vectors together</TD
></TR
><TR
><TD
>-</TD
><TD
>Subtract one vector from another</TD
></TR
><TR
><TD
>*</TD
><TD
>Vector dot product</TD
></TR
><TR
><TD
>%</TD
><TD
>Vector cross product</TD
></TR
></TBODY
></TABLE
></DIV
></DD
><DT
>rotation</DT
><DD
><P
>4 floats that are used together as a single
	item to represent a rotation. This data is interpreted as a
	quaternion. Each component can be accessed via '.x', '.y',
	'.z', and '.s'.</P
><DIV
CLASS="table"
><A
NAME="AEN282"
></A
><P
><B
>Table 3-5. Rotation Arithmetic Operators</B
></P
><TABLE
BORDER="1"
CLASS="CALSTABLE"
><COL><COL><THEAD
><TR
><TH
>Operator</TH
><TH
>Meaning</TH
></TR
></THEAD
><TBODY
><TR
><TD
>+</TD
><TD
>Add two rotations together</TD
></TR
><TR
><TD
>-</TD
><TD
>Subtract one rotation from another</TD
></TR
><TR
><TD
>*</TD
><TD
>Rotate the first rotation by the second</TD
></TR
><TR
><TD
>/</TD
><TD
>Rotate the first rotation by the inverse of the second</TD
></TR
></TBODY
></TABLE
></DIV
></DD
><DT
>list</DT
><DD
><P
>A heterogeneous list of the other data types. Lists are
	created via comma separated values of the other data types
	enclosed by '[' and ']'.</P
><P
><DIV
CLASS="informalexample"
><P
></P
><A
NAME="AEN307"
></A
><PRE
CLASS="programlisting"
>&#13;string StringVar = "Hello, Carbon Unit";
list MyList = [ 1234, ZERO_ROTATION, StringVar ];
        </PRE
><P
></P
></DIV
>
        Yields the list: <SAMP
CLASS="computeroutput"
>[ 1234, &#60;0,0,0,1&#62;, "Hello,
        Carbon Unit" ]</SAMP
>
        </P
><P
>Lists can be combined with other lists. For example:
        <DIV
CLASS="informalexample"
><P
></P
><A
NAME="AEN311"
></A
><PRE
CLASS="programlisting"
>&#13;MyList = 3.14159 + MyList;
        </PRE
><P
></P
></DIV
>
        Yields the list: <SAMP
CLASS="computeroutput"
>[ 3.14159, 1234, &#60;0,0,0,1&#62;,
        "Hello, Carbon Unit" ]</SAMP
>
         And similarly, 
        <DIV
CLASS="informalexample"
><P
></P
><A
NAME="AEN314"
></A
><PRE
CLASS="programlisting"
>&#13;MyList = MyList + MyList;
        </PRE
><P
></P
></DIV
>
        Yields: <SAMP
CLASS="computeroutput"
>[ 3.14159, 1234, &#60;0,0,0,1&#62;, "Hello,
        Carbon Unit", 3.14159, 1234, &#60;0,0,0,1&#62;, "Hello, Carbon Unit"
        ]</SAMP
>
        </P
><P
>Library functions exist used to copy data from lists,
        sort lists, copy/remove sublists.</P
></DD
></DL
></DIV
><DIV
CLASS="section"
><HR><H3
CLASS="section"
><A
NAME="AEN318"
>3.3.1. Type Conversion</A
></H3
><P
>Type conversion can either occur implicitly or explicitly.
      Explicit type casts are accomplished using C syntax:
      <DIV
CLASS="informalexample"
><P
></P
><A
NAME="AEN321"
></A
><PRE
CLASS="programlisting"
>&#13;float foo_float = 1.0;
integer  foo_int = (integer)foo_float;
      </PRE
><P
></P
></DIV
>
      </P
><DIV
CLASS="section"
><HR><H4
CLASS="section"
><A
NAME="AEN323"
>3.3.1.1. Implicit Casting</A
></H4
><P
>LSL only supports two implicit type casts: integer to
	float and string to key. Thus, any place you see a float
	specified you can supply an integer, and any place you see a
	key specified, you can supply a string.</P
></DIV
><DIV
CLASS="section"
><HR><H4
CLASS="section"
><A
NAME="AEN326"
>3.3.1.2. Explicit Casting</A
></H4
><P
>LSL supports the following explicit casts:
          <P
></P
><UL
><LI
STYLE="list-style-type: opencircle"
><P
>Integer to String</P
></LI
><LI
STYLE="list-style-type: opencircle"
><P
>Float to Integer</P
></LI
><LI
STYLE="list-style-type: opencircle"
><P
>Float to String</P
></LI
><LI
STYLE="list-style-type: opencircle"
><P
>Vector to String</P
></LI
><LI
STYLE="list-style-type: opencircle"
><P
>Rotation to String</P
></LI
><LI
STYLE="list-style-type: opencircle"
><P
>Integer to List</P
></LI
><LI
STYLE="list-style-type: opencircle"
><P
>Float to List</P
></LI
><LI
STYLE="list-style-type: opencircle"
><P
>Key to List</P
></LI
><LI
STYLE="list-style-type: opencircle"
><P
>String to List</P
></LI
><LI
STYLE="list-style-type: opencircle"
><P
>Vector to List</P
></LI
><LI
STYLE="list-style-type: opencircle"
><P
>Rotation to List</P
></LI
><LI
STYLE="list-style-type: opencircle"
><P
>String to Integer</P
></LI
><LI
STYLE="list-style-type: opencircle"
><P
>String to Float</P
></LI
><LI
STYLE="list-style-type: opencircle"
><P
>String to Vector</P
></LI
><LI
STYLE="list-style-type: opencircle"
><P
>String to Rotation</P
></LI
></UL
>
        </P
></DIV
></DIV
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN360"
>3.4. Global Functions</A
></H2
><P
>Global functions are also declared much like Java/C, with
    the exception that no 'void' return value exists. Instead, if no
    return value is needed, just don't specify one:

    <DIV
CLASS="informalexample"
><P
></P
><A
NAME="AEN363"
></A
><PRE
CLASS="programlisting"
>&#13;make_physical_and_spin(vector torque)
{
    // double the torque
    vector double_torque = 2.0*torque;
    llSetStatus(STATUS_PHYSICS, TRUE);
    llApplyTorque(double_torque);
}    
    </PRE
><P
></P
></DIV
></P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN365"
>3.5. Global Variables</A
></H2
><P
>Global variables and functions are accessible from anywhere
    in the file. Global variables are declared much like Java or C,
    although only one declaration may be made per line:
    <DIV
CLASS="informalexample"
><P
></P
><A
NAME="AEN368"
></A
><PRE
CLASS="programlisting"
>&#13;vector gStartPosition;
    </PRE
><P
></P
></DIV
></P
><P
>Global variables may also be initialized if desired,
    although uninitialized global and local variables are initialized
    to legal zero values:
    <DIV
CLASS="informalexample"
><P
></P
><A
NAME="AEN371"
></A
><PRE
CLASS="programlisting"
>&#13;vector gStartPosition = &#60;10.0,10.0,10.0&#62;
    </PRE
><P
></P
></DIV
></P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN373"
>3.6. Local Variables</A
></H2
><P
>Local variables are scoped below their declaration within
    the block of code they are declared in and may be declared within
    any block of code. Thus the following code is legal and will work
    like C:
    <DIV
CLASS="informalexample"
><P
></P
><A
NAME="AEN376"
></A
><PRE
CLASS="programlisting"
>&#13;integer test_function()
{
    // Test vector that we can use anywhere in the function
    vector test = &#60;1,2,3&#62;;
    integer j;
    for (j = 0; j &#60; 10; j++)
    {
        // This vector is a different variable than the one declared above
        // This IS NOT good coding practice
        vector test = &#60;j, j, j&#62;;
    }
    // this test fails
    if (test == &#60;9,9,9&#62;)
    {
        // never reached
    }
}
    </PRE
><P
></P
></DIV
></P
></DIV
></DIV
><DIV
CLASS="chapter"
><HR><H1
><A
NAME="AEN378"
></A
>Chapter 4. Flow Control</H1
><P
>LSL comes with a complete complement of constructs meant to
  deal with conditional processing, looping, as well as simply jumping
  to a different point in the script.</P
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN381"
>4.1. Conditional Statements</A
></H2
><P
>The 'if' statement operates and has the 
	same syntax as the Java/C version.</P
><P
><DIV
CLASS="informalexample"
><P
></P
><A
NAME="AEN385"
></A
><PRE
CLASS="programlisting"
>&#13;check_message(string message)
{
    if(message == "open")
    {
        open();
    }
    else if(message == "close")
    {
        close();
    }
    else
    {
        llSay(0, "Unknown command: " + message);
    }
}
    </PRE
><P
></P
></DIV
></P
><P
>The statements between the open and close curly brace are
    performed if the conditional inside the parentheses evaluates to a
    non-zero integer. Once a conditional is determined to be true
    (non-zero), no further processing of 'else' conditionals will be
    considered.  The <A
HREF="#AEN6070"
>NULL_KEY</A
> constant
    is counted as FALSE by conditional expressions.</P
><P
>There can be zero or more 'else if' statements, and an
    optional final 'else' to handle the case when none of the if
    statements evaluate to a non-zero integer.</P
><P
>The usual set of integer arithmetic and comparison operators
    are available.</P
><P
><DIV
CLASS="informalexample"
><P
></P
><A
NAME="AEN392"
></A
><PRE
CLASS="programlisting"
>&#13;// a function that accepts some information about its environment and
// determines the 'best' next step. This kind of code might be
// part of a simple box meant to move close to an agent and attach to
// them once near. This code sample relies on the standard linden
// library functions as well as two other methods not defined here.
assess_next_step(integer perm, integer attached, integer balance, float dist)
{
    string msg;
    if(!attached)
    {
        if((perm &#38; PERMISSION_ATTACH) &#38;&#38; (dist &#60; 10.0))
        {
             attach();
        }
        else if((dist &#62; 10.0) || ((dist &#62; 20.0) &#38;&#38; (balance &#62; 1000)))
        {
            move_closer();
        }
        else
        {
            llRequestPermissions(llGetOwner(), PERMISSION_ATTACH);
        }
    }
}
    </PRE
><P
></P
></DIV
></P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN394"
>4.2. Loop Constructs</A
></H2
><P
>Loops are a basic building block of most useful programming
    languages, and LSL offers the same loop constructs as found in
    Java or C.</P
><DIV
CLASS="section"
><HR><H3
CLASS="section"
><A
NAME="AEN397"
>4.2.1. for loop</A
></H3
><P
>A for loop is most useful for when you know how many times
      you need to iterate over an operation. Just like a Java or C for
      loop, the parentheses have three parts, the initializer, the
      continuation condition, and the increment. The loop continues
      while the middle term evaluates to true, and the increment step
      is performed at the end of every loop.</P
><P
><DIV
CLASS="informalexample"
><P
></P
><A
NAME="AEN401"
></A
><PRE
CLASS="programlisting"
>&#13;// move a non-physical block smoothly upward (positive z) the total
// distance specified divided into steps discrete moves.
move_up(float distance, integer steps)
{
    float step_distance = distance / (float)steps;
    vector offset = &#60;0.0, 0.0, step_distance&#62;;
    vector base_pos = llGetPos();
    integer i;
    for(i = 0; i &#60;= steps; ++i)
    {
        llSetPos(base_pos + i * offset);
        llSleep(0.1);
    }
}
      </PRE
><P
></P
></DIV
></P
></DIV
><DIV
CLASS="section"
><HR><H3
CLASS="section"
><A
NAME="AEN403"
>4.2.2. do-while loop</A
></H3
><P
>The do-while loop construct is most useful when you are
      sure that you want to perform an operation at least once, but
      you are not sure how many times you want to loop. The syntax is
      the same as you would find in a Java or C program. A simple
      English translation would be 'do the code inside the curly braces
      and continue doing it if the statement after the while is
      true.</P
><P
><DIV
CLASS="informalexample"
><P
></P
><A
NAME="AEN407"
></A
><PRE
CLASS="programlisting"
>&#13;// output the name of all inventory items attached to this object
talk_about_inventory(integer type)
{
    string name;
    integer i = 0;
    integer continue = TRUE;
    do
    {
        name = llGetInventoryName(type, i);
        if(llStringLength(name) &#62; 0)
        {
            llSay(0, "Inventory " + (string)i + ": " + name);
        }
        else
        {
            llSay(0, "No more inventory items");
            continue = FALSE;
        }
        i++;
    } while(continue);
}
      </PRE
><P
></P
></DIV
></P
></DIV
><DIV
CLASS="section"
><HR><H3
CLASS="section"
><A
NAME="AEN409"
>4.2.3. while loop</A
></H3
><P
>The while loop behaves similarly to the do-while loop,
      except it allows you to exit the loop without doing a single
      iteration inside.</P
><P
><DIV
CLASS="informalexample"
><P
></P
><A
NAME="AEN413"
></A
><PRE
CLASS="programlisting"
>&#13;mention_inventory_type(integer type)
{
    integer i = llGetInventoryNumber(type);
    while(i--)
    {
        llSay(0, "item: " + llGetInventory(i));
    }
}
      </PRE
><P
></P
></DIV
></P
></DIV
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN415"
>4.3. Jumps</A
></H2
><P
>A jump is used to move the running script to a new point
    inside of a function or event handler. You cannot jump into other
    functions or event handlers. Usually, you will want to use a jump
    for in situations where the if..else statements would become too
    cumbersome. For example, you may want to check several
    preconditions, and exit if any of them are not met.</P
><P
><DIV
CLASS="informalexample"
><P
></P
><A
NAME="AEN419"
></A
><PRE
CLASS="programlisting"
>&#13;attach_if_ready(vector target_pos)
{
    // make sure we have permission
    integer perm = llGetPerm();
    if(!(perm &#38; PERMISSION_ATTACH))
    {
        jump early_exit;
    }

    // make sure we're 10 or less meters away
    vector pos = llGetPos()
    float dist = llVecDist(pos, target_pos);
    if(dist &#62; 10.0)
    {
        jump early_exit;
    }

    // make sure we're roughly pointed toward the target.
    // the calculation of max_cos_theta could be precomputed 
    // as a constant, but is manually computed here to 
    // illustrate the math.
    float max_cos_theta = llCos(PI / 4.0);
    vector toward_target = llVecNorm(target_pos - pos);
    rotation rot = llGetRot();
    vector fwd = llRot2Fwd(rot);
    float cos_theta = toward_target * fwd;
    if(cos_theta &#62; max_cos_theta)
    {
        jump early_exit;
    }

    // at this point, we've done all the checks.
    attach();

    @early_exit;
}
    </PRE
><P
></P
></DIV
></P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN421"
>4.4. State Change</A
></H2
><P
>State change allow you to move through the lsl virtual
    machine's flexible state machine by transitioning your script to
    and from user defined states and the default state. You can define
    your own script state by placing the keyword 'state' before its
    name and enclosing the event handlers with open and close curly
    braces ('{' and '}'.) You can invoke the transition to a new state
    by calling it with the syntax: 'state &#60;statename&#62;'.</P
><P
><DIV
CLASS="informalexample"
><P
></P
><A
NAME="AEN425"
></A
><PRE
CLASS="programlisting"
>&#13;default
{
    state_entry()
    {
        llSay(0, "I am in the default state");
        llSetTimer(1.0);
    }

    timer()
    {
        state SpinState;
    }
}

state SpinState
{
    state_entry()
    {
        llSay(0, "I am in SpinState!");
        llTargetOmega(&#60;0,0,1&#62;, 4, 1.0);
        llSetTimer(2.0);
    }

    timer()
    {
        state default;
    }

    state_exit()
    {
        llTargetOmega(&#60;0,0,1&#62;, 0, 0.0);
    }
}
    </PRE
><P
></P
></DIV
></P
></DIV
></DIV
><DIV
CLASS="chapter"
><HR><H1
><A
NAME="AEN427"
></A
>Chapter 5. States</H1
><P
>All scripts must have a 'default' state, which is the first
  state entered when the script starts. States contain event handlers
  that are triggered by the LSL virtual machine. All states must
  supply at least one event handler - it's not really a state without
  one.</P
><P
>When state changes, all callback settings are retained and all
  pending events are cleared.</P
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN431"
>5.1. state_entry()</A
></H2
><P
>The <A
HREF="#AEN5195"
>state_entry</A
>
	event occurs whenever a new state is
    entered, including program start, and is always the first event
    handled. No data is passed to this event handler.</P
><P
>You will usually want to set callbacks for things such as
    timers and sensor in the state_entry() callback of the state to
    put your object into a useful condition for that state.</P
><P
>Warning: It is a common mistake to assume that the state_entry()
      callback is called when you rez an object out of your
      inventory. When you derez an object into your inventory the
      current state of the script is saved, so there will not be a
      call to state_entry() during the rez. If you need to provide
      startup code every time an object is created, you should create
      a global function and call it from both state_entry() and the
      on_rez() callbacks.</P
><P
><DIV
CLASS="informalexample"
><P
></P
><A
NAME="AEN438"
></A
><PRE
CLASS="programlisting"
>&#13;// global initialization function.
init()
{
    // Set up a listen callback for whoever owns this object.
    key owner = llGetOwner();
    llListen(0, "", owner, "");
}

default
{
    state_entry()
    {
        init();
    }

    on_rez(integer start_param)
    {
        init();
    }

    listen(integer channel, string name, key id, string message)
    {
        llSay(0, "Hi " + name + "! You own me.");
    }
}
      </PRE
><P
></P
></DIV
></P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN440"
>5.2. state_exit()</A
></H2
><P
>You will want to provide a <A
HREF="#AEN5203"
>&#13;	state_exit()</A
> if you need to clean
    up any events that you have requested in the current state, but do
    not expect in the next state.</P
><P
><DIV
CLASS="informalexample"
><P
></P
><A
NAME="AEN445"
></A
><PRE
CLASS="programlisting"
>&#13;default
{
    state_entry()
    {
        state TimerState;
    }
}

state TimerState
{
    state_entry()
    {
        // set a timer event for 5 seconds in the future.
        llSetTimerEvent(5.0);
    }

    timer()
    {
        llSay(0, "timer");
        state ListenState;
    }

    state_exit()
    {
        // turn off future timer events.
        llSetTimerEvent(0.0);
    }
}

integer g_listen_control;

state ListenState
{
    state_entry()
    {
        // listen for anything on the public channel
        g_listen_control = llListen(0, "", NULL_KEY, "");
    }

    listen(integer channel, string name, key id, string message)
    {
        llSay(0, "listen");
        state TimerState;
    }

    state_exit()
    {
        // turn off the listener
        llListenRemove(g_listen_control);
    }
}
    </PRE
><P
></P
></DIV
></P
><P
>The <A
HREF="#AEN5203"
>state_exit()</A
> 
	handler is not called when an object is
    being deleted - all callbacks, handlers, sounds, etc, will be
    cleaned up automatically for you.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN449"
>5.3. States vs. Global variables</A
></H2
><P
>A state and a set of global variables can serve the same
    purpose, and each can be expressed in terms of the other. In
    general, you should prefer the use of states over global variables
    since states allow you to immediately assume script state without
    making comparisons. The less comparisons a script makes, the more
    regular code statements it can run.</P
></DIV
></DIV
><DIV
CLASS="chapter"
><HR><H1
><A
NAME="AEN452"
></A
>Chapter 6. Math</H1
><DIV
CLASS="section"
><H2
CLASS="section"
><A
NAME="AEN454"
>6.1. Tables of Functions</A
></H2
><DIV
CLASS="table"
><A
NAME="AEN456"
></A
><P
><B
>Table 6-1. Trigonometry Functions</B
></P
><TABLE
BORDER="1"
CLASS="CALSTABLE"
><COL><THEAD
><TR
><TH
>Function</TH
></TR
></THEAD
><TBODY
><TR
><TD
><A
HREF="#AEN1002"
>llAbs</A
></TD
></TR
><TR
><TD
><A
HREF="#AEN1012"
>llAcos</A
></TD
></TR
><TR
><TD
><A
HREF="#AEN1096"
>llAsin</A
></TD
></TR
><TR
><TD
><A
HREF="#AEN1106"
>llAtan2</A
></TD
></TR
><TR
><TD
><A
HREF="#AEN1212"
>llCeil</A
></TD
></TR
><TR
><TD
><A
HREF="#AEN1282"
>llCos</A
></TD
></TR
><TR
><TD
><A
HREF="#AEN1559"
>llFabs</A
></TD
></TR
><TR
><TD
><A
HREF="#AEN1569"
>llFloor</A
></TD
></TR
><TR
><TD
><A
HREF="#AEN1579"
>llFrand</A
></TD
></TR
><TR
><TD
><A
HREF="#AEN3220"
>llPow</A
></TD
></TR
><TR
><TD
><A
HREF="#AEN3618"
>llRound</A
></TD
></TR
><TR
><TD
><A
HREF="#AEN4302"
>llSin</A
></TD
></TR
><TR
><TD
><A
HREF="#AEN4335"
>llSqrt</A
></TD
></TR
><TR
><TD
><A
HREF="#AEN4678"
>llTan</A
></TD
></TR
></TBODY
></TABLE
></DIV
><DIV
CLASS="table"
><A
NAME="AEN505"
></A
><P
><B
>Table 6-2. Vector Functions</B
></P
><TABLE
BORDER="1"
CLASS="CALSTABLE"
><COL><THEAD
><TR
><TH
>Function</TH
></TR
></THEAD
><TBODY
><TR
><TD
><A
HREF="#AEN4810"
>llVecDist</A
></TD
></TR
><TR
><TD
><A
HREF="#AEN4823"
>llVecMag</A
></TD
></TR
><TR
><TD
><A
HREF="#AEN4833"
>llVecNorm</A
></TD
></TR
></TBODY
></TABLE
></DIV
><DIV
CLASS="table"
><A
NAME="AEN521"
></A
><P
><B
>Table 6-3. Rotation Functions</B
></P
><TABLE
BORDER="1"
CLASS="CALSTABLE"
><COL><THEAD
><TR
><TH
>Function</TH
></TR
></THEAD
><TBODY
><TR
><TD
><A
HREF="#AEN1057"
>llAngleBetween</A
></TD
></TR
><TR
><TD
><A
HREF="#AEN1144"
>llAxes2Rot</A
></TD
></TR
><TR
><TD
><A
HREF="#AEN1160"
>llAxisAngle2Rot</A
></TD
></TR
><TR
><TD
><A
HREF="#AEN1549"
>llEuler2Rot</A
></TD
></TR
><TR
><TD
><A
HREF="#AEN3486"
>llRot2Angle</A
></TD
></TR
><TR
><TD
><A
HREF="#AEN3496"
>llRot2Axis</A
></TD
></TR
><TR
><TD
><A
HREF="#AEN3506"
>llRot2Euler</A
></TD
></TR
><TR
><TD
><A
HREF="#AEN3516"
>llRot2Fwd</A
></TD
></TR
><TR
><TD
><A
HREF="#AEN3526"
>llRot2Left</A
></TD
></TR
><TR
><TD
><A
HREF="#AEN3536"
>llRot2Up</A
></TD
></TR
><TR
><TD
><A
HREF="#AEN3546"
>llRotBetween</A
></TD
></TR
></TBODY
></TABLE
></DIV
></DIV
></DIV
><DIV
CLASS="chapter"
><HR><H1
><A
NAME="AEN561"
></A
>Chapter 7. Strings</H1
><DIV
CLASS="section"
><H2
CLASS="section"
><A
NAME="AEN563"
>7.1. Tables of Functions</A
></H2
><DIV
CLASS="table"
><A
NAME="AEN565"
></A
><P
><B
>Table 7-1. String Functions</B
></P
><TABLE
BORDER="1"
CLASS="CALSTABLE"
><COL><THEAD
><TR
><TH
>Function</TH
></TR
></THEAD
><TBODY
><TR
><TD
><A
HREF="#AEN1173"
>llBase64ToString</A
></TD
></TR
><TR
><TD
><A
HREF="#AEN1326"
>llDeleteSubString</A
></TD
></TR
><TR
><TD
><A
HREF="#AEN2195"
>llGetSubString</A
></TD
></TR
><TR
><TD
><A
HREF="#AEN2415"
>llInsertString</A
></TD
></TR
><TR
><TD
><A
HREF="#AEN2902"
>llMD5String</A
></TD
></TR
><TR
><TD
><A
HREF="#AEN4631"
>llStringLength</A
></TD
></TR
><TR
><TD
><A
HREF="#AEN4641"
>llSubStringIndex</A
></TD
></TR
><TR
><TD
><A
HREF="#AEN4652"
>llStringToBase64</A
></TD
></TR
><TR
><TD
><A
HREF="#AEN4737"
>llToLower</A
></TD
></TR
><TR
><TD
><A
HREF="#AEN4746"
>llToUpper</A
></TD
></TR
><TR
><TD
><A
HREF="#AEN4886"
>llXorBase64Strings</A
></TD
></TR
></TBODY
></TABLE
></DIV
></DIV
></DIV
><DIV
CLASS="chapter"
><HR><H1
><A
NAME="AEN605"
></A
>Chapter 8. Lists</H1
><DIV
CLASS="section"
><H2
CLASS="section"
><A
NAME="AEN607"
>8.1. Tables of Functions</A
></H2
><DIV
CLASS="table"
><A
NAME="AEN609"
></A
><P
><B
>Table 8-1. List Functions</B
></P
><TABLE
BORDER="1"
CLASS="CALSTABLE"
><COL><THEAD
><TR
><TH
>Function</TH
></TR
></THEAD
><TBODY
><TR
><TD
><A
HREF="#AEN1202"
>llCSV2List</A
></TD
></TR
><TR
><TD
><A
HREF="#AEN1306"
>llDeleteSubList</A
></TD
></TR
><TR
><TD
><A
HREF="#AEN1875"
>llGetListEntryType</A
></TD
></TR
><TR
><TD
><A
HREF="#AEN1889"
>llGetListLength</A
></TD
></TR
><TR
><TD
><A
HREF="#AEN2454"
>llList2CSV</A
></TD
></TR
><TR
><TD
><A
HREF="#AEN2464"
>llList2Float</A
></TD
></TR
><TR
><TD
><A
HREF="#AEN2477"
>llList2Integer</A
></TD
></TR
><TR
><TD
><A
HREF="#AEN2490"
>llList2Key</A
></TD
></TR
><TR
><TD
><A
HREF="#AEN2503"
>llList2List</A
></TD
></TR
><TR
><TD
><A
HREF="#AEN2526"
>llList2ListStrided</A
></TD
></TR
><TR
><TD
><A
HREF="#AEN2544"
>llList2Rot</A
></TD
></TR
><TR
><TD
><A
HREF="#AEN2557"
>llList2String</A
></TD
></TR
><TR
><TD
><A
HREF="#AEN2570"
>llList2Vector</A
></TD
></TR
><TR
><TD
><A
HREF="#AEN2583"
>llListFindList</A
></TD
></TR
><TR
><TD
><A
HREF="#AEN2598"
>llListInsertList</A
></TD
></TR
><TR
><TD
><A
HREF="#AEN2614"
>llListRandomize</A
></TD
></TR
><TR
><TD
><A
HREF="#AEN2648"
>llListSort</A
></TD
></TR
><TR
><TD
><A
HREF="#AEN3105"
>llParseString2List</A
></TD
></TR
></TBODY
></TABLE
></DIV
></DIV
></DIV
><DIV
CLASS="chapter"
><HR><H1
><A
NAME="AEN670"
></A
>Chapter 9. Communication</H1
><DIV
CLASS="section"
><H2
CLASS="section"
><A
NAME="AEN672"
>9.1. Tables of Functions</A
></H2
><DIV
CLASS="table"
><A
NAME="AEN674"
></A
><P
><B
>Table 9-1. In World Functions</B
></P
><TABLE
BORDER="1"
CLASS="CALSTABLE"
><COL><THEAD
><TR
><TH
>Function</TH
></TR
></THEAD
><TBODY
><TR
><TD
><A
HREF="#AEN2665"
>llListen</A
></TD
></TR
><TR
><TD
><A
HREF="#AEN2686"
>llListenControl</A
></TD
></TR
><TR
><TD
><A
HREF="#AEN2701"
>llListenRemove</A
></TD
></TR
><TR
><TD
><A
HREF="#AEN3640"
>llSay</A
></TD
></TR
><TR
><TD
><A
HREF="#AEN4288"
>llShout</A
></TD
></TR
><TR
><TD
><A
HREF="#AEN4862"
>llWhisper</A
></TD
></TR
></TBODY
></TABLE
></DIV
><DIV
CLASS="table"
><A
NAME="AEN699"
></A
><P
><B
>Table 9-2. Messaging Functions</B
></P
><TABLE
BORDER="1"
CLASS="CALSTABLE"
><COL><THEAD
><TR
><TH
>Function</TH
></TR
></THEAD
><TBODY
><TR
><TD
><A
HREF="#AEN1533"
>llEmail</A
></TD
></TR
><TR
><TD
><A
HREF="#AEN1933"
>llGetNextEmail</A
></TD
></TR
><TR
><TD
><A
HREF="#AEN2431"
>llInstantMessage</A
></TD
></TR
></TBODY
></TABLE
></DIV
></DIV
></DIV
><DIV
CLASS="chapter"
><HR><H1
><A
NAME="AEN715"
></A
>Chapter 10. Inventory</H1
><DIV
CLASS="section"
><H2
CLASS="section"
><A
NAME="AEN717"
>10.1. Tables of Functions</A
></H2
><DIV
CLASS="table"
><A
NAME="AEN719"
></A
><P
><B
>Table 10-1. Inventory Functions</B
></P
><TABLE
BORDER="1"
CLASS="CALSTABLE"
><COL><THEAD
><TR
><TH
>Function</TH
></TR
></THEAD
><TBODY
><TR
><TD
><A
HREF="#AEN1047"
>llAllowInventoryDrop</A
></TD
></TR
><TR
><TD
><A
HREF="#AEN1754"
>llGetInventoryCreator</A
></TD
></TR
><TR
><TD
><A
HREF="#AEN1764"
>llGetInventoryKey</A
></TD
></TR
><TR
><TD
><A
HREF="#AEN1774"
>llGetInventoryName</A
></TD
></TR
><TR
><TD
><A
HREF="#AEN1816"
>llGetInventoryType</A
></TD
></TR
><TR
><TD
><A
HREF="#AEN1789"
>llGetInventoryNumber</A
></TD
></TR
><TR
><TD
><A
HREF="#AEN1801"
>llGetInventoryPermMask</A
></TD
></TR
><TR
><TD
><A
HREF="#AEN1946"
>llGetNotecardLine</A
></TD
></TR
><TR
><TD
><A
HREF="#AEN2314"
>llGiveInventory</A
></TD
></TR
><TR
><TD
><A
HREF="#AEN2326"
>llGiveInventoryList</A
></TD
></TR
><TR
><TD
><A
HREF="#AEN3325"
>llRemoveInventory</A
></TD
></TR
><TR
><TD
><A
HREF="#AEN3363"
>llRequestInventoryData</A
></TD
></TR
><TR
><TD
><A
HREF="#AEN3461"
>llRezObject</A
></TD
></TR
><TR
><TD
><A
HREF="#AEN3434"
>llRezAtRoot</A
></TD
></TR
></TBODY
></TABLE
></DIV
></DIV
></DIV
><DIV
CLASS="chapter"
><HR><H1
><A
NAME="AEN768"
></A
>Chapter 11. Vehicles</H1
><P
>Custom Vehicles can be constructed and controlled using the LSL.
  This chapter will cover the basics of how vehicles work, the
  terms used when describing vehicles, and a more thorough examination
  of the api available.</P
><P
>There are several ways to make scripted objects move
  themselves around. One way is to turn the object into a
  "vehicle". This feature is versatile enough to make things
  that slide, hover, fly, and float. Some of the behaviors that can be
  enabled are:</P
><P
><P
></P
><UL
><LI
STYLE="list-style-type: opencircle"
><P
>deflection of linear and angular velocity to
    preferred axis of motion</P
></LI
><LI
STYLE="list-style-type: opencircle"
><P
>&#13;		<A
HREF="#AEN956"
>asymmetric linear 
		and angular friction</A
></P
></LI
><LI
STYLE="list-style-type: opencircle"
><P
>&#13;		<A
HREF="#AEN979"
>hovering</A
> over terrain/water or 
		at a global height</P
></LI
><LI
STYLE="list-style-type: opencircle"
><P
>&#13;		<A
HREF="#AEN949"
>banking</A
> on turns
		</P
></LI
><LI
STYLE="list-style-type: opencircle"
><P
>&#13;		<A
HREF="#AEN866"
>linear</A
> and 
		<A
HREF="#AEN898"
>angular</A
> motor for 
		<A
HREF="#AEN853"
>push and turning</A
>
	</P
></LI
></UL
></P
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN790"
>11.1. Overview</A
></H2
><P
>Each scripted object can have one vehicle behavior that is
	configurable through the <A
HREF="#AEN4249"
>llSetVehicleType</A
>, <A
HREF="#AEN4235"
>llSetVehicleFloatParam</A
>,
	<A
HREF="#AEN4274"
>llSetVehicleVectorParam</A
>,
	<A
HREF="#AEN4260"
>llSetVehicleRotationParam</A
>,
	<A
HREF="#AEN4224"
>llSetVehicleFlags</A
>,
	and <A
HREF="#AEN3335"
>llRemoveVehicleFlags</A
>
	library calls.</P
><P
>These script calls are described in more detail below, but
	the important thing to notice here is that the vehicle behavior
	has several parameters that can be adjusted to change how the
	vehicle handles. Depending on the values chosen the vehicle can
	veer like a boat in water, or ride like a sled on rails.</P
><P
>Setting the vehicle flags allow you to make exceptions to
	some default behaviors. Some of these flags only have an effect
	when certain behaviors are enabled. For example, the
	VEHICLE_FLAG_HOVER_WATER_ONLY will make the vehicle ignore the
	height of the terrain, however it only makes a difference if the
	vehicle is hovering.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN801"
>11.2. Warnings</A
></H2
><P
>Vehicles are a work in progress and will
	likely experience changes in future versions of Second Life.
	Some of the details of vehicle behavior may be changed 
	as necessary to ensure stability
	and user safety. In particular, many of the limits and defaults
	described in the appendices will probably change and should not be
	relied upon in the long term.</P
><P
>It is not recommended that you mix vehicle behavior with
	some of the other script calls that provide impulse and forces to
	the object, especially <A
HREF="#AEN3773"
>llSetBuoyancy</A
>, <A
HREF="#AEN3841"
>llSetForce</A
>, <A
HREF="#AEN4200"
>llSetTorque</A
>, and <A
HREF="#AEN3872"
>llSetHoverHeight</A
>.</P
><P
>While the following methods probably don't cause any
	instabilities, their behavior may conflict with vehicles and cause
	undesired and/or inconsistent results, so use <A
HREF="#AEN2753"
>llLookAt</A
>, <A
HREF="#AEN3559"
>llRotLookAt</A
>, <A
HREF="#AEN2980"
>llMoveToTarget</A
>, and <A
HREF="#AEN4701"
>llTargetOmega</A
> at your own
	risk.</P
><P
>If you think you have found a bug relating to how vehicle's
	work, one way to submit the problem is to give a copy of the
	vehicle and script to Andrew Linden with comments or a notecard
	describing the problem. Please name all submissions "Bugged
	Vehicle XX" where XX are your Second Life initials. The
	vehicle and script will be examined at the earliest
	convenience.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN815"
>11.3. Definitions</A
></H2
><P
>&#13;	The terms "roll", "pitch", and
	"yaw" are often used to describe the modes of rotations
	that can happen to a airplane or boat. They correspond to
	rotations about the local x-, y-, and z-axis respectively.</P
><P
><DIV
CLASS="informalexample"
><P
></P
><A
NAME="AEN819"
></A
><PRE
CLASS="programlisting"
>&#13;        z-axis  .
      yaw-axis /|\
                |     __. y-axis
   ._        ___|      /| pitch-axis
  _||\       \\ |\.   /
  \|| \_______\_|__\_/_______
   | _ _   o o o o o o o    |\_  ______\ x-axis
   // ./_______,----,__________)       / roll-axis
  /_,/        //  ./
             /__,/ 
	</PRE
><P
></P
></DIV
></P
><P
>&#13;	The right-hand-rule, often introduced in beginning physics
	courses, is used to define the direction of positive rotation
	about any axis. As an example of how to use the right hand rule,
	consider a positive rotation about the roll axis. To help
	visualize how such a rotation would move the airplane, place your
	right thumb parallel to the plane's roll-axis such that the thumb
	points in the positive x-direction, then curl the four fingers
	into a fist. Your fingers will be pointing in the direction that
	the plane will spin.</P
><P
><DIV
CLASS="informalexample"
><P
></P
><A
NAME="AEN823"
></A
><PRE
CLASS="programlisting"
>&#13;    .-.--.--.--.              __
   / /  /  /  _ \            /  \
  (-(- (- (- (   | _________|______\ axis of
   \.\._\._\._)  |          |      / rotation
    |           \:__,---.  \|/
    |                    |  + positive
     \           .,_.___.'    rotation
      \_ ^ `.__,/ 
      |      / 
      |      | 
	</PRE
><P
></P
></DIV
></P
><P
>&#13;	Many of the parameters that control a vehicle's behavior are
	of the form: VEHICLE_BEHAVIOR_TIMESCALE. A behavior's
	"timescale" can usually be understood as the time for
	the behavior to push, twist, or otherwise affect the vehicle such
	that the difference between what it is doing, and what it is
	supposed to be doing, has been reduced to 1/e of what it was,
	where "e" is the natural exponent (approximately
	2.718281828). In other words, it is the timescale for exponential
	decay toward full compliance to the desired behavior. When you
	want the vehicle to be very responsive use a short timescale of
	one second or less, and if you want to disable a behavior then set
	the timescale to a very large number like 300 (5 minutes) or
	more. Note, for stability reasons, there is usually a limit to how
	small a timescale is allowed to be, and is usually on the order of
	a tenth of a second. Setting a timescale to zero is safe and is
	always equivalent to setting it to its minimum. Any feature with a
	timescale can be effectively disabled by setting the timescale so
	large that it would take them all day to have any
	effect.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN826"
>11.4. Setting the Vehicle Type</A
></H2
><P
>Before any vehicle parameters can be set the vehicle
	behavior must first be enabled. It is enabled by calling <A
HREF="#AEN4249"
>llSetVehicleType</A
> with any
	VEHICLE_TYPE_*, except VEHICLE_TYPE_NONE which will disable the
	vehicle. See the <A
HREF="#AEN6288"
>vehicle type
	constants</A
> section for currently available types. More types
	will be available soon.</P
><P
>Setting the vehicle type is necessary for enabling the
    vehicle behavior and sets all of the parameters to its default
    values. For each vehicle type listed we provide the corresponding
    equivalent code in long format. Is is
    <SPAN
CLASS="emphasis"
><I
CLASS="emphasis"
>important</I
></SPAN
> to realize that the defaults are
    <SPAN
CLASS="emphasis"
><I
CLASS="emphasis"
>not</I
></SPAN
> the optimal settings for any of these
    vehicle types and that they will definitely be changed in the
    future. Do not rely on these values to be constant until
    specified.</P
><P
>Should you want to make a unique or experimental vehicle you
	will still have to enable the vehicle behavior with one of the
	default types first, after which you will be able to change any of
	the parameters or flags within the allowed ranges.</P
><P
>Setting the vehicle type does not automatically take
	controls or otherwise move the object. However should you enable
	the vehicle behavior while the object is free to move and parked
	on a hill then it may start to slide away.</P
><P
>We're looking for new and better default vehicle types. If
    you think you've found a set of parameters that make a better car,
    boat, or any other default type of vehicle then you may submit
    your proposed list of settings to Andrew Linden via a script or
    notecard.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN837"
>11.5. Linear and Angular Deflection</A
></H2
><P
>A common feature of real vehicles is their tendency to move
	along "preferred axes of motion". That is, due to
	their wheels, wings, shape, or method of propulsion they tend to
	push or redirect themselves along axes that are static in the 
	vehicle's local frame.  This general feature defines a
	class of vehicles and included in this category a common 
	dart is a "vehicle": it
	has fins in the back such that if it were to tumble in the air it
	would eventually align itself to move point-forward -- we'll call
	this alignment effect <SPAN
CLASS="emphasis"
><I
CLASS="emphasis"
>angular 
	deflection</I
></SPAN
>.</P
><P
>A wheeled craft exhibits a 
	different effect: when a
	skateboard is pushed in some direction it will tend to redirect
	the resultant motion along that which it is free to roll -- we'll
	call this effect <SPAN
CLASS="emphasis"
><I
CLASS="emphasis"
>&#13;	linear deflection</I
></SPAN
>.</P
><P
>So a typical Second Life vehicle is an object that
	exhibits linear and/or angular deflection along the
	"preferential axes of motion".  The default
	preferential axes of motion are the local x- (at), y- (left), and
	z- (up) axes of the <SPAN
CLASS="emphasis"
><I
CLASS="emphasis"
>local frame</I
></SPAN
> of the
	vehicle's root primitive.  The deflection behaviors relate to the
	x-axis (at): linear deflection will tend to rotate its velocity
	until it points along it's positive local x-axis while the
	angular deflection will tend to reorient the vehicle such that
	it's x-axis points in the direction that it is moving.  The other
	axes are relevant to vehicle behaviors that are described later,
	such as the 
	<A
HREF="#AEN938"
>vertical attractor</A
> 
	which tries to keep a vehicle's
	local z-axis pointed toward the world z-axis (up).  The vehicle
	axes can be rotated relative to the object's actual local axes by
	using the 
	<A
HREF="#AEN990"
>VEHICLE_REFERENCE_FRAME</A
> 
	parameter, however that is an
	advanced feature and is covered in detail in a later section of
	these documents.</P
><P
>Depending on the vehicle it might be desirable to have lots
	of linear and/or angular deflection or not.  The speed of the
	deflections are controlled by setting the relevant parameters
	using the <A
HREF="#AEN4235"
>llSetVehicleFloatParam</A
>
	script call.  Each variety of deflection has a
	"timescale" parameter that determines how quickly a
	full deflection happens.  Basically the timescale it the time
	coefficient for exponential decay toward full deflection.  So, a
	vehicle that deflects quickly should have a small timescale.  For
	instance, a typical dart might have a angular deflection
	timescale of a couple of seconds but a linear deflection of
	several seconds; it will tend to reorient itself before it
	changes direction.  To set the deflection timescales of a dart
	you might use the lines below:</P
><P
><DIV
CLASS="informalexample"
><P
></P
><A
NAME="AEN850"
></A
><PRE
CLASS="programlisting"
>&#13;llSetVehicleFloatParam(VEHICLE_ANGULAR_DEFLECTION_TIMESCALE, 2.0);
llSetVehicleFloatParam(VEHICLE_LINEAR_DEFLECTION_TIMESCALE, 6.0);
	</PRE
><P
></P
></DIV
></P
><P
> Each variety of deflection has an "efficiency"
	parameter that is a slider between 0.0 and 1.0.  Unlike the other
	efficiency parameters of other vehicle behaviors, the deflection
	efficiencies do not slide between "bouncy" and
	"damped", but instead slide from "no deflection
	whatsoever" (0.0) to "maximum deflection" (1.0).
	That is, they behave much like the deflection timescales, however
	they are normalized to the range between 0.0 and 1.0.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN853"
>11.6. Moving and Steering the Vehicle</A
></H2
><P
>Once enabled, a vehicle can be pushed and rotated by
	external forces and/or from script calls such as 
	<A
HREF="#AEN1070"
>llApplyImpulse</A
>, 
	however linear and angular motors have been built in 
	to make motion smoother and easier to control.
	Their directions can be set using the 
	<A
HREF="#AEN4274"
>llSetVehicleVectorParam</A
>
	call. For example, to make the vehicle try to move at 5
	meters/second along its local x-axis (the default look-at
	direction) you would put the following line in your script:</P
><P
><DIV
CLASS="informalexample"
><P
></P
><A
NAME="AEN859"
></A
><PRE
CLASS="programlisting"
>&#13;llSetVehicleVectorParam(VEHICLE_LINEAR_MOTOR_DIRECTION, &#60;5, 0, 0&#62;);
	</PRE
><P
></P
></DIV
></P
><P
>The motor strength is not the full story, since you can also
	control how fast the motor engages (VEHICLE_LINEAR_MOTOR_TIMESCALE) 
	and there is a parameter that causes the motor's effectiveness to 
	decay over time (VEHICLE_LINEAR_MOTOR_DECAY_TIMESCALE).</P
><P
>Steering the vehicle involves setting the 
	VEHICLE_ANGULAR_MOTOR_DIRECTION and related parameters.
	It is also possible to set some flags that allow the angular
	motor slave to your camera view when in mouselook.</P
><P
>For more details about the vehicle motors
	read the sections on the <A
HREF="#AEN866"
>linear
	</A
> and <A
HREF="#AEN898"
>angular</A
> 
	motors below.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN866"
>11.7. The Linear Motor</A
></H2
><P
>The parameters that control the linear motor are:</P
><P
><P
></P
><UL
><LI
STYLE="list-style-type: opencircle"
><P
>&#13;	VEHICLE_LINEAR_MOTOR_DIRECTION</P
><P
>A vector. 
		It is the velocity (meters/sec) that the vehicle will 
		try to attain. It points in the vehicle's local frame, and has a 
		maximum length of 40.</P
></LI
><LI
STYLE="list-style-type: opencircle"
><P
>&#13;	VEHICLE_LINEAR_MOTOR_OFFSET</P
><P
>A vector. 
		It is the offset point from the vehicle's center of mass at which 
		the linear motor's impulse is applied. This allows the linear motor
		to also cause rotational torque. It is in the vehicle's local
		frame and its maximum length is 100 meters!  No need to worry
		about stability -- if the vehicle starts to spin too fast
		(greater than about 4*PI radians per second) then angular
		velocity damping will kick in.  The reason the offset is allowed
		to be so large is so that it can compete with the other vehicle
		behaviors such as <A
HREF="#vehicle_angular_deflection"
>angular deflection</A
>
		and the <A
HREF="#AEN938"
>vertical
		attractor</A
>.  Some of the other vehicle behaviors may
		drastically reduce the effective torque from the linear motor
		offset, in which case a longer leverage arm may help.</P
></LI
><LI
STYLE="list-style-type: opencircle"
><P
>&#13;	VEHICLE_LINEAR_MOTOR_TIMESCALE</P
><P
>A float. Determines how long it takes for the motor to 
		push the vehicle to full speed.  Its minimum value is approximately
		0.06 seconds.</P
></LI
><LI
STYLE="list-style-type: opencircle"
><P
>&#13;	VEHICLE_LINEAR_MOTOR_DECAY_TIMESCALE</P
><P
>A float. The effectiveness of the motor will exponentially
		decay over this timescale, but the effectiveness will be reset 
		whenever the motor's value is explicitly set. The maximum value 
		of this decay timescale is 120 seconds,
		and this timescale is always in effect.</P
></LI
></UL
></P
><P
>The flags that affect the linear motor are:</P
><P
><P
></P
><UL
><LI
STYLE="list-style-type: opencircle"
><P
>VEHICLE_FLAG_LIMIT_MOTOR_UP</P
><P
>Useful for "ground vehicles". 
	Setting this flag will clamp the z-component of the linear
	motor (in world frame) to prevent it from defeating gravity.</P
></LI
></UL
></P
><P
>Setting the motor speed is not enough to enable all
	interesting vehicles. For example, some will want a car that
	immediately gets up to the speed they want, while others will want
	a boat that slowly climbs up to its maximum velocity. To control
	this effect the VEHICLE_LINEAR_MOTOR_TIMESCALE parameter can be 
	used. Basically the "timescale" of a motor is the
	time constant for the vehicle to exponentially accelerate toward
	its full speed.</P
><P
>What would happen if you were to accidentally set the
	vehicle's linear velocity to maximum possible speed and then let
	go? It would run away and never stop, right? Not necessarily: an
	automatic "motor decay" has been built in such that all
	motors will gradually decrease their effectiveness after being
	set.</P
><P
>Each time the linear motor's vector is set its 
	"grip"
	immediately starts to decay exponentially with a timescale
	determined by the VEHICLE_LINEAR_MOTOR_DECAY_TIMESCALE, such
	that after enough time the motor ceases to have any effect.
	This decay timescale serves two purposes.  First, since it
	<SPAN
CLASS="emphasis"
><I
CLASS="emphasis"
>cannot</I
></SPAN
> be set longer than 120 seconds, 
	and is <SPAN
CLASS="emphasis"
><I
CLASS="emphasis"
>always</I
></SPAN
> enabled it
	guarantees that a vehicle will not push itself about forever 
	in the absence
	of active control (from keyboard commands or some logic loop in
	the script).  Second, it can be used to push some vehicles around
	using a simple impulse model.  That is, rather than setting the
	motor "on" or "off" depending on whether
	a particular key is pressed "down" or "up"
	the decay timescale can be set short and the motor can be set 
	"on" whenever the key transitions from "up"
	to "down" and allowed to automatically decay.</P
><P
> Since the motor's effectiveness is reset whenever the
	motor's vector is set, then setting it to a vector of length zero
	is different from allowing it to decay completely. The first case
	will cause the vehicle to try to reach zero velocity, while the
	second will leave the motor impotent.</P
><P
>The two motor timescales have very similar names, but have
	different effects, so try not to get them confused.
	VEHICLE_LINEAR_MOTOR_TIMESCALE is the time for motor to
	"win", and VEHICLE_LINEAR_MOTOR_DECAY_TIMESCALE is the
	time for the motor's "effectiveness" to decay toward
	zero. If you set one when you think you are changing the other
	you will have frustrating results. Also, if the motor's decay
	timescale is shorter than the regular timescale, then the
	effective magnitude of the motor vector will be
	diminished.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN898"
>11.8. The Angular Motor</A
></H2
><P
>The parameters that control the angular motor are:</P
><P
><P
></P
><UL
><LI
STYLE="list-style-type: opencircle"
><P
>&#13;	VEHICLE_ANGULAR_MOTOR_DIRECTION</P
><P
>A vector. It is the angular velocity (radians/sec) 
		that the vehicle will try to rotate. It points in the vehicle's 
		local frame, and has a maximum value of 4*PI (two revolutions
		per second).</P
></LI
><LI
STYLE="list-style-type: opencircle"
><P
>&#13;	VEHICLE_ANGULAR_MOTOR_TIMESCALE</P
><P
>A float. Determines how long it takes for the motor to 
		spin the vehicle to full speed.  Its minimum value is approximately
		0.06 seconds.</P
></LI
><LI
STYLE="list-style-type: opencircle"
><P
>&#13;	VEHICLE_ANGULAR_MOTOR_DECAY_TIMESCALE</P
><P
>A float. The effectiveness of the motor will exponentially
		decay over this timescale, but the effectiveness will be reset 
		whenever the motor's value is explicitly set. The maximum value 
		of this decay timescale is 120 seconds,
		and this timescale is always in effect.</P
></LI
></UL
></P
><P
>Like the linear motor the angular motor can be set explicitly,
	and has magnitude/direction, a timescale, and a decay timescale.  </P
><P
>When it comes to actually steering a vehicle there are 
	several ways to do it.  One way would be for the script to grab
	keyboard input and to explicitly turn the motor on/off based on 
	which keys are pressed.  When steering this way you probably 
	don't want it to turn very far or for very long. One way to do
	it using the angular motor would be to leave the decay timescale
	long, enable a significant amount of angular friction (to
	quickly slow the vehicle down when the motor is turned off) then
	set the angular motor to a large vector on a key press, and set
	it to zero when the key is released.  That has the effect of
	making the vehicle unresponsive to external collisions, due to
	the angular friction.</P
><P
>Another way to do it is to set the
	VEHICLE_ANGULAR_MOTOR_DECAY_TIMESCALE to a short value and push
	the vehicle about with a more impulsive method that sets the
	motor fast on a key press down (and optionally setting the motor
	to zero on a key up) relying on the automatic exponential decay
	of the motor's effectiveness rather than a constant angular 
	friction.</P
><P
>Finally, it may be possible to discard the angular motor
	entirely and use the VEHICLE_LINEAR_MOTOR_OFFSET. Whenever the 
	offset has a component that is perpendicular to the direction
	of the linear motor the vehicle will rotate as it travels. 
	Note, with the incorrect values for offset and strength the 
	linear motor effect can easily cause the vehicle to tumble 
	and spin uncontrollably, so experiement with small offsets 
	first!.</P
><P
>Setting the angular motor to zero magnitude is different
	from allowing it to decay.  When the motor completely decays 
	it no longer affects the motion of the vehicle, however setting
	it to zero will reset the "grip" of the vehicle and
	will make the vehicle try to achieve zero angular velocity.
	</P
><P
>Many real vehicles bank (roll about their
	forward axis) to effect a turn, such as motorcycles and airplanes. 
	To make it easier to build banking vehicles there is 
	<A
HREF="#AEN949"
>banking behavior</A
> 
	available which can be controlled by setting other parameters and is
	described in more detail here.</P
><P
>It is also possible to make a 
	<A
HREF="#AEN921"
>vehicle turn in response 
	to changing the camera view</A
> 
	(right now this only works in mouselook).</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN921"
>11.9. Using the Camera to Steer</A
></H2
><P
>The vehicle can be instructed to rotate its forward axis
	to point in the same direction as the camera view. This
	is achieved by setting some flags that change how the 
	VEHICLE_ANGULAR_MOTOR_DIRECTION is interpreted. When used properly
	this feature has the advantage of being able to provide simple
	and stable steering that is resilient to bad render frame rates
	on the client.  </P
><P
>The flags that affect the angular motor are:</P
><P
><P
></P
><UL
><LI
STYLE="list-style-type: opencircle"
><P
>&#13;	VEHICLE_FLAG_MOUSELOOK_STEER</P
><P
>Steer the vehicle using the mouse.  Use this flag to make 
	the angular motor try to make the vehicle
	turn such that its local x-axis points in the same direction as 
	the client-side camera.</P
></LI
><LI
STYLE="list-style-type: opencircle"
><P
>&#13;	VEHICLE_FLAG_MOUSELOOK_BANK</P
><P
>Same as above, but relies on banking.  It remaps left-right 
	motions of the client camera (also known as "yaw") to rotations about 
	the vehicle's local x-axis (also known as "roll").  </P
></LI
><LI
STYLE="list-style-type: opencircle"
><P
>&#13;	VEHICLE_FLAG_CAMERA_DECOUPLED</P
><P
>Makes mouselook camera rotate independently of the vehicle.
	By default the client mouselook camera will rotate about
	with the vehicle, however when this flag is set the camera
	direction is independent of the vehicle's rotation.</P
></LI
></UL
></P
><P
>When using the VEHICLE_FLAG_MOUSELOOK_STEER (or 
	VEHICLE_FLAG_MOUSELOOK_BANK) the meaning of the 
	VEHICLE_ANGULAR_MOTOR_DIRECTION parameter subtly changes.  Instead
	of representing the "angular velocity" of the motor
	the components of the parameter scale the "measured angular
	velocity" (as determined by the rotation between 
	the client's camera view direction and the forward-axis of the vehicle)
	to compute the "final angular velocity".  That is,
	suppose you set the angular motor to &#60;0, 0, 5&#62;, then moved the
	camera view to be PI/4 radians to the left of the vehicle's forward axis,
	and down PI/8 toward the ground.
	The measured angular velocity would be &#60;0, -PI/8, PI/4&#62; 
	radians/second, but the final velocity would be &#60;0, 0, 5*PI/4&#62;...
	the vehicle will turn left, but will not dip its nose down.
	Thus, by setting a component of the VEHICLE_ANGULAR_MOTOR_DIRECTION 
	to zero, one can negate the pitch or yaw response of the motor, 
	or even scale one to be much more responsive than the other.
	</P
><P
>The VEHICLE_ANGULAR_MOTOR_TIMESCALE still has an effect when
	using mouselook control, and scales the global responsiveness of the
	angular motor.  The VEHICLE_ANGULAR_MOTOR_DECAY_TIMESCALE, on the other
	hand, is ignored when using mouselook controls.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN938"
>11.10. The Vertical Attractor</A
></H2
><P
>Some vehicles, like boats, should always keep their up-side
	up. This can be done by enabling the "vertical
	attractor" behavior that springs the vehicle's local z-axis
	to the world z-axis (a.k.a. "up"). To take advantage of
	this feature you would set the VEHICLE_VERTICAL_ATTRACTION_TIMESCALE
	to control the period of the spring frequency, and then set the
	VEHICLE_VERTICAL_ATTRACTION_EFFICIENCY to control the damping. An
	efficiency of 0.0 will cause the spring to wobble around its
	equilibrium, while an efficiency of 1.0 will cause the spring to
	reach it's equilibrium with exponential decay.</P
><P
><DIV
CLASS="informalexample"
><P
></P
><A
NAME="AEN942"
></A
><PRE
CLASS="programlisting"
>&#13;llSetVehicleVectorParam(VEHICLE_VERTICAL_ATTRACTION_TIMESCALE, 4.0);
llSetVehicleVectorParam(VEHICLE_VERTICAL_ATTRACTION_EFFICIENCY, 0.5);
	</PRE
><P
></P
></DIV
></P
><P
>The vertical attractor is disabled by setting its timescale
	to anything larger than 300 seconds.</P
><P
>Note that by default the vertical attractor will prevent the
	vehicle from diving and climbing. So, if you wanted to make a
	airplane you would probably want to unlock the attractor around the
	pitch axis by setting the VEHICLE_FLAG_LIMIT_ROLL_ONLY bit:</P
><P
><DIV
CLASS="informalexample"
><P
></P
><A
NAME="AEN947"
></A
><PRE
CLASS="programlisting"
>&#13;llSetVehicleFlags(VEHICLE_FLAG_LIMIT_ROLL_ONLY);
	</PRE
><P
></P
></DIV
></P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN949"
>11.11. Banking</A
></H2
><P
>The <A
HREF="#AEN938"
>&#13;	vertical attractor</A
> feature must be enabled in order for
	the banking behavior to function. The way banking works is this: a
	rotation around the vehicle's roll-axis will produce a angular
	velocity around the yaw-axis, causing the vehicle to turn. The
	magnitude of the yaw effect will be proportional to the
	VEHICLE_BANKING_EFFICIENCY, the angle of the roll rotation, and
	sometimes the vehicle's velocity along it's preferred axis of
	motion.</P
><P
>The VEHICLE_BANKING_EFFICIENCY can vary between -1 and +1. When
	it's positive then any positive rotation (by the right-hand rule)
	about the roll-axis will effect a (negative) torque around the
	yaw-axis, making it turn to the right -- that is the vehicle will
	lean into the turn, which is how real airplanes and motorcycle's
	work. Negating the banking coefficient will make it so that the
	vehicle leans to the outside of the turn (not very
	"physical" but might allow interesting vehicles so why
	not?).</P
><P
>The VEHICLE_BANKING_MIX is a fake (i.e. non-physical)
	parameter that is useful for making banking vehicles do what you
	want rather than what the laws of physics allow. For example,
	consider a real motorcycle... it must be moving forward in order
	for it to turn while banking, however video-game motorcycles are
	often configured to turn in place when at a dead stop -- because
	they're often easier to control that way using the limited
	interface of the keyboard or game controller. The
	VEHICLE_BANKING_MIX enables combinations of both realistic and
	non-realistic banking by functioning as a slider between a banking
	that is correspondingly totally static (0.0) and totally dynamic
	(1.0). By "static" we mean that the banking effect
	depends only on the vehicle's rotation about it's roll-axis
	compared to "dynamic" where the banking is also
	proportional to it's velocity along it's roll-axis. Finding the
	best value of the "mixture" will probably require trial
	and error.</P
><P
>The time it takes for the 
	banking behavior to defeat a
	pre-existing angular velocity about the world z-axis is determined
	by the VEHICLE_BANKING_TIMESCALE. So if you want the vehicle to
	bank quickly then give it a banking timescale of about a second or
	less, otherwise you can make a sluggish vehicle by giving it a
	timescale of several seconds.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN956"
>11.12. Friction Timescales</A
></H2
><P
>&#13;	VEHICLE_LINEAR_FRICTION_TIMESCALE is a vector parameter that
	defines the timescales for the vehicle to come to a complete stop
	along the three local axes of the 
	<A
HREF="#AEN990"
>vehicle's reference frame</A
>.
	The timescale along each axis is independent of the others.
	For example, a sliding ground car would probably have very little
	friction along its x- and z-axes (so it can easily slide forward
	and fall down) while there would usually significant friction
	along its y-axis:</P
><P
><DIV
CLASS="informalexample"
><P
></P
><A
NAME="AEN961"
></A
><PRE
CLASS="programlisting"
>&#13;llSetVehicleVectorParam(VEHICLE_LINEAR_FRICTION_TIMESCALE, &#60;1000, 1000, 3&#62;);
	</PRE
><P
></P
></DIV
></P
><P
>Remember that a longer timescale corresponds to a weaker
	friction, hence to effectively disable all linear friction you
	would set all of the timescales to large values.</P
><P
>Setting the linear friction as a scalar is allowed, and has
	the effect of setting all of the timescales to the same
	value. Both code snippets below are equivalent, and both make friction
	negligible:</P
><P
><DIV
CLASS="informalexample"
><P
></P
><A
NAME="AEN966"
></A
><PRE
CLASS="programlisting"
>&#13;// set all linear friction timescales to 1000
llSetVehicleVectorParam(VEHICLE_LINEAR_FRICTION_TIMESCALE, &#60;1000, 1000, 1000&#62;);
	</PRE
><P
></P
></DIV
></P
><P
><DIV
CLASS="informalexample"
><P
></P
><A
NAME="AEN969"
></A
><PRE
CLASS="programlisting"
>&#13;// same as above, but fewer characters
llSetVehicleFloatParam(VEHICLE_LINEAR_FRICTION_TIMESCALE, 1000);
	</PRE
><P
></P
></DIV
></P
><P
>&#13;	VEHICLE_ANGULAR_FRICTION_TIMESCALE is also a vector
	parameter that defines the timescales for the vehicle to stop
	rotating about the x-, y-, and z-axes, and are set and disabled in
	the same way as the linear friction.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN972"
>11.13. Buoyancy</A
></H2
><P
>The vehicle has a built-in buoyancy feature that is 
	independent of the <A
HREF="#AEN3773"
>llSetBuoyancy</A
> call.  It
	is recommended that the two buoyancies do not mix!  To make
	a vehicle buoyant, set the VEHICLE_BUOYANCY parameter to something
	between -1.0 (extra gravity) to 1.0 (full anti-gravity).
	</P
><P
>The buoyancy behavior is independent of hover, however
	in order for hover to work without a large offset of the 
	VEHICLE_HOVER_HEIGHT, the VEHICLE_BUOYANCY should be set to 1.0.
	</P
><P
>It is not recommended that you mix vehicle buoyancy with
	the <A
HREF="#AEN3773"
>llSetBuoyancy</A
> script call.
	It would probably cause the object to fly up into space.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN979"
>11.14. Hover</A
></H2
><P
>The hover behavior is enabled by setting the 
	VEHICLE_HOVER_TIMESCALE to a value less than 300 seconds; larger
	timescales totally disable it.  Most vehicles will work 
	best with short hover timescales of a few seconds or less.
	The shorter the timescale, the faster the vehicle will 
	slave to is target height.  Note, that if the values of
	VEHICLE_LINEAR_FRICTION_TIMESCALE may affect the speed of
	the hover.</P
><P
>Hover is independent of buoyancy, however the 
	VEHICLE_BUOYANCY should be set to 1.0, otherwise the vehicle
	will not lift itself off of the ground until the 
	VEHICLE_HOVER_HEIGHT is made large enough to counter the
	acceleration of gravity, and the vehicle will never float
	all the way to its target height.  </P
><P
>The VEHICLE_HOVER_EFFICIENCY can be thought of as a slider
	between bouncy (0.0) and smoothed (1.0).  When in the
	bouncy range the vehicle will tend to hover a little lower than 
	its target height and the VEHICLE_HOVER_TIMESCALE will be
	approximately the oscillation period of the bounce (the real
	period will tend to be a little longer than the timescale).</P
><P
>For performance reasons, until improvements are made to the
	Second Life physics engine the vehicles can only hover over the
	terrain and water, so they will not be able to hover above
	objects made out of primitives, such as bridges and houses. By
	default the hover behavior will float over terrain and water,
	however this can be changed by setting some flags: </P
><P
>If you wanted to make a boat you should set the 
	<A
HREF="#const_vehicle_flag_hover_water_only"
>&#13;	VEHICLE_HOVER_WATER_ONLY </A
> flag, or if you wanted to drive a hover
	tank under water you would use the 
	<A
HREF="#const_vehicle_flag_hover_terrain_only"
>&#13;	VEHICLE_HOVER_TERRAIN_ONLY </A
> flag instead.  
	Finally, if you wanted to make a submarine or a balloon you would use the 
	<A
HREF="#const_vehicle_flag_hover_global_height"
>&#13;	VEHICLE_FLAG_HOVER_GLOBAL_HEIGHT</A
>.  Note that
	the flags are independent of each other and that setting two 
	contradictory flags will have undefined behavior.  The flags are 
	set using the script call llSetVehicleFlags().</P
><P
>The VEHICLE_HOVER_HEIGHT determines 
	how high the vehicle
	will hover over the terrain and/or water, or the global height, 
	and has a maximum value of 100 meters.  Note that for hovering
	purposes the "center" of the vehicle is its "center of mass"
	which is not always obvious to the untrained eye, and it 
	changes when avatar's sit on the vehicle.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN990"
>11.15. Reference Frame</A
></H2
><P
>The vehicle relies on the x- (at), y- (left), and z- (up)
	axes in order to figure out which way it prefers to move and
	which end is up.  By default these axes are identical to the
	local axes of the root primitive of the object, however this
	means that the vehicle's root primitive must, by default, be
	oriented to agree with the designed at, left, and up axes of the
	vehicle.  But, what if the vehicle object was already pre-built
	with the root primitive in some non-trivial orientation
	relative to where the vehicle as a whole should move?  This is
	where the VEHICLE_REFERENCE_FRAME parameter becomes useful; the
	vehicle's axes can be arbitrarily reoriented by setting this
	parameter.  </P
><P
>As an example, suppose you had built a rocket out of a big
	cylinder, a cone for the nose, and some stretched cut boxes for
	the fins, then linked them all together with the cylinder as the
	root primitive.  Ideally the rocket would move nose-first,
	however the cylinder's axis of symmetry is its local z-axis while
	the default "at-axis" of the vehicle, the axis it will
	want to deflect to forward under angular deflection, is the local
	x-axis and points out from the curved surface of the cylinder.
	The script code below will rotate the vehicle's axes such that
	the local z-axis becomes the "at-axis" and the local
	negative x-axis becomes the "up-axis":</P
><P
><DIV
CLASS="informalexample"
><P
></P
><A
NAME="AEN995"
></A
><PRE
CLASS="programlisting"
>&#13;// rotate the vehicle frame -PI/2 about the local y-axis (left-axis)
rotation rot = llEuler2Rot(0, PI/2, 0);
llSetVehicleRotationParam(VEHICLE_REFERENCE_FRAME, rot);
</PRE
><P
></P
></DIV
></P
><P
>Another example of how the reference frame parameter could
	be used is to consider flying craft that uses the vertical
	attractor for stability during flying but wants to use VTOL
	(vertical takeoff and landing).  During flight the craft's dorsal
	axis should point up, but during landing its nose-axis should be
	up.  To land the vehicle: while the 
	<A
HREF="#AEN938"
>vertical attractor</A
> 
	is in effect, rotate the existing VEHICLE_REFERENCE_FRAME by +PI/2
	about the left-axis, then the vehicle will pitch up such that
	it's nose points toward the sky.  The vehicle could be allowed to
	fall to the landing pad under friction, or a decreasing hover
	effect.  </P
></DIV
></DIV
><DIV
CLASS="appendix"
><HR><H1
><A
NAME="AEN999"
></A
>Appendix A. Linden Library Functions</H1
><P
>Complete listing of the Linden Library function calls
  available in lsl.</P
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN1002"
>A.1. llAbs</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN1004"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>integer llAbs</CODE
>(integer val);</CODE
></P
><P
></P
></DIV
><P
>Returns the absolute value of
    <CODE
CLASS="parameter"
>val</CODE
>.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN1012"
>A.2. llAcos</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN1014"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>float llAcos</CODE
>(float val);</CODE
></P
><P
></P
></DIV
><P
>Returns the arccosine in radians of
    <CODE
CLASS="parameter"
>val</CODE
>.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN1022"
>A.3. llAddToLandPassList</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN1024"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>llAddToLandPassList</CODE
>(key avatar, float hours);</CODE
></P
><P
></P
></DIV
><P
>Add <CODE
CLASS="parameter"
>avatar</CODE
> to the land pass list for 
    <CODE
CLASS="parameter"
>hours</CODE
>.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN1035"
>A.4. llAdjustSoundVolume</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN1037"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>llAdjustSoundVolume</CODE
>(float volume);</CODE
></P
><P
></P
></DIV
><P
>Adjusts the volume of the currently playing attached sound
    started with <A
HREF="#AEN3184"
>llPlaySound</A
> or
    <A
HREF="#AEN2773"
>llLoopSound</A
>. This function
    Has no effect on sounds started with <A
HREF="#AEN4756"
>llTriggerSound</A
>.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN1047"
>A.5. llAllowInventoryDrop</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN1049"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>llAllowInventoryDrop</CODE
>(integer add);</CODE
></P
><P
></P
></DIV
><P
>If <CODE
CLASS="parameter"
>add</CODE
> == TRUE, users that do no have
    object modify permissions can still drop inventory items onto
    object.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN1057"
>A.6. llAngleBetween</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN1059"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>float llAngleBetween</CODE
>(rotation a, rotation b);</CODE
></P
><P
></P
></DIV
><P
>Returns the angle in radians between rotations
    <CODE
CLASS="parameter"
>a</CODE
> and <CODE
CLASS="parameter"
>b</CODE
>.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN1070"
>A.7. llApplyImpulse</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN1072"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>llApplyImpulse</CODE
>(vector force, integer local);</CODE
></P
><P
></P
></DIV
><P
>Applies the <CODE
CLASS="parameter"
>impulse</CODE
> in local
    coordinates if <CODE
CLASS="parameter"
>local</CODE
> == TRUE. Otherwise the
    impulse is applied in global coordinates. This function only works
    on physical objects.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN1083"
>A.8. llApplyRotationalImpulse</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN1085"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>llApplyRotationalImpulse</CODE
>(vector force, integer local);</CODE
></P
><P
></P
></DIV
><P
>Applies a rotational <CODE
CLASS="parameter"
>impulse</CODE
> force in
    local coordinates if <CODE
CLASS="parameter"
>local</CODE
> ==
    TRUE. Otherwise the impulse is applied in global coordinates. This
    function only works on physical objects.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN1096"
>A.9. llAsin</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN1098"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>float llAsin</CODE
>(float val);</CODE
></P
><P
></P
></DIV
><P
>Returns the arcsine in radians of
    <CODE
CLASS="parameter"
>val</CODE
>.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN1106"
>A.10. llAtan2</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN1108"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>float llAtan2</CODE
>(float y, float x);</CODE
></P
><P
></P
></DIV
><P
>returns the arctangent2 of <CODE
CLASS="parameter"
>y</CODE
>,
    <CODE
CLASS="parameter"
>x</CODE
></P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN1119"
>A.11. llAttachToAvatar</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN1121"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>llAttachToAvatar</CODE
>(key avatar, integer attachment);</CODE
></P
><P
></P
></DIV
><P
>Attach to <CODE
CLASS="parameter"
>avatar</CODE
> at point <A
HREF="#AEN5448"
><CODE
CLASS="parameter"
>attachment</CODE
></A
>.
    Requires the <A
HREF="#const_permission_attach"
>PERMISSION_ATTACH</A
> runtime
    permission.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN1134"
>A.12. llAvatarOnSitTarget</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN1136"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>key llAvatarOnSitTarget</CODE
>(void);</CODE
></P
><P
></P
></DIV
><P
>If an avatar is sitting on the sit target, return
    the avatar's key, <A
HREF="#AEN6070"
>NULL_KEY</A
> otherwise.
    This only will detect avatars sitting on sit targets defined with <A
HREF="#AEN4312"
>llSitTarget</A
>.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN1144"
>A.13. llAxes2Rot</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN1146"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>rotation llAxes2Rot</CODE
>(vector fwd, vector left, vector up);</CODE
></P
><P
></P
></DIV
><P
>Returns the rotation represented by coordinate axes
    <CODE
CLASS="parameter"
>fwd</CODE
>, <CODE
CLASS="parameter"
>left</CODE
>, and
    <CODE
CLASS="parameter"
>up</CODE
>.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN1160"
>A.14. llAxisAngle2Rot</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN1162"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>rotation llAxisAngle2Rot</CODE
>(vector axis, float angle);</CODE
></P
><P
></P
></DIV
><P
>Returns the rotation generated <CODE
CLASS="parameter"
>angle</CODE
>
    about <CODE
CLASS="parameter"
>axis</CODE
>.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN1173"
>A.15. llBase64ToString</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN1175"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>string llBase64ToString</CODE
>(string str);</CODE
></P
><P
></P
></DIV
><P
>Converts a Base 64 string to a conventional string. If the
  conversion creates any unprintable characters, they are converted to
  spaces.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN1182"
>A.16. llBreakAllLinks</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN1184"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>llBreakAllLinks</CODE
>(void);</CODE
></P
><P
></P
></DIV
><P
>Delinks all objects in the link set. Requires the permission
    <A
HREF="#const_permission_change_links"
>PERMISSION_CHANGE_LINKS</A
>
    be set.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN1191"
>A.17. llBreakLink</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN1193"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>llBreakLink</CODE
>(integer linknum);</CODE
></P
><P
></P
></DIV
><P
>Delinks the object with the given
    <CODE
CLASS="parameter"
>link</CODE
> number. Requires permission <A
HREF="#const_permission_change_links"
>PERMISSION_CHANGE_LINKS</A
>
    be set.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN1202"
>A.18. llCSV2List</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN1204"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>list llCSV2List</CODE
>(string src);</CODE
></P
><P
></P
></DIV
><P
>Create a list from a string of comma separated values
    specified in <CODE
CLASS="parameter"
>src</CODE
>.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN1212"
>A.19. llCeil</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN1214"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>integer llCeil</CODE
>(float val);</CODE
></P
><P
></P
></DIV
><P
>Returns largest integer value &#62;=
    <CODE
CLASS="parameter"
>val</CODE
>.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN1222"
>A.20. llCloseRemoteDataChannel</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN1224"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>llCloseRemoteDataChannel</CODE
>(key channel);</CODE
></P
><P
></P
></DIV
><P
>Closes XML-RPC channel.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN1231"
>A.21. llCloud</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN1233"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>float llCloud</CODE
>(vector offset);</CODE
></P
><P
></P
></DIV
><P
>Returns the cloud density at the object position +
    <CODE
CLASS="parameter"
>offset</CODE
>.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN1241"
>A.22. llCollisionFilter</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN1243"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>llCollisionFilter</CODE
>(string name, key id, integer accept);</CODE
></P
><P
></P
></DIV
><P
>If <CODE
CLASS="parameter"
>accept</CODE
> == TRUE, only accept
    collisions with objects <CODE
CLASS="parameter"
>name</CODE
> and
    <CODE
CLASS="parameter"
>id</CODE
>, otherwise with objects not
    <CODE
CLASS="parameter"
>name</CODE
> or <CODE
CLASS="parameter"
>id</CODE
>. Specify
    an empty string or <A
HREF="#AEN6070"
>NULL_KEY</A
> to
    not filter on the corresponding parameter.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN1260"
>A.23. llCollisionSound</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN1262"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>llCollisionSound</CODE
>(string impact_sound, float impact_volume);</CODE
></P
><P
></P
></DIV
><P
>Suppress default collision sounds, replace default impact
    sounds with <CODE
CLASS="parameter"
>impact_sound</CODE
> found in the
    object inventory. Supply an empty string to suppress collision
    sounds.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN1272"
>A.24. llCollisionSprite</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN1274"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>llCollisionSprite</CODE
>(string impact_sprite);</CODE
></P
><P
></P
></DIV
><P
>Suppress default collision sprites, replace default impact
    sprite with <CODE
CLASS="parameter"
>impact_sprite</CODE
> found in the
    object inventory. Supply an empty string to just suppress.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN1282"
>A.25. llCos</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN1284"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>float llCos</CODE
>(float theta);</CODE
></P
><P
></P
></DIV
><P
>Returns the cosine of <CODE
CLASS="parameter"
>theta</CODE
>
    radians.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN1292"
>A.26. llCreateLink</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN1294"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>llCreateLink</CODE
>(key target, integer parent);</CODE
></P
><P
></P
></DIV
><P
>Attempt to link object script is attached to and
    <CODE
CLASS="parameter"
>target</CODE
>. Requires permission <A
HREF="#const_permission_change_links"
>PERMISSION_CHANGE_LINKS</A
>
    be set. If <CODE
CLASS="parameter"
>parent</CODE
> == TRUE, object script is
    attached to is the root.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN1306"
>A.27. llDeleteSubList</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN1308"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>list llDeleteSubList</CODE
>(list src, integer start, integer end);</CODE
></P
><P
></P
></DIV
><P
>Remove the slice from the list and return the remainder.
    The <CODE
CLASS="parameter"
>start</CODE
> and <CODE
CLASS="parameter"
>end</CODE
>
    are inclusive, so 0, length - 1 would delete the entire list and
    0,0 would delete the first list entry. Using negative numbers for
    <CODE
CLASS="parameter"
>start</CODE
> and/or <CODE
CLASS="parameter"
>end</CODE
>
    causes the index to count backwards from the length of the list,
    so 0,-1 would delete the entire list. If
    <CODE
CLASS="parameter"
>start</CODE
> is larger than
    <CODE
CLASS="parameter"
>end</CODE
> the list deleted is the exclusion of the
    entries, so 6,4 would delete the entire list except for the
    5<SUP
>th</SUP
> list entry.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN1326"
>A.28. llDeleteSubString</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN1328"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>string llDeleteSubString</CODE
>(string src, integer start, integer end);</CODE
></P
><P
></P
></DIV
><P
>Removes the indicated substring and returns the result. The
    <CODE
CLASS="parameter"
>start</CODE
> and <CODE
CLASS="parameter"
>end</CODE
> are
    inclusive, so 0,length-1 would delete the entire string and 0,0
    would delete the first character. Using negative numbers for
    <CODE
CLASS="parameter"
>start</CODE
> and/or <CODE
CLASS="parameter"
>end</CODE
>
    causes the index to count backwards from the length of the string,
    so 0,-1 would delete the entire string. If
    <CODE
CLASS="parameter"
>start</CODE
> is larger than end the sub string is
    the exclusion of the entries, so 6,4 would delete the entire
    string except for the 5<SUP
>th</SUP
>
    character.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN1345"
>A.29. llDetachFromAvatar</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN1347"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>llDetachFromAvatar</CODE
>(key avatar);</CODE
></P
><P
></P
></DIV
><P
>Drop off of <CODE
CLASS="parameter"
>avatar</CODE
>.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="lib_lldetected"
>A.30. llDetectedGrab</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN1357"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>vector llDetectedGrab</CODE
>(integer number);</CODE
></P
><P
></P
></DIV
><P
>Returns the grab offset of detected object
    <CODE
CLASS="parameter"
>number</CODE
>. Returns &#60;0,0,0&#62; if number is
    not valid sensed object.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN1365"
>A.31. llDetectedGroup</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN1367"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>integer llDetectedGroup</CODE
>(integer number);</CODE
></P
><P
></P
></DIV
><P
>Returns TRUE if detected object
    <CODE
CLASS="parameter"
>number</CODE
> is part of same group as
    owner.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN1375"
>A.32. llDetectedKey</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN1377"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>key llDetectedKey</CODE
>(integer number);</CODE
></P
><P
></P
></DIV
><P
>Returns the key of detected object
    <CODE
CLASS="parameter"
>number</CODE
>. Returns <A
HREF="#AEN6070"
>NULL_KEY</A
> if number is not valid sensed
    object.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN1386"
>A.33. llDetectedLinkNumber</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN1388"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>integer llDetectedLinkNumber</CODE
>(integer number);</CODE
></P
><P
></P
></DIV
><P
>Returns the link position of the triggered event for
    touches. 0 for a non-linked object, 1 for the root of a linked
    object, 2 for the first child, etc.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN1395"
>A.34. llDetectedName</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN1397"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>string llDetectedName</CODE
>(integer number);</CODE
></P
><P
></P
></DIV
><P
>Returns the name of detected object
    <CODE
CLASS="parameter"
>number</CODE
>. Returns empty string if
    <CODE
CLASS="parameter"
>number</CODE
> is not valid sensed object.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN1406"
>A.35. llDetectedOwner</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN1408"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>key llDetectedOwner</CODE
>(integer number);</CODE
></P
><P
></P
></DIV
><P
>Returns the key of detected <CODE
CLASS="parameter"
>number</CODE
>
    object's owner. Returns invalid key if
    <CODE
CLASS="parameter"
>number</CODE
> is not valid sensed object.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN1417"
>A.36. llDetectedPos</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN1419"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>vector llDetectedPos</CODE
>(integer number);</CODE
></P
><P
></P
></DIV
><P
>Returns the position of detected object
    <CODE
CLASS="parameter"
>number</CODE
>. Returns &#60;0,0,0&#62; if
    <CODE
CLASS="parameter"
>number</CODE
> is not valid sensed object.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN1428"
>A.37. llDetectedRot</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN1430"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>rotation llDetectedRot</CODE
>(integer number);</CODE
></P
><P
></P
></DIV
><P
>Returns the rotation of detected object
    <CODE
CLASS="parameter"
>number</CODE
>. Returns &#60;0,0,0,1&#62; if
    <CODE
CLASS="parameter"
>number</CODE
> is not valid sensed object).</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN1439"
>A.38. llDetectedType</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN1441"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>integer llDetectedType</CODE
>(integer number);</CODE
></P
><P
></P
></DIV
><P
>Returns the type (AGENT, ACTIVE, PASSIVE, SCRIPTED) of
    detected object <CODE
CLASS="parameter"
>number</CODE
>. Returns 0 if
    <CODE
CLASS="parameter"
>number</CODE
> is not valid sensed object. Note
    that <CODE
CLASS="parameter"
>number</CODE
> is a bitfield, so comparisons
    need to be a bitwise and check. eg:
<DIV
CLASS="informalexample"
><P
></P
><A
NAME="AEN1451"
></A
><PRE
CLASS="programlisting"
>&#13;integer type = llDetectedType(0);
if (type &#38; AGENT)
{
  // ...do stuff with the agent
}
</PRE
><P
></P
></DIV
>
    </P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN1453"
>A.39. llDetectedVel</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN1455"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>vector llDetectedVel</CODE
>(integer number);</CODE
></P
><P
></P
></DIV
><P
>Returns the velocity of detected object
    <CODE
CLASS="parameter"
>number</CODE
>. Returns &#60;0,0,0&#62; if
    <CODE
CLASS="parameter"
>number</CODE
> is not valid sensed object.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN1464"
>A.40. llDialog</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN1466"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>llDialog</CODE
>(key avatar, string message, list buttons, integer channel);</CODE
></P
><P
></P
></DIV
><P
>Opens a "notify box" in the top-right corner of the given avatar's screen displaying the message. Up to twelve buttons can be specified in a list of strings. When the player clicks a button, the name of the button is chatted on the specified channel. Channels work just like llSay(), so channel 0 can be heard by everyone. The chat originates at the object's position, not the avatar's position. e.g.
<DIV
CLASS="informalexample"
><P
></P
><A
NAME="AEN1479"
></A
><PRE
CLASS="programlisting"
>&#13;LLDialog(who, "Are you a boy or a girl?", [ "Boy", "Girl" ], 4913);
LLDialog(who, "This shows only an OK button.", [], 192);
llDialog(who, "This chats so you can hear it.", ["Hooray"], 0);
</PRE
><P
></P
></DIV
>
    </P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN1481"
>A.41. llDie</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN1483"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>llDie</CODE
>(void);</CODE
></P
><P
></P
></DIV
><P
>Delete the object which holds the script.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN1489"
>A.42. llDumpList2String</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN1491"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>string llDumpList2String</CODE
>(list src, string separator);</CODE
></P
><P
></P
></DIV
><P
>Write the list out in a single string using separator between values.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN1500"
>A.43. llEscapeURL</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN1502"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>string llEscapeURL</CODE
>(string url);</CODE
></P
><P
></P
></DIV
><P
>Returns the string that is the URL escaped version of <CODE
CLASS="parameter"
>url</CODE
>,
    replacing spaces with %20 etc.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN1510"
>A.44. llEdgeOfWorld</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN1512"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>integer llEdgeOfWorld</CODE
>(vector pos, vector dir);</CODE
></P
><P
></P
></DIV
><P
>Returns TRUE if the line along <CODE
CLASS="parameter"
>dir</CODE
>
    from <CODE
CLASS="parameter"
>pos</CODE
> hits the edge of the world in the
    current simulator and returns FALSE if that edge crosses into
    another simulator.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN1523"
>A.45. llEjectFromLand</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN1525"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>llEjectFromLand</CODE
>(key pest);</CODE
></P
><P
></P
></DIV
><P
>Ejects <CODE
CLASS="parameter"
>pest</CODE
> from land that you
    own.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN1533"
>A.46. llEmail</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN1535"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>llEmail</CODE
>(string address, string subject, string message);</CODE
></P
><P
></P
></DIV
><P
>Sends email to <CODE
CLASS="parameter"
>address</CODE
> with
    <CODE
CLASS="parameter"
>subject</CODE
> and
    <CODE
CLASS="parameter"
>message</CODE
>.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN1549"
>A.47. llEuler2Rot</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN1551"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>rotation llEuler2Rot</CODE
>(vector vec);</CODE
></P
><P
></P
></DIV
><P
>Returns the rotation represented by Euler Angle
    <CODE
CLASS="parameter"
>vec</CODE
>.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN1559"
>A.48. llFabs</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN1561"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>float llFabs</CODE
>(float val);</CODE
></P
><P
></P
></DIV
><P
>Returns the absolute value of
    <CODE
CLASS="parameter"
>val</CODE
>.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN1569"
>A.49. llFloor</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN1571"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>integer llFloor</CODE
>(float val);</CODE
></P
><P
></P
></DIV
><P
>Returns largest integer value &#60;=
    <CODE
CLASS="parameter"
>val</CODE
>.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN1579"
>A.50. llFrand</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN1581"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>float llFrand</CODE
>(float mag);</CODE
></P
><P
></P
></DIV
><P
>Returns a pseudo-random number between [0,
    <CODE
CLASS="parameter"
>mag</CODE
>).</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN1589"
>A.51. llGetAccel</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN1591"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>vector llGetAccel</CODE
>(void);</CODE
></P
><P
></P
></DIV
><P
>Gets the acceleration.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN1597"
>A.52. llGetAttached</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN1599"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>integer llGetAttached</CODE
>(void);</CODE
></P
><P
></P
></DIV
><P
>Returns the object attachment point or 0 if not attached.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN1605"
>A.53. llGetAgentInfo</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN1607"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>integer llGetAgentInfo</CODE
>(key id);</CODE
></P
><P
></P
></DIV
><P
>Returns information about the given agent
    <CODE
CLASS="parameter"
>id</CODE
>. Returns a bitfield of <A
HREF="#AEN5767"
>agent info constants</A
>.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN1616"
>A.54. llGetAgentSize</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN1618"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>vector llGetAgentSize</CODE
>(key id);</CODE
></P
><P
></P
></DIV
><P
>If the agent <CODE
CLASS="parameter"
>id</CODE
> is in the same sim as
    the object, returns the size of the avatar.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN1626"
>A.55. llGetAlpha</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN1628"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>float llGetAlpha</CODE
>(integer face);</CODE
></P
><P
></P
></DIV
><P
>Returns the alpha of the given
    <CODE
CLASS="parameter"
>face</CODE
>. If <CODE
CLASS="parameter"
>face</CODE
> is
    <A
HREF="#AEN6073"
>ALL_SIDES</A
> the value returned is
    the mean average of all faces.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN1638"
>A.56. llGetAndResetTime</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN1640"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>float llGetAndResetTime</CODE
>(void);</CODE
></P
><P
></P
></DIV
><P
>Returns the seconds of elapsed time from an internal timer
    associated with the script. The timer is reset to zero during the
    call. The timer is also reset on rez, simulator restart, script
    reset, and in calls to <A
HREF="#AEN3426"
>llResetTime</A
>. Use <A
HREF="#AEN4188"
>llSetTimerEvent</A
> if you want a
    reliable timing mechanism.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN1648"
>A.57. llGetAnimation</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN1650"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>string llGetAnimation</CODE
>(key id);</CODE
></P
><P
></P
></DIV
><P
>Returns the currently playing animation for avatar
    <CODE
CLASS="parameter"
>id</CODE
>.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN1658"
>A.58. llGetAnimationList</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN1660"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>list llGetAnimationList</CODE
>(key id);</CODE
></P
><P
></P
></DIV
><P
>Returns a list of currently playing animations for avatar
    <CODE
CLASS="parameter"
>id</CODE
>.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN1668"
>A.59. llGetBoundingBox</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN1670"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>list llGetBoundingBox</CODE
>(key object);</CODE
></P
><P
></P
></DIV
><P
>Returns the bounding box around <CODE
CLASS="parameter"
>object</CODE
> (including any linked prims)
	relative to the root prim.  Returned value is a list of the form:
	[ (vector) min_corner, (vector) max_corner ]</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN1678"
>A.60. llGetCenterOfMass</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN1680"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>vector llGetCenterOfMass</CODE
>(void);</CODE
></P
><P
></P
></DIV
><P
>Returns the center of mass of the root object.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN1686"
>A.61. llGetColor</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN1688"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>vector llGetColor</CODE
>(integer face);</CODE
></P
><P
></P
></DIV
><P
>Returns the color of <CODE
CLASS="parameter"
>face</CODE
> as a vector
    of red, green, and blue values between 0 and 1. If
    <CODE
CLASS="parameter"
>face</CODE
> is <A
HREF="#AEN6073"
>ALL_SIDES</A
> the color returned is the
    mean average of each channel.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN1698"
>A.62. llGetCreator</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN1700"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>key llGetCreator</CODE
>(void);</CODE
></P
><P
></P
></DIV
><P
>Returns the creator of the object which has the script.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN1706"
>A.63. llGetDate</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN1708"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>string llGetDate</CODE
>(void);</CODE
></P
><P
></P
></DIV
><P
>Returns the current UTC date as YYYY-MM-DD.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN1714"
>A.64. llGetEnergy</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN1716"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>float llGetEnergy</CODE
>(void);</CODE
></P
><P
></P
></DIV
><P
>Returns how much energy is in the object as a percentage of
    maximum.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN1722"
>A.65. llGetForce</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN1724"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>vector llGetForce</CODE
>(void);</CODE
></P
><P
></P
></DIV
><P
>Returns the current force if the script is physical.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN1730"
>A.66. llGetFreeMemory</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN1732"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>integer llGetFreeMemory</CODE
>(void);</CODE
></P
><P
></P
></DIV
><P
>Returns the available heap space for the current script.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN1738"
>A.67. llGetGeometricCenter</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN1740"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>vector llGetGeometricCenter</CODE
>(void);</CODE
></P
><P
></P
></DIV
><P
>Returns the geometric center of the linked set the script is attached to.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN1746"
>A.68. llGetGMTclock</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN1748"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>float llGetGMTclock</CODE
>(void);</CODE
></P
><P
></P
></DIV
><P
>Returns the time in seconds since GMT midnight.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN1754"
>A.69. llGetInventoryCreator</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN1756"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>key llGetInventoryCreator</CODE
>(string name);</CODE
></P
><P
></P
></DIV
><P
>Returns the key for the creator of the inventory
    <CODE
CLASS="parameter"
>name</CODE
>.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN1764"
>A.70. llGetInventoryKey</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN1766"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>key llGetInventoryKey</CODE
>(string name);</CODE
></P
><P
></P
></DIV
><P
>Returns the key of the inventory
    <CODE
CLASS="parameter"
>name</CODE
>.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN1774"
>A.71. llGetInventoryName</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN1776"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>string llGetInventoryName</CODE
>(integer type, integer number);</CODE
></P
><P
></P
></DIV
><P
>Get the name of the inventory item
    <CODE
CLASS="parameter"
>number</CODE
> of <CODE
CLASS="parameter"
>type</CODE
>. Use
    the <A
HREF="#AEN5411"
>inventory constants</A
> to
    specify the <CODE
CLASS="parameter"
>type</CODE
>.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN1789"
>A.72. llGetInventoryNumber</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN1791"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>integer llGetInventoryNumber</CODE
>(integer type);</CODE
></P
><P
></P
></DIV
><P
>Get the number of items of <CODE
CLASS="parameter"
>type</CODE
> in
    the object inventory. Use the <A
HREF="#AEN5411"
>inventory constants</A
> to specify
    the <CODE
CLASS="parameter"
>type</CODE
>.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN1801"
>A.73. llGetInventoryPermMask</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN1803"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>integer llGetInventoryPermMask</CODE
>(string item, integer mask);</CODE
></P
><P
></P
></DIV
><P
>Returns the requested permission <CODE
CLASS="parameter"
>mask</CODE
> for the 
	specified inventory item.  See <A
HREF="#AEN6412"
>Permission Mask Constants</A
>
	for more information.  Example usage:
<DIV
CLASS="informalexample"
><P
></P
><A
NAME="AEN1814"
></A
><PRE
CLASS="programlisting"
>&#13;integer JeansPerms = llGetInventoryPermMask("Black Jeans", MASK_NEXT);
if (JeansPerms &#38; PERM_COPY)
{
	llSay(0, "The next owner may copy the 'Black Jeans'");
}
</PRE
><P
></P
></DIV
></P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN1816"
>A.74. llGetInventoryType</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN1818"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>integer llGetInventoryType</CODE
>(string name);</CODE
></P
><P
></P
></DIV
><P
>Returns the type of the inventory
    <CODE
CLASS="parameter"
>name</CODE
>.  INVENTORY_NONE is returned if no
	inventory matching <CODE
CLASS="parameter"
>name</CODE
> is found.  Use the <A
HREF="#AEN5411"
>inventory constants</A
> to compare
    against the return value.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN1828"
>A.75. llGetKey</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN1830"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>key llGetKey</CODE
>(void);</CODE
></P
><P
></P
></DIV
><P
>Get the key for the object which has this script.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN1836"
>A.76. llGetLandOwnerAt</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN1838"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>key llGetLandOwnerAt</CODE
>(vector pos);</CODE
></P
><P
></P
></DIV
><P
>Returns the key of the land owner at
    <CODE
CLASS="parameter"
>pos</CODE
> or <A
HREF="#AEN6070"
>NULL_KEY</A
> if public.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN1847"
>A.77. llGetLinkKey</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN1849"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>key llGetLinkKey</CODE
>(integer linknum);</CODE
></P
><P
></P
></DIV
><P
>Returns the key of <CODE
CLASS="parameter"
>linknum</CODE
> in the link
    set.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN1857"
>A.78. llGetLinkName</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN1859"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>string llGetLinkName</CODE
>(integer linknum);</CODE
></P
><P
></P
></DIV
><P
>Returns the name of <CODE
CLASS="parameter"
>linknum</CODE
> in the
    link set.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN1867"
>A.79. llGetLinkNumber</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN1869"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>integer llGetLinkNumber</CODE
>(void);</CODE
></P
><P
></P
></DIV
><P
>Returns what link number in a link set the for the object
    which has this script. 0 means no link, 1 the root, 2 for first
    child, etc.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN1875"
>A.80. llGetListEntryType</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN1877"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>integer llGetListEntryType</CODE
>(list src, integer index);</CODE
></P
><P
></P
></DIV
><P
>Returns the <A
HREF="#AEN5733"
>type</A
> of the
    variable at <CODE
CLASS="parameter"
>index</CODE
> in
    <CODE
CLASS="parameter"
>src</CODE
>.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN1889"
>A.81. llGetListLength</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN1891"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>integer llGetListLength</CODE
>(list src);</CODE
></P
><P
></P
></DIV
><P
>Returns the number of elements in
    <CODE
CLASS="parameter"
>src</CODE
>.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN1899"
>A.82. llGetLocalPos</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN1901"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>vector llGetLocalPos</CODE
>(void);</CODE
></P
><P
></P
></DIV
><P
>Returns the local position of a child object relative to the
    root.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN1907"
>A.83. llGetLocalRot</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN1909"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>rotation llGetLocalRot</CODE
>(void);</CODE
></P
><P
></P
></DIV
><P
>Returns the local rotation of a child object relative to the
    root.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN1915"
>A.84. llGetMass</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN1917"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>float llGetMass</CODE
>(void);</CODE
></P
><P
></P
></DIV
><P
>Returns the mass of the object in Kilograms. Most materials
    in Second Life are less dense than their first life counterparts,
    so the returned mass may be less than you might expect.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN1923"
>A.85. llGetObjectMass</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN1925"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>float llGetObjectMass</CODE
>(key id);</CODE
></P
><P
></P
></DIV
><P
>Returns the mass of the object specified by <CODE
CLASS="parameter"
>id</CODE
> in Kilograms. Most materials
    in Second Life are less dense than their first life counterparts,
    so the returned mass may be less than you might expect.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN1933"
>A.86. llGetNextEmail</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN1935"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>llGetNextEmail</CODE
>(string address, string subject);</CODE
></P
><P
></P
></DIV
><P
>Get the next waiting email with appropriate
    <CODE
CLASS="parameter"
>address</CODE
> and/or
    <CODE
CLASS="parameter"
>subject</CODE
>. If the parameters are blank, they
    are not used for filtering.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN1946"
>A.87. llGetNotecardLine</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN1948"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>key llGetNotecardLine</CODE
>(string name, integer line);</CODE
></P
><P
></P
></DIV
><P
>This function fetches line number
    <CODE
CLASS="parameter"
>line</CODE
> of notecard
    <CODE
CLASS="parameter"
>name</CODE
> and returns the data through the <A
HREF="#AEN4997"
>dataserver</A
> event. The line count
    starts at zero. If the requested line is past the end of the
    notecard the <A
HREF="#AEN4997"
>dataserver</A
>
    event will return the constant <A
HREF="#AEN6076"
>EOF</A
> string. The key returned by
    this function is a unique identifier which will be supplied to the
    <A
HREF="#AEN4997"
>dataserver</A
> event in the
    <CODE
CLASS="parameter"
>requested</CODE
> parameter.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN1964"
>A.88. llGetNumberOfNotecardLines</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN1966"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>key llGetNumberOfNotecardLines</CODE
>(string name);</CODE
></P
><P
></P
></DIV
><P
>This function reads the number of lines in notecard <CODE
CLASS="parameter"
>name</CODE
>
	and returns this information through the <A
HREF="#AEN4997"
>dataserver</A
> event.  
	The key returned by this function is a unique identifier which will be supplied to the
	<A
HREF="#AEN4997"
>dataserver</A
> event in the <CODE
CLASS="parameter"
>requested</CODE
> 
	parameter.  You will need to cast the returned string to an integer.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN1977"
>A.89. llGetNumberOfPrims</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN1979"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>integer llGetNumberOfPrims</CODE
>(void);</CODE
></P
><P
></P
></DIV
><P
>Returns the number of prims in the linked set the script is attached to.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN1985"
>A.90. llGetNumberOfSides</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN1987"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>key llGetNumberOfSides</CODE
>(void);</CODE
></P
><P
></P
></DIV
><P
>Returns the number of sides of the current which has the
    script.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN1993"
>A.91. llGetObjectDesc</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN1995"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>string llGetObjectDesc</CODE
>(void);</CODE
></P
><P
></P
></DIV
><P
>Returns the description of the object which has the script.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN2001"
>A.92. llGetObjectName</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN2003"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>string llGetObjectName</CODE
>(void);</CODE
></P
><P
></P
></DIV
><P
>Returns the name of the object which has the script.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN2009"
>A.93. llGetObjectPermMask</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN2011"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>integer llGetObjectPermMask</CODE
>(integer mask);</CODE
></P
><P
></P
></DIV
><P
>Returns the requested permission <CODE
CLASS="parameter"
>mask</CODE
> for the root object the
	task is attached to.  See <A
HREF="#AEN6412"
>Permission Mask Constants</A
>
	for more information.  Example usage:
<DIV
CLASS="informalexample"
><P
></P
><A
NAME="AEN2020"
></A
><PRE
CLASS="programlisting"
>&#13;integer ObjectPerms = llGetObjectPermMask(MASK_NEXT);
if (ObjectPerms &#38; PERM_COPY)
{
	llSay(0, "The next owner may copy this item");
}
</PRE
><P
></P
></DIV
></P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN2022"
>A.94. llGetOmega</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN2024"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>vector llGetOmega</CODE
>(void);</CODE
></P
><P
></P
></DIV
><P
>Returns the omega.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN2030"
>A.95. llGetOwner</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN2032"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>key llGetOwner</CODE
>(void);</CODE
></P
><P
></P
></DIV
><P
>Returns the owner of the object.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN2038"
>A.96. llGetOwnerKey</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN2040"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>key llGetOwnerKey</CODE
>(key id);</CODE
></P
><P
></P
></DIV
><P
>Returns the owner of object
    <CODE
CLASS="parameter"
>id</CODE
>.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN2048"
>A.97. llGetPermissions</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN2050"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>integer llGetPermissions</CODE
>(void);</CODE
></P
><P
></P
></DIV
><P
>Returns what permissions have been enabled. eg:
<DIV
CLASS="informalexample"
><P
></P
><A
NAME="AEN2056"
></A
><PRE
CLASS="programlisting"
>&#13;integer perm = llGetPermissions();
if((perm &#38; PERMISSION_DEBIT) == PERMISSION_DEBIT)
{
    // code goes here
}
</PRE
><P
></P
></DIV
></P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN2058"
>A.98. llGetPermissionsKey</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN2060"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>key llGetPermissionsKey</CODE
>(void);</CODE
></P
><P
></P
></DIV
><P
>Returns avatar that has enabled permissions. Returns <A
HREF="#AEN6070"
>NULL_KEY</A
> if not enabled.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN2067"
>A.99. llGetPos</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN2069"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>vector llGetPos</CODE
>(void);</CODE
></P
><P
></P
></DIV
><P
>Returns the position.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN2075"
>A.100. llGetPrimitiveParams</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN2077"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>list llGetPrimitiveParams</CODE
>(list parameters);</CODE
></P
><P
></P
></DIV
><P
>Get primitive parameters specified in <CODE
CLASS="parameter"
>parameters</CODE
>. The
	    <CODE
CLASS="parameter"
>parameters</CODE
> are identical to the rules of <A
HREF="#AEN4020"
>llSetPrimitiveParams</A
>, and the returned list is ordered as such.  Most requested parameters do not require a value to be associated, except for texture-related requests (PRIM_TEXTURE, PRIM_COLOR, and PRIM_BUMP_SHINY) which require a side number to be specified as well.  
  
    Valid parameters can be found in the <A
HREF="#AEN6323"
>Primitive Constants</A
>.
    Here is a simple example:
<DIV
CLASS="informalexample"
><P
></P
><A
NAME="AEN2088"
></A
><PRE
CLASS="programlisting"
>&#13;llGetPrimitiveParams([PRIM_TYPE, PRIM_MATERIAL, PRIM_COLOR, ALL_SIDES, PRIM_POSITION]);
</PRE
><P
></P
></DIV
>
    This would return a list similar to this:
<DIV
CLASS="informalexample"
><P
></P
><A
NAME="AEN2090"
></A
><PRE
CLASS="programlisting"
>&#13;    [PRIM_TYPE_BOX, PRIM_HOLE_DEFAULT, &#60;0, 1, 0&#62;, 0.0, &#60;0, 0, 0&#62;, &#60;1, 1, 0&#62;, &#60;0, 0, 0&#62;, // PRIM_TYPE
     PRIM_MATERIAL_WOOD, 	// PRIM_MATERIAL
     0, &#60;1, 1, 1&#62;, 1.0, 	// PRIM_COLOR (ALL_SIDES specified, so all 6 sides returned)
     1, &#60;1, 0, 0&#62;, 0.5,
     2, &#60;0, 0, 1&#62;, 1.0,
     3, &#60;0, 1, 0&#62;, 1.0,
     4, &#60;0, 0, 0&#62;, 0.5,
     5, &#60;1, 1, 1&#62;, 1.0,
     &#60;37.341, 195.283, 31.239&#62;]	// PRIM_POSITION
</PRE
><P
></P
></DIV
></P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN2092"
>A.101. llGetRegionCorner</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN2094"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>llGetRegionCorner</CODE
>(void);</CODE
></P
><P
></P
></DIV
><P
>Returns a vector with the south west corner position of the
      current region.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN2100"
>A.102. llGetRegionFPS</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN2102"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>llGetRegionFPS</CODE
>(void);</CODE
></P
><P
></P
></DIV
><P
>Returns the mean region frames per second.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN2108"
>A.103. llGetRegionName</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN2110"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>string llGetRegionName</CODE
>(void);</CODE
></P
><P
></P
></DIV
><P
>Returns the current region name.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN2116"
>A.104. llGetRegionTimeDilation</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN2118"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>float llGetRegionTimeDilation</CODE
>(void);</CODE
></P
><P
></P
></DIV
><P
>Returns the current time dilation as a float between 0 and 1.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN2124"
>A.105. llGetRootPosition</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN2126"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>vector llGetRootPosition</CODE
>(void);</CODE
></P
><P
></P
></DIV
><P
>Returns the global position of the root object of the object the script is attached to.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN2132"
>A.106. llGetRootRotation</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN2134"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>rotation llGetRootRotation</CODE
>(void);</CODE
></P
><P
></P
></DIV
><P
>Returns the global rotation of the root object of the object the script is attached to.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN2140"
>A.107. llGetRot</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN2142"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>rotation llGetRot</CODE
>(void);</CODE
></P
><P
></P
></DIV
><P
>Returns the rotation.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN2148"
>A.108. llGetScale</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN2150"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>vector llGetScale</CODE
>(void);</CODE
></P
><P
></P
></DIV
><P
>Returns the scale.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN2156"
>A.109. llGetScriptName</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN2158"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>string llGetScriptName</CODE
>(void);</CODE
></P
><P
></P
></DIV
><P
>Returns the name of this script.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN2164"
>A.110. llGetStartParameter</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN2166"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>integer llGetStartParameter</CODE
>(void);</CODE
></P
><P
></P
></DIV
><P
>Returns the start parameter passed to <A
HREF="#AEN3461"
>llRezObject</A
> or <A
HREF="#AEN3434"
>llRezAtRoot</A
>. If the object was
    created from agent inventory, this function returns 0.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN2174"
>A.111. llGetScriptState</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN2176"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>integer llGetScriptState</CODE
>(string name);</CODE
></P
><P
></P
></DIV
><P
>Resets TRUE if script <CODE
CLASS="parameter"
>name</CODE
> is running</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN2184"
>A.112. llGetStatus</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN2186"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>integer llGetStatus</CODE
>(integer status);</CODE
></P
><P
></P
></DIV
><P
>Returns the value of <CODE
CLASS="parameter"
>status</CODE
>. The
    value will be one of the <A
HREF="#AEN5304"
>status
    constants</A
>.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN2195"
>A.113. llGetSubString</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN2197"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>string llGetSubString</CODE
>(string src, integer start, integer end);</CODE
></P
><P
></P
></DIV
><P
>Returns the indicated substring from
    <CODE
CLASS="parameter"
>src</CODE
>. The <CODE
CLASS="parameter"
>start</CODE
> and
    <CODE
CLASS="parameter"
>end</CODE
> are inclusive, so 0,length-1 would
    capture the entire string and 0,0 would capture the first
    character. Using negative numbers for <CODE
CLASS="parameter"
>start</CODE
>
    and/or <CODE
CLASS="parameter"
>end</CODE
> causes the index to count
    backwards from the length of the string, so 0,-1 would capture the
    entire string. If start is larger than end the sub string is the
    exclusion of the entries, so 6,4 would give the entire string
    except for the 5<SUP
>th</SUP
> character.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN2214"
>A.114. llGetSunDirection</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN2216"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>vector llGetSunDirection</CODE
>(void);</CODE
></P
><P
></P
></DIV
><P
>Returns the sun direction on the simulator.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN2222"
>A.115. llGetTexture</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN2224"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>string llGetTexture</CODE
>(integer face);</CODE
></P
><P
></P
></DIV
><P
>Returns the texture of <CODE
CLASS="parameter"
>face</CODE
> if it is
    found in object inventory.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN2232"
>A.116. llGetTextureOffset</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN2234"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>vector llGetTextureOffset</CODE
>(integer side);</CODE
></P
><P
></P
></DIV
><P
>Returns the texture offset of <CODE
CLASS="parameter"
>side</CODE
> in
    the x and y components of a vector.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN2242"
>A.117. llGetTextureRot</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN2244"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>float llGetTextureRot</CODE
>(integer side);</CODE
></P
><P
></P
></DIV
><P
>Returns the texture rotation of
    <CODE
CLASS="parameter"
>side</CODE
>.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN2252"
>A.118. llGetTextureScale</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN2254"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>vector llGetTextureScale</CODE
>(integer side);</CODE
></P
><P
></P
></DIV
><P
>Returns the texture scale of <CODE
CLASS="parameter"
>side</CODE
> in
    the x and y components of a vector.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN2262"
>A.119. llGetTime</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN2264"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>float llGetTime</CODE
>(void);</CODE
></P
><P
></P
></DIV
><P
>Returns the seconds of elapsed time from an internal timer
    associated with the script. The timer is reset on rez, simulator
    restart, script reset, and in calls to <A
HREF="#AEN1638"
>llGetAndResetTime</A
> or <A
HREF="#AEN3426"
>llResetTime</A
>. Use <A
HREF="#AEN4188"
>llSetTimerEvent</A
> if you want a
    reliable timing mechanism.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN2273"
>A.120. llGetTimeOfDay</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN2275"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>float llGetTimeOfDay</CODE
>(void);</CODE
></P
><P
></P
></DIV
><P
>Gets the time in seconds since midnight in Second Life.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN2281"
>A.121. llGetTimestamp</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN2283"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>string llGetTimestamp</CODE
>(void);</CODE
></P
><P
></P
></DIV
><P
>Returns a timestamp in the format: YYYY-MM-DDThh:mm:ss.ff..fZ.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN2289"
>A.122. llGetTorque</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN2291"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>vector llGetTorque</CODE
>(void);</CODE
></P
><P
></P
></DIV
><P
>Returns the torque if the script is physical.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN2297"
>A.123. llGetVel</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN2299"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>vector llGetVel</CODE
>();</CODE
></P
><P
></P
></DIV
><P
>Returns the velocity.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN2306"
>A.124. llGetWallclock</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN2308"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>float llGetWallclock</CODE
>(void);</CODE
></P
><P
></P
></DIV
><P
>Returns the time in seconds since simulator timezone
    midnight. Currently this is PST.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN2314"
>A.125. llGiveInventory</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN2316"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>llGiveInventory</CODE
>(key destination, string inventory);</CODE
></P
><P
></P
></DIV
><P
>Give the named inventory item to the keyed avatar or object
    in the same simulator as the giver. If the recipient is an avatar,
    the avatar then follows the normal procedure of accepting or
    denying the offer. If the recipient is an object, the same
    permissions apply as if you were dragging inventory onto the
    object by hand, ie if <A
HREF="#AEN1047"
>llAllowInventoryDrop</A
> has
    been called with TRUE, any other object can pass objects to its
    inventory.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN2326"
>A.126. llGiveInventoryList</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN2328"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>llGiveInventoryList</CODE
>(key destination, string category, list  inventory);</CODE
></P
><P
></P
></DIV
><P
>Give the list of named inventory items to the keyed avatar
    or object in the same simulator as the giver. If the recipient is
    an avatar, the avatar then follows the normal procedure of
    accepting or denying the offer. The offered inventory is then
    placed in a folder named <CODE
CLASS="parameter"
>category</CODE
> in the
    recipients inventory. If the recipient is an object, the same
    permissions apply as if you were dragging inventory onto the
    object by hand, ie if <A
HREF="#AEN1047"
>llAllowInventoryDrop</A
> has
    been called with TRUE, any other object can pass objects to its
    inventory.If the recipient is an object, the
    <CODE
CLASS="parameter"
>category</CODE
> parameter is ignored.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN2342"
>A.127. llGiveMoney</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN2344"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>llGiveMoney</CODE
>(key destination, integer amount);</CODE
></P
><P
></P
></DIV
><P
>Transfer <CODE
CLASS="parameter"
>amount</CODE
> from the script owner
    to <CODE
CLASS="parameter"
>destination</CODE
>. This call will fail if
    <A
HREF="#AEN5360"
>PERMISSION_DEBIT</A
> has not
    been set.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN2356"
>A.128. llGround</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN2358"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>float llGround</CODE
>(vector offset);</CODE
></P
><P
></P
></DIV
><P
>Returns the ground height at the object position +
    <CODE
CLASS="parameter"
>offset</CODE
>.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN2366"
>A.129. llGroundContour</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN2368"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>vector llGroundContour</CODE
>(vector offset);</CODE
></P
><P
></P
></DIV
><P
>Returns the ground contour at the object position +
    <CODE
CLASS="parameter"
>offset</CODE
>.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN2376"
>A.130. llGroundNormal</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN2378"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>vector llGroundNormal</CODE
>(vector offset);</CODE
></P
><P
></P
></DIV
><P
>Returns the ground contour at the object position +
    <CODE
CLASS="parameter"
>offset</CODE
>.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN2386"
>A.131. llGroundRepel</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN2388"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>llGroundRepel</CODE
>(float height, integer water, float tau);</CODE
></P
><P
></P
></DIV
><P
>Critically damps to <CODE
CLASS="parameter"
>height</CODE
> if within
    <CODE
CLASS="parameter"
>height</CODE
> * 0.5 of
    <CODE
CLASS="parameter"
>level</CODE
>. The <CODE
CLASS="parameter"
>height</CODE
>
    is above ground level if <CODE
CLASS="parameter"
>water</CODE
> is FALSE or
    above the higher of land and water if <CODE
CLASS="parameter"
>water</CODE
>
    is TRUE.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN2405"
>A.132. llGroundSlope</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN2407"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>vector llGroundSlope</CODE
>(vector offset);</CODE
></P
><P
></P
></DIV
><P
>Returns the ground slope at the object position +
    <CODE
CLASS="parameter"
>offset</CODE
>.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN2415"
>A.133. llInsertString</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN2417"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>string llInsertString</CODE
>(string dst, integer position, string src);</CODE
></P
><P
></P
></DIV
><P
>Inserts <CODE
CLASS="parameter"
>src</CODE
> into
    <CODE
CLASS="parameter"
>dst</CODE
> at <CODE
CLASS="parameter"
>position</CODE
> and
    returns the result.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN2431"
>A.134. llInstantMessage</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN2433"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>llInstantMessage</CODE
>(key user, string message);</CODE
></P
><P
></P
></DIV
><P
>Send <CODE
CLASS="parameter"
>message</CODE
> to the
    <CODE
CLASS="parameter"
>user</CODE
> as an instant message.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN2444"
>A.135. llKey2Name</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN2446"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>string llKey2Name</CODE
>(key id);</CODE
></P
><P
></P
></DIV
><P
>If object <CODE
CLASS="parameter"
>id</CODE
> is in the same
    simulator, return the name of the object.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN2454"
>A.136. llList2CSV</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN2456"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>string llList2CSV</CODE
>(list src);</CODE
></P
><P
></P
></DIV
><P
>Create a string of comma separated values from
    <CODE
CLASS="parameter"
>list</CODE
>.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN2464"
>A.137. llList2Float</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN2466"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>float llList2Float</CODE
>(list src, integer index);</CODE
></P
><P
></P
></DIV
><P
>Returns the float at <CODE
CLASS="parameter"
>index</CODE
> in the
    list <CODE
CLASS="parameter"
>src</CODE
>.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN2477"
>A.138. llList2Integer</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN2479"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>integer llList2Integer</CODE
>(list src, integer index);</CODE
></P
><P
></P
></DIV
><P
>Returns the integer at <CODE
CLASS="parameter"
>index</CODE
> in the list
    <CODE
CLASS="parameter"
>src</CODE
>.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN2490"
>A.139. llList2Key</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN2492"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>key llList2Key</CODE
>(list src, integer index);</CODE
></P
><P
></P
></DIV
><P
>Returns the key at <CODE
CLASS="parameter"
>index</CODE
> in the list
    <CODE
CLASS="parameter"
>src</CODE
>.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN2503"
>A.140. llList2List</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN2505"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>list llList2List</CODE
>(list src, integer start, integer end);</CODE
></P
><P
></P
></DIV
><P
>Returns the slice of the list from
    <CODE
CLASS="parameter"
>start</CODE
> to <CODE
CLASS="parameter"
>end</CODE
> from
    the list <CODE
CLASS="parameter"
>src</CODE
> as a new list. The
    <CODE
CLASS="parameter"
>start</CODE
> and <CODE
CLASS="parameter"
>end</CODE
>
    parameters are inclusive, so 0,length-1 would copy the entire list
    and 0,0 would capture the first list entry. Using negative numbers
    for <CODE
CLASS="parameter"
>start</CODE
> and/or <CODE
CLASS="parameter"
>end</CODE
>
    causes the index to count backwards from the length of the list,
    so 0,-1 would capture the entire list. If
    <CODE
CLASS="parameter"
>start</CODE
> is larger than
    <CODE
CLASS="parameter"
>end</CODE
> the list returned is the exclusion of
    the entries, so 6,4 would give the entire list except for the
    5<SUP
>th</SUP
> entry.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN2526"
>A.141. llList2ListStrided</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN2528"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>list llList2ListStrided</CODE
>(list src, integer start, integer end, integer stride);</CODE
></P
><P
></P
></DIV
><P
>Copy the strided slice of <CODE
CLASS="parameter"
>src</CODE
> from
    <CODE
CLASS="parameter"
>start</CODE
> to <CODE
CLASS="parameter"
>end</CODE
>.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN2544"
>A.142. llList2Rot</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN2546"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>rotation llList2Rot</CODE
>(list src, integer index);</CODE
></P
><P
></P
></DIV
><P
>Returns the rotation at <CODE
CLASS="parameter"
>index</CODE
> in
    <CODE
CLASS="parameter"
>src</CODE
>.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN2557"
>A.143. llList2String</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN2559"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>string llList2String</CODE
>(list src, integer index);</CODE
></P
><P
></P
></DIV
><P
>Returns the string at <CODE
CLASS="parameter"
>index</CODE
> in
    <CODE
CLASS="parameter"
>src</CODE
>.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN2570"
>A.144. llList2Vector</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN2572"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>llList2Vector</CODE
>(list src, integer index);</CODE
></P
><P
></P
></DIV
><P
>Returns the string at <CODE
CLASS="parameter"
>index</CODE
> in
    <CODE
CLASS="parameter"
>src</CODE
>.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN2583"
>A.145. llListFindList</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN2585"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>integer llListFindList</CODE
>(list src, list  test);</CODE
></P
><P
></P
></DIV
><P
>Returns the position of the first instance of
    <CODE
CLASS="parameter"
>test</CODE
> in <CODE
CLASS="parameter"
>src</CODE
>. Returns
    -1 if <CODE
CLASS="parameter"
>test</CODE
> is not in
    <CODE
CLASS="parameter"
>src</CODE
>.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN2598"
>A.146. llListInsertList</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN2600"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>list llListInsertList</CODE
>(list dest, list src, integer pos);</CODE
></P
><P
></P
></DIV
><P
>Returns the list created by inserting
    <CODE
CLASS="parameter"
>src</CODE
> into <CODE
CLASS="parameter"
>dest</CODE
> at
    <CODE
CLASS="parameter"
>pos</CODE
>.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN2614"
>A.147. llListRandomize</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN2616"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>list llListRandomize</CODE
>(list src, integer stride);</CODE
></P
><P
></P
></DIV
><P
>Returns <CODE
CLASS="parameter"
>src</CODE
> randomized into blocks of
    size <CODE
CLASS="parameter"
>stride</CODE
>. If the length of
    <CODE
CLASS="parameter"
>src</CODE
> divided by
    <CODE
CLASS="parameter"
>stride</CODE
> is non-zero, this function does
    not randomize the list.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN2629"
>A.148. llListReplaceList</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN2631"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>list llListReplaceList</CODE
>(list dest, list src, integer start, integer end);</CODE
></P
><P
></P
></DIV
><P
>Returns the list created by replacing the segment of <CODE
CLASS="parameter"
>dest</CODE
> from 
    <CODE
CLASS="parameter"
>start</CODE
> to <CODE
CLASS="parameter"
>end</CODE
> with <CODE
CLASS="parameter"
>src</CODE
>.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN2648"
>A.149. llListSort</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN2650"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>list llListSort</CODE
>(list src, integer stride, integer ascending);</CODE
></P
><P
></P
></DIV
><P
>Returns <CODE
CLASS="parameter"
>src</CODE
> sorted into blocks of
    <CODE
CLASS="parameter"
>stride</CODE
> in ascending order if
    <CODE
CLASS="parameter"
>ascending</CODE
> is <A
HREF="#AEN5295"
>TRUE</A
>. Note that sort only works in
    the head of each sort block is the same type.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN2665"
>A.150. llListen</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN2667"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>integer llListen</CODE
>(integer channel, string name, key id, string msg);</CODE
></P
><P
></P
></DIV
><P
>Sets a listen event callback for <CODE
CLASS="parameter"
>msg</CODE
>
    on <CODE
CLASS="parameter"
>channel</CODE
> from <CODE
CLASS="parameter"
>name</CODE
>
    and returns an identifier that can be used to deactivate or remove
    the listen. The <CODE
CLASS="parameter"
>name</CODE
>,
    <CODE
CLASS="parameter"
>id</CODE
> and/or <CODE
CLASS="parameter"
>msg</CODE
>
    parameters can be blank to indicate not to filter on that
    argument. Channel 0 is the public chat channel that all avatars
    see as chat text. Channels 1 to 2,147,483,648 are hidden channels
    that are not sent to avatars.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN2686"
>A.151. llListenControl</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN2688"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>llListenControl</CODE
>(integer number, integer active);</CODE
></P
><P
></P
></DIV
><P
>Make a listen event callback active or inactive. Pass in the
    value returned from <A
HREF="#AEN2665"
>llListen</A
>
    to the <CODE
CLASS="parameter"
>number</CODE
> parameter to specify which
    event you are controlling. Use <A
HREF="#AEN5295"
>boolean</A
> values to specify
    <CODE
CLASS="parameter"
>active</CODE
>.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN2701"
>A.152. llListenRemove</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN2703"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>llListenRemove</CODE
>(integer number);</CODE
></P
><P
></P
></DIV
><P
>Removes a listen event callback. Pass in the value returned
    from <A
HREF="#AEN2665"
>llListen</A
> to the
    <CODE
CLASS="parameter"
>number</CODE
> parameter to specify which event you
    are removing.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN2712"
>A.153. llLoadURL</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN2714"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>llLoadURL</CODE
>(key avatar_id, string message, string url);</CODE
></P
><P
></P
></DIV
><P
>Displays a dialog to user <CODE
CLASS="parameter"
>avatar_id</CODE
>
	with <CODE
CLASS="parameter"
>message</CODE
> offering to
	go to the web page at <CODE
CLASS="parameter"
>url</CODE
>.  If the user clicks the
	"Go to page" button, their default web browser is launched and
	directed to <CODE
CLASS="parameter"
>url</CODE
>.</P
><P
>The <CODE
CLASS="parameter"
>url</CODE
> must begin with "http:" or 
	"https:", other protocols are not currently supported.  
	The dialog box shows the name of the object's
	owner so that abuse (e.g. spamming) can be easily reported.
	This function has a 10 second implicit sleep.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN2731"
>A.154. llLog</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN2733"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>float llLog</CODE
>(float val);</CODE
></P
><P
></P
></DIV
><P
>Returns the natural logarithm (base e) of
    <CODE
CLASS="parameter"
>val</CODE
> if <CODE
CLASS="parameter"
>val</CODE
> &#62; 0,
    otherwise returns 0.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN2742"
>A.155. llLog10</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN2744"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>float llLog10</CODE
>(float val);</CODE
></P
><P
></P
></DIV
><P
>Returns the base 10 log of <CODE
CLASS="parameter"
>val</CODE
> if
    <CODE
CLASS="parameter"
>val</CODE
> &#62; 0, otherwise returns 0.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN2753"
>A.156. llLookAt</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN2755"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>llLookAt</CODE
>(vector target, float strength, float damping);</CODE
></P
><P
></P
></DIV
><P
>Cause object to point the forward axis toward
    <CODE
CLASS="parameter"
>target</CODE
>. Good
    <CODE
CLASS="parameter"
>strength</CODE
> values are around half the mass of
    the object and good <CODE
CLASS="parameter"
>damping</CODE
> values are less
    than 1/10<SUP
>th</SUP
> of the
    <CODE
CLASS="parameter"
>strength</CODE
>. Asymmetrical shapes require
    smaller <CODE
CLASS="parameter"
>damping</CODE
>. A
    <CODE
CLASS="parameter"
>strength</CODE
> of 0.0 cancels the look at.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN2773"
>A.157. llLoopSound</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN2775"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>llLoopSound</CODE
>(string sound, float volume);</CODE
></P
><P
></P
></DIV
><P
>Similar to <A
HREF="#AEN3184"
>llPlaySound</A
>, this function plays
    a sound attached to an object, but will continuously loop that
    sound until <A
HREF="#AEN4620"
>llStopSound</A
> or
    <A
HREF="#AEN3184"
>llPlaySound</A
> is called. Only
    one sound may be attached to an object at a time. A second call to
    llLoopSound with the same key will not restart the sound, but the
    new volume will be used. This allows control over the volume of
    already playing sounds. Setting the <CODE
CLASS="parameter"
>volume</CODE
>
    to 0 is not the same as calling <A
HREF="#AEN4620"
>llStopSound</A
>; a sound with 0
    volume will continue to loop. To restart the sound from the
    beginning, call <A
HREF="#AEN4620"
>llStopSound</A
>
    before calling llLoopSound again.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN2790"
>A.158. llLoopSoundMaster</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN2792"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>llLoopSoundMaster</CODE
>(string sound, float volume);</CODE
></P
><P
></P
></DIV
><P
>Behaviour is identical to <A
HREF="#AEN2773"
>llLoopSound</A
>, with the addition of
    marking the source as a "Sync Master", causing "Slave" sounds to
    sync to it. If there are multiple masters within a viewer's
    interest area, the most audible one (a function of both distance
    and volume) will win out as the master. The use of multiple
    masters within a small area is unlikely to produce the desired
    effect.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN2802"
>A.159. llLoopSoundSlave</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN2804"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>llLoopSoundSlave</CODE
>(string sound, float volume);</CODE
></P
><P
></P
></DIV
><P
>Behaviour is identical to <A
HREF="#AEN2773"
>llLoopSound</A
>, unless there is a
    "Sync Master" present. If a Sync Master is already playing the
    Slave sound will begin playing from the same point the master is
    in its loop synchronizing the loop points of both sounds. If a
    Sync Master is started when the Slave is already playing, the
    Slave will skip to the correct position to sync with the
    Master.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN2814"
>A.160. llMakeExplosion</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN2816"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>llMakeExplosion</CODE
>(integer particles, float scale, float velocity, float lifetime, float arc, string texture, vector offset);</CODE
></P
><P
></P
></DIV
><P
>Make a round explosion of particles using
    <CODE
CLASS="parameter"
>texture</CODE
> from the object's inventory.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN2836"
>A.161. llMakeFire</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN2838"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>llMakeFire</CODE
>(integer particles, float scale, float velocity, float lifetime, float arc, string texture, vector offset);</CODE
></P
><P
></P
></DIV
><P
>Make fire particles using <CODE
CLASS="parameter"
>texture</CODE
>
    from the object's inventory.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN2858"
>A.162. llMakeFountain</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN2860"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>llMakeFountain</CODE
>(integer particles, float scale, float velocity, float lifetime, float arc, string texture, vector offset);</CODE
></P
><P
></P
></DIV
><P
>Make a fountain of particles using
    <CODE
CLASS="parameter"
>texture</CODE
> from the object's inventory.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN2880"
>A.163. llMakeSmoke</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN2882"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>llMakeSmoke</CODE
>(integer particles, float scale, float velocity, float lifetime, float arc, string texture, vector offset);</CODE
></P
><P
></P
></DIV
><P
>Make smoky particles using <CODE
CLASS="parameter"
>texture</CODE
>
    from the object's inventory.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN2902"
>A.164. llMD5String</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN2904"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>string llMD5String</CODE
>(string str, integer nonce);</CODE
></P
><P
></P
></DIV
><P
>Performs a RSA Data Security, Inc. MD5 Message-Digest
    Algorithm on <CODE
CLASS="parameter"
>str</CODE
> with
    <CODE
CLASS="parameter"
>nonce</CODE
>. The function returns the digest as a
    32 character hex string. The digest is computed on the string in
    the following format:
<DIV
CLASS="informalexample"
><P
></P
><A
NAME="AEN2915"
></A
><PRE
CLASS="programlisting"
>&#13;<CODE
CLASS="parameter"
>str</CODE
> + ":" + (string)<CODE
CLASS="parameter"
>nonce</CODE
>
</PRE
><P
></P
></DIV
>
    </P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN2919"
>A.165. llMessageLinked</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN2921"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>llMessageLinked</CODE
>(integer linknum, integer num, string str, key id);</CODE
></P
><P
></P
></DIV
><P
>Sends <CODE
CLASS="parameter"
>num</CODE
>,
    <CODE
CLASS="parameter"
>str</CODE
>, and <CODE
CLASS="parameter"
>id</CODE
> to
    members of the link set. The <CODE
CLASS="parameter"
>linknum</CODE
>
    parameter is either the linked number available through <A
HREF="#AEN1867"
>llGetLinkNumber</A
> or a <A
HREF="#AEN5616"
>link constant</A
>.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN2940"
>A.166. llMinEventDelay</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN2942"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>llMinEventDelay</CODE
>(float delay);</CODE
></P
><P
></P
></DIV
><P
>Set the minimum time between events being handled.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN2949"
>A.167. llModifyLand</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN2951"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>llModifyLand</CODE
>(integer action, integer size);</CODE
></P
><P
></P
></DIV
><P
>Modify land with <CODE
CLASS="parameter"
>action</CODE
> on
    <CODE
CLASS="parameter"
>size</CODE
> area. The parameters can be chosen
    from the <A
HREF="#AEN5574"
>land constants</A
>.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN2963"
>A.168. llModPow</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN2965"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>integer llModPow</CODE
>(integer a, integer b, integer c);</CODE
></P
><P
></P
></DIV
><P
>Raise <CODE
CLASS="parameter"
>a</CODE
> to the <CODE
CLASS="parameter"
>b</CODE
> power, modulo <CODE
CLASS="parameter"
>c</CODE
>.
    <CODE
CLASS="parameter"
>b</CODE
> is capped at 0xFFFF (16 bits).</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN2980"
>A.169. llMoveToTarget</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN2982"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>llMoveToTarget</CODE
>(vector target, float tau);</CODE
></P
><P
></P
></DIV
><P
>Critically damp to position <CODE
CLASS="parameter"
>target</CODE
> in
    <CODE
CLASS="parameter"
>tau</CODE
> seconds if the script is physical. Good
    <CODE
CLASS="parameter"
>tau</CODE
> values are greater than 0.2. A
    <CODE
CLASS="parameter"
>tau</CODE
> of 0.0 stops the critical
    damping.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN2995"
>A.170. llOffsetTexture</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN2997"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>llOffsetTexture</CODE
>(float offset_s, float offset_t, integer face);</CODE
></P
><P
></P
></DIV
><P
>Sets the texture s and t offsets of
    <CODE
CLASS="parameter"
>face</CODE
>. If <CODE
CLASS="parameter"
>face</CODE
> is
    <A
HREF="#AEN6073"
>ALL_SIDES</A
> this
    function sets the texture offsets for all faces.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN3011"
>A.171. llOpenRemoteDataChannel</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN3013"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>llOpenRemoteDataChannel</CODE
>(void);</CODE
></P
><P
></P
></DIV
><P
>Creates a channel to listen for XML-RPC calls.
    Will trigger a remote_data event with type = REMOTE_DATA_CHANNEL and a channel id once it is available.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN3019"
>A.172. llOverMyLand</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN3021"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>integer llOverMyLand</CODE
>(key id);</CODE
></P
><P
></P
></DIV
><P
>Returns <A
HREF="#AEN5295"
>TRUE</A
> if
    <CODE
CLASS="parameter"
>id</CODE
> is over land owned by the object owner,
    <A
HREF="#AEN5295"
>FALSE</A
> otherwise.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN3031"
>A.173. llParcelMediaCommandList</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN3033"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>llParcelMediaCommandList</CODE
>(list command_list);</CODE
></P
><P
></P
></DIV
><P
>Controls the playback of movies and other multimedia resources on a land parcel.  
	<CODE
CLASS="parameter"
>command</CODE
> can be one of 
	<A
HREF="#AEN6459"
>PARCEL_MEDIA_COMMAND_STOP</A
>, 
	<A
HREF="#AEN6459"
>PARCEL_MEDIA_COMMAND_PAUSE</A
>, 
	<A
HREF="#AEN6459"
>PARCEL_MEDIA_COMMAND_PLAY</A
>,
	<A
HREF="#AEN6459"
>PARCEL_MEDIA_COMMAND_LOOP</A
>,
	<A
HREF="#AEN6459"
>PARCEL_MEDIA_COMMAND_TEXTURE</A
>,
	<A
HREF="#AEN6459"
>PARCEL_MEDIA_COMMAND_URL</A
>,
	<A
HREF="#AEN6459"
>PARCEL_MEDIA_COMMAND_TYPE</A
>,
	<A
HREF="#AEN6459"
>PARCEL_MEDIA_COMMAND_DESC</A
>,
	<A
HREF="#AEN6459"
>PARCEL_MEDIA_COMMAND_SIZE</A
>,
	<A
HREF="#AEN6459"
>PARCEL_MEDIA_COMMAND_TIME</A
>,
	<A
HREF="#AEN6459"
>PARCEL_MEDIA_COMMAND_AGENT</A
>,
	<A
HREF="#AEN6459"
>PARCEL_MEDIA_COMMAND_UNLOAD</A
>, or
	<A
HREF="#AEN6459"
>PARCEL_MEDIA_COMMAND_AUTO_ALIGN</A
>.
	</P
><P
>You are allowed one movie (or "media" resource) per land parcel.  
	The movie will be played by replacing a texture on an object with the 
	movie.  Users will only see the movie when they are standing on your 
	land parcel.  Otherwise they will see the static texture.</P
><P
>Most of the QuickTime media formats are supported including:
	<P
></P
><UL
><LI
><P
>QuickTime movies (.mov)</P
></LI
><LI
><P
>Streamable stored QuickTime movies (.mov)</P
></LI
><LI
><P
>Real time QuickTime streams (rtsp://)</P
></LI
><LI
><P
>MPEG4 movies (.mp4, .mpeg4) (simple profile only)</P
></LI
><LI
><P
>QuickTime VR scenes and objects (.mov)</P
></LI
><LI
><P
>Flash movies (.swf) (only non-interative, version 5 and earlier</P
></LI
><LI
><P
>and many others from http://www.apple.com/quicktime/products/qt/specifications.html</P
></LI
></UL
>
	A good rule of thumb is if it plays in the QuickTime Media Player, it will play in Second Life.
	</P
><P
>You can set up a movie for playback as follows:
	<P
></P
><UL
><LI
><P
>First, select a texture from your inventory to be the static texture.  It should not be a common texture -- a test pattern would be better than the default plywood.</P
></LI
><LI
><P
>Apply that texture to an object.</P
></LI
><LI
><P
>Right click on your land and select "About Land..."</P
></LI
><LI
><P
>Under "Options" use the GUI to select the static texture.</P
></LI
><LI
><P
>Enter the URL of your movie or media stream.</P
></LI
><LI
><P
>Create objects you want to click on for PLAY, STOP, PAUSE and LOOP (play forever)</P
></LI
><LI
><P
>Attach the following script (or similar) to each.</P
></LI
></UL
>
<DIV
CLASS="informalexample"
><P
></P
><A
NAME="AEN3087"
></A
><PRE
CLASS="programlisting"
>&#13;default
{
    touch_start ( integer total_number )
    {
		// This will play the current movie for all agents in the parcel.
        llParcelMediaCommandList( [PARCEL_MEDIA_COMMAND_LOOP] );
    }
}
</PRE
><P
></P
></DIV
>
Or a more advanced example:
<DIV
CLASS="informalexample"
><P
></P
><A
NAME="AEN3089"
></A
><PRE
CLASS="programlisting"
>&#13;float START_TIME = 30.0;
float RUN_LENGTH = 10.0;

default
{
	state_entry()
	{
		llParcelMediaCommandList( [
			PARCEL_MEDIA_COMMAND_URL, "http://enter_your.url/here",
			PARCEL_MEDIA_COMMAND_TEXTURE, (key) llGetTexture(0) ] );
	}

	touch_start(integer num_detected)
	{
		llParcelMediaCommandList( [
			PARCEL_MEDIA_COMMAND_AGENT, llDetectedKey(0),
			PARCEL_MEDIA_COMMAND_TIME, START_TIME,
			PARCEL_MEDIA_COMMAND_PLAY ] );
		list Info = llParcelMediaQuery([PARCEL_MEDIA_COMMAND_URL, PARCEL_MEDIA_COMMAND_TEXTURE]);
		llSay(0, "Playing '" + llList2String(Info, 0) + "' on texture '" + (string)llList2Key(Info, 1) + "' for agent " + llDetectedName(0));
		llSetTimerEvent(RUN_LENGTH);
	}

	timer()
	{
		llParcelMediaCommandList( [ PARCEL_MEDIA_COMMAND_STOP ] );
		llSetTimerEvent(0.0);
	}
}
</PRE
><P
></P
></DIV
>


	</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN3091"
>A.174. llParcelMediaQuery</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN3093"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>list llParcelMediaQuery</CODE
>(list query_list);</CODE
></P
><P
></P
></DIV
><P
>Controls the playback of movies and other multimedia resources on a land parcel.  
	<CODE
CLASS="parameter"
>command</CODE
> can be one of 
	<A
HREF="#AEN6459"
>PARCEL_MEDIA_COMMAND_TEXTURE</A
> or
	<A
HREF="#AEN6459"
>PARCEL_MEDIA_COMMAND_URL</A
>.
	</P
><P
>This allows you to query the texture or url for media on the parcel.  
	See <A
HREF="#AEN3031"
>llParcelMediaCommandList</A
> for an example
	of usage.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN3105"
>A.175. llParseString2List</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN3107"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>list llParseString2List</CODE
>(string src, list separators, list spacers);</CODE
></P
><P
></P
></DIV
><P
>Breaks <CODE
CLASS="parameter"
>src</CODE
> into a list, discarding
    anything in <CODE
CLASS="parameter"
>separators</CODE
>, keeping any entry
    in <CODE
CLASS="parameter"
>spacers</CODE
>. The
    <CODE
CLASS="parameter"
>separators</CODE
> and
    <CODE
CLASS="parameter"
>spacers</CODE
> must be lists of strings with a
    maximum of 8 entries each. So, if you had made the call:
<DIV
CLASS="informalexample"
><P
></P
><A
NAME="AEN3123"
></A
><PRE
CLASS="programlisting"
>&#13;llParseString2List("Parsethisnow!  I dare:you to.", ["this", "!", " "], [":"]);
</PRE
><P
></P
></DIV
>
    You would get the list:
<DIV
CLASS="informalexample"
><P
></P
><A
NAME="AEN3125"
></A
><PRE
CLASS="programlisting"
>&#13;["Parse", "now", "I", "dare", ":", "you", "to"]
</PRE
><P
></P
></DIV
></P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN3127"
>A.176. llParseStringKeepNulls</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN3129"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>list llParseStringKeepNulls</CODE
>(string src, list separators, list spacers);</CODE
></P
><P
></P
></DIV
><P
>Breaks <CODE
CLASS="parameter"
>src</CODE
> into a list, discarding
    anything in <CODE
CLASS="parameter"
>separators</CODE
>, keeping any entry
    in <CODE
CLASS="parameter"
>spacers</CODE
>.  Any resulting null values 
	are kept.  The <CODE
CLASS="parameter"
>separators</CODE
> and
    <CODE
CLASS="parameter"
>spacers</CODE
> must be lists of strings with a
    maximum of 8 entries each. So, if you had made the call:
<DIV
CLASS="informalexample"
><P
></P
><A
NAME="AEN3145"
></A
><PRE
CLASS="programlisting"
>&#13;llParseString2List("!Parsethisthisnow I dare::you to.", ["this", "!", " "], [":"]);
</PRE
><P
></P
></DIV
>
    You would get the list:
<DIV
CLASS="informalexample"
><P
></P
><A
NAME="AEN3147"
></A
><PRE
CLASS="programlisting"
>&#13;[NULL, "Parse", NULL, "now", "I", "dare", ":", NULL, ":", "you", "to"]
</PRE
><P
></P
></DIV
></P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN3149"
>A.177. llParticleSystem</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN3151"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>llParticleSystem</CODE
>(list parameters);</CODE
></P
><P
></P
></DIV
><P
>Makes a particle system based on the parameter list. The
    <CODE
CLASS="parameter"
>parameters</CODE
> are specified as an ordered list
    of parameter and value. Valid parameters and their expected values
    can be found in the <A
HREF="#AEN5851"
>particle system
    constants</A
>. Here is a simple example:
<DIV
CLASS="informalexample"
><P
></P
><A
NAME="AEN3160"
></A
><PRE
CLASS="programlisting"
>&#13;llParticleSystem([PSYS_PART_FLAGS, PSYS_PART_WIND_MASK,
                  PSYS_PART_START_COLOR, &#60;1,0,0&#62;,
                  PSYS_SRC_PATTERN, PSYS_SRC_PATTERN_EXPLODE]);
</PRE
><P
></P
></DIV
></P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN3162"
>A.178. llPassCollisions</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN3164"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>llPassCollisions</CODE
>(integer pass);</CODE
></P
><P
></P
></DIV
><P
>If <CODE
CLASS="parameter"
>pass</CODE
> is <A
HREF="#AEN5295"
>TRUE</A
>, land and object collisions
    are passed from children on to parents.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN3173"
>A.179. llPassTouches</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN3175"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>llPassTouches</CODE
>(integer pass);</CODE
></P
><P
></P
></DIV
><P
>If <CODE
CLASS="parameter"
>pass</CODE
> is <A
HREF="#AEN5295"
>TRUE</A
>, touches are passed from
    children on to parents.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN3184"
>A.180. llPlaySound</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN3186"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>llPlaySound</CODE
>(string sound, float volume);</CODE
></P
><P
></P
></DIV
><P
>Plays a sound once. The sound will be attached to an object
    and follow object movement. Only one sound may be attached to an
    object at a time, and attaching a new sound or calling <A
HREF="#AEN4620"
>llStopSound</A
> will stop the
    previously attached sound. A second call to llPlaySound with the
    same <CODE
CLASS="parameter"
>sound</CODE
> will not restart the sound, but
    the new volume will be used, which allows control over the volume
    of already playing sounds. To restart the sound from the
    beginning, call <A
HREF="#AEN4620"
>llStopSound</A
>
    before calling llPlaySound again.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN3198"
>A.181. llPlaySoundSlave</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN3200"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>llPlaySoundSlave</CODE
>(string sound, float volume);</CODE
></P
><P
></P
></DIV
><P
>Behaviour is identical to llPlaySound, unless there is a
    "Sync Master" present. If a Sync Master is already
    playing the Slave sound will not be played until the Master hits
    its loop point and returns to the beginning. llPlaySoundSlave will
    play the sound exactly once; if it is desired to have the sound
    play every time the Master loops, either use <A
HREF="#AEN2802"
>llLoopSoundSlave</A
> with extra
    silence padded on the end of the sound or ensure that
    llPlaySoundSlave is called at least once per loop of the
    Master.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN3210"
>A.182. llPointAt</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN3212"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>llPointAt</CODE
>(vector pos);</CODE
></P
><P
></P
></DIV
><P
>Make avatar that owns object point at
    <CODE
CLASS="parameter"
>pos</CODE
>.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN3220"
>A.183. llPow</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN3222"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>llPow</CODE
>(float base, float exp);</CODE
></P
><P
></P
></DIV
><P
>Returns <CODE
CLASS="parameter"
>base</CODE
> raised to the
    <CODE
CLASS="parameter"
>exp</CODE
>.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN3233"
>A.184. llPreloadSound</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN3235"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>llPreloadSound</CODE
>(string sound);</CODE
></P
><P
></P
></DIV
><P
>Preloads <CODE
CLASS="parameter"
>sound</CODE
> from object inventory
    on nearby viewers.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN3243"
>A.185. llPushObject</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN3245"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>llPushObject</CODE
>(key id, vector impulse, vector angular_impulse, integer local);</CODE
></P
><P
></P
></DIV
><P
>Applies <CODE
CLASS="parameter"
>impulse</CODE
> and
    <CODE
CLASS="parameter"
>angular_impulse</CODE
> to object
    <CODE
CLASS="parameter"
>id</CODE
>.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN3261"
>A.186. llReleaseControls</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN3263"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>llReleaseControls</CODE
>(key avatar);</CODE
></P
><P
></P
></DIV
><P
>Stop taking inputs from <CODE
CLASS="parameter"
>avatar</CODE
>.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN3271"
>A.187. llRemoteDataReply</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN3273"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>llRemoteDataReply</CODE
>(key channel, key message_id, string sdata);</CODE
></P
><P
></P
></DIV
><P
>Send an XML-RPC reply to message_id on channel with payload of string sdata.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN3284"
>A.188. llRemoteDataSetRegion</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN3286"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>llRemoteDataSetRegion</CODE
>(void);</CODE
></P
><P
></P
></DIV
><P
>If an object using remote data channels changes regions, you
    must call this function to reregister the remote data
    channels. You do not need to make this call if your object does
    not change regions or use remote data channels.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN3292"
>A.189. llRemoteLoadScript</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN3294"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>llRemoteLoadScript</CODE
>(void);</CODE
></P
><P
></P
></DIV
><P
>Deprecated. Please use llRemoteLoadScriptPin instead.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN3300"
>A.190. llRemoteLoadScriptPin</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN3302"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>llRemoteLoadScriptPin</CODE
>(key target, string name, integer pin, integer running, integer param);</CODE
></P
><P
></P
></DIV
><P
>If the owner of the object this script is attached can modify <CODE
CLASS="parameter"
>target</CODE
>, it has the correct <CODE
CLASS="parameter"
>pin</CODE
> and the objects are in the same region, copy script <CODE
CLASS="parameter"
>name</CODE
> onto <CODE
CLASS="parameter"
>target</CODE
>, if <CODE
CLASS="parameter"
>running</CODE
> == TRUE, start the script with <CODE
CLASS="parameter"
>param</CODE
>. If <CODE
CLASS="parameter"
>name</CODE
> already exists on <CODE
CLASS="parameter"
>target</CODE
>, it is replaced.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN3325"
>A.191. llRemoveInventory</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN3327"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>llRemoveInventory</CODE
>(string inventory);</CODE
></P
><P
></P
></DIV
><P
>Remove the name <CODE
CLASS="parameter"
>inventory</CODE
> item from
    the object inventory.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN3335"
>A.192. llRemoveVehicleFlags</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN3337"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>llRemoveVehicleFlags</CODE
>(integer flags);</CODE
></P
><P
></P
></DIV
><P
>Sets the vehicle <CODE
CLASS="parameter"
>flags</CODE
> to
    FALSE. Valid parameters can be found in the <A
HREF="#AEN6231"
>vehicle flags constants</A
>
    section.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN3346"
>A.193. llRequestAgentData</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN3348"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>key llRequestAgentData</CODE
>(key id, integer data);</CODE
></P
><P
></P
></DIV
><P
>This function requests data about agent
    <CODE
CLASS="parameter"
>id</CODE
>. If and when the information is
    collected, the <A
HREF="#AEN4997"
>dataserver</A
>
    event is called with the returned key returned from this function
    passed in the <CODE
CLASS="parameter"
>requested</CODE
> parameter. See the
    <A
HREF="#AEN6005"
>agent data constants</A
> for
    details about valid values of <CODE
CLASS="parameter"
>data</CODE
> and what
    each will return in the <A
HREF="#AEN4997"
>dataserver</A
> event.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN3363"
>A.194. llRequestInventoryData</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN3365"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>key llRequestInventoryData</CODE
>(string name);</CODE
></P
><P
></P
></DIV
><P
>Requests data from object inventory item
    <CODE
CLASS="parameter"
>name</CODE
>. When data is available the <A
HREF="#AEN4997"
>dataserver</A
> event will be raised
    with the key returned from this function in the
    <CODE
CLASS="parameter"
>requested</CODE
> parameter. The only request
    currently implemented is to request data from landmarks, where the
    data returned is in the form "&#60;float, float,
    float&#62;" which can be cast to a vector. This position is in
    region local coordinates of the region the script call is made 
	(possible even resulting in negative values).  So, to
	convert this value into a global position, just add the result of
	llGetRegionCorner.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN3375"
>A.195. llRequestPermissions</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN3377"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>integer llRequestPermissions</CODE
>(key avatar, integer perm);</CODE
></P
><P
></P
></DIV
><P
>Ask <CODE
CLASS="parameter"
>avatar</CODE
> to allow the script to do
    <CODE
CLASS="parameter"
>perm</CODE
>. The <CODE
CLASS="parameter"
>perm</CODE
>
    parameter should be a <A
HREF="#AEN5360"
>permission
    constant</A
>. Multiple permissions can be requested
    simultaneously by or'ing the constants together. Many of the
    permissions requests can only go to object owner. This call will
    not stop script execution - if the specified avatar grants the
    requested permissions, the <A
HREF="#AEN5171"
>run_time_permissions</A
>
    event will be called.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN3391"
>A.196. llRequestSimulatorData</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN3393"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>key llRequestSimulatorData</CODE
>(string sim_name, integer data);</CODE
></P
><P
></P
></DIV
><P
>This function requests data about simulator
    <CODE
CLASS="parameter"
>sim_name</CODE
>. When the information is
    collected, the <A
HREF="#AEN4997"
>dataserver</A
>
    event is called with the returned key returned from this function
    passed in the <CODE
CLASS="parameter"
>requested</CODE
> parameter. See the
    <A
HREF="#AEN6086"
>simulator data constants</A
> for
    details about valid values of <CODE
CLASS="parameter"
>data</CODE
> and what
    each will return in the <A
HREF="#AEN4997"
>dataserver</A
> event.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN3408"
>A.197. llResetScript</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN3410"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>llResetScript</CODE
>(void);</CODE
></P
><P
></P
></DIV
><P
>Resets this script.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN3416"
>A.198. llResetOtherScript</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN3418"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>llResetOtherScript</CODE
>(string name);</CODE
></P
><P
></P
></DIV
><P
>Resets the script <CODE
CLASS="parameter"
>name</CODE
>.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN3426"
>A.199. llResetTime</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN3428"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>llResetTime</CODE
>(void);</CODE
></P
><P
></P
></DIV
><P
>Sets the internal script timer to zero.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN3434"
>A.200. llRezAtRoot</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN3436"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>llRezAtRoot</CODE
>(string inventory, vector pos, vector vel, rotation rot, integer param);</CODE
></P
><P
></P
></DIV
><P
>Creates object's <CODE
CLASS="parameter"
>inventory</CODE
> object at
    position <CODE
CLASS="parameter"
>pos</CODE
> with velocity
    <CODE
CLASS="parameter"
>vel</CODE
> and rotation
    <CODE
CLASS="parameter"
>rot</CODE
>. The last selected root object's location
	in a multi-object selection will be placed at <CODE
CLASS="parameter"
>pos</CODE
>.
	All other objects in a selection will be created relative to the last
	selected root's position, taking <CODE
CLASS="parameter"
>rot</CODE
> into account.
	The <CODE
CLASS="parameter"
>param</CODE
> value
    will be available to the newly created object in the <A
HREF="#AEN5159"
>on_rez</A
> event or through the <A
HREF="#AEN2164"
>llGetStartParameter</A
>
    library function. The <CODE
CLASS="parameter"
>vel</CODE
> parameter is
    ignored if the rezzed object is not physical.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN3461"
>A.201. llRezObject</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN3463"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>llRezObject</CODE
>(string inventory, vector pos, vector vel, rotation rot, integer param);</CODE
></P
><P
></P
></DIV
><P
>Creates object's <CODE
CLASS="parameter"
>inventory</CODE
> object at
    position <CODE
CLASS="parameter"
>pos</CODE
> with velocity
    <CODE
CLASS="parameter"
>vel</CODE
> and rotation
    <CODE
CLASS="parameter"
>rot</CODE
>. The <CODE
CLASS="parameter"
>param</CODE
> value
    will be available to the newly created object in the <A
HREF="#AEN5159"
>on_rez</A
> event or through the <A
HREF="#AEN2164"
>llGetStartParameter</A
>
    library function. The <CODE
CLASS="parameter"
>vel</CODE
> parameter is
    ignored if the rezzed object is not physical.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN3486"
>A.202. llRot2Angle</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN3488"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>float llRot2Angle</CODE
>(rotation rot);</CODE
></P
><P
></P
></DIV
><P
>Returns the rotation angle represented by
    <CODE
CLASS="parameter"
>rot</CODE
>.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN3496"
>A.203. llRot2Axis</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN3498"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>vector llRot2Axis</CODE
>(rotation rot);</CODE
></P
><P
></P
></DIV
><P
>Returns the rotation axis represented by
    <CODE
CLASS="parameter"
>rot</CODE
>.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN3506"
>A.204. llRot2Euler</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN3508"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>vector llRot2Euler</CODE
>(rotation rot);</CODE
></P
><P
></P
></DIV
><P
>Returns the Euler Angle representation of
    <CODE
CLASS="parameter"
>rot</CODE
>.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN3516"
>A.205. llRot2Fwd</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN3518"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>vector llRot2Fwd</CODE
>(rotation rot);</CODE
></P
><P
></P
></DIV
><P
>Returns the forward axis represented by
    <CODE
CLASS="parameter"
>rot</CODE
>.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN3526"
>A.206. llRot2Left</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN3528"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>llRot2Left</CODE
>(rotation rot);</CODE
></P
><P
></P
></DIV
><P
>Returns the left axis represented by
    <CODE
CLASS="parameter"
>rot</CODE
>.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN3536"
>A.207. llRot2Up</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN3538"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>llRot2Up</CODE
>(rotation rot);</CODE
></P
><P
></P
></DIV
><P
>Returns the up axis represented by
    <CODE
CLASS="parameter"
>rot</CODE
>.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN3546"
>A.208. llRotBetween</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN3548"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>rotation llRotBetween</CODE
>(vector a, vector b);</CODE
></P
><P
></P
></DIV
><P
>Returns the rotation needed to rotate
    <CODE
CLASS="parameter"
>a</CODE
> to <CODE
CLASS="parameter"
>b</CODE
>.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN3559"
>A.209. llRotLookAt</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN3561"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>llRotLookAt</CODE
>(rotation rot, float strength, float damping);</CODE
></P
><P
></P
></DIV
><P
>Cause object to rotate to <CODE
CLASS="parameter"
>rot</CODE
>. Good
    <CODE
CLASS="parameter"
>strength</CODE
> values are around half the mass of
    the object and good <CODE
CLASS="parameter"
>damping</CODE
> values are less
    than 1/10<SUP
>th</SUP
> of the
    <CODE
CLASS="parameter"
>strength</CODE
>. Asymmetrical shapes require
    smaller <CODE
CLASS="parameter"
>damping</CODE
>. A
    <CODE
CLASS="parameter"
>strength</CODE
> of 0.0 cancels the look at.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN3579"
>A.210. llRotTarget</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN3581"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>integer llRotTarget</CODE
>(rotation rot, float error);</CODE
></P
><P
></P
></DIV
><P
>Set object rotation within <CODE
CLASS="parameter"
>error</CODE
> of
    <CODE
CLASS="parameter"
>rotation</CODE
> as a rotational target and return
    an integer number for the target. The number can be used in <A
HREF="#AEN3593"
>llRotTargetRemove</A
>.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN3593"
>A.211. llRotTargetRemove</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN3595"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>llRotTargetRemove</CODE
>(integer number);</CODE
></P
><P
></P
></DIV
><P
>Remove rotational target
    <CODE
CLASS="parameter"
>number</CODE
>.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN3603"
>A.212. llRotateTexture</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN3605"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>llRotateTexture</CODE
>(float radians, integer face);</CODE
></P
><P
></P
></DIV
><P
>Sets the texture rotation of <CODE
CLASS="parameter"
>face</CODE
> to
    <CODE
CLASS="parameter"
>radians</CODE
>. If <CODE
CLASS="parameter"
>face</CODE
>
    <A
HREF="#AEN6073"
>ALL_SIDES</A
>, rotate the
    texture of all faces.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN3618"
>A.213. llRound</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN3620"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>integer llRound</CODE
>(float val);</CODE
></P
><P
></P
></DIV
><P
>returns <CODE
CLASS="parameter"
>val</CODE
> rounded to the nearest
    integer.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN3628"
>A.214. llSameGroup</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN3630"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>integer llSameGroup</CODE
>(key id);</CODE
></P
><P
></P
></DIV
><P
>Returns <A
HREF="#AEN5295"
>TRUE</A
> if the
    object or agent <CODE
CLASS="parameter"
>id</CODE
> is in the same simulator
    and has the same active group as this object. Otherwise, returns
    <A
HREF="#AEN5295"
>FALSE</A
>.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN3640"
>A.215. llSay</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN3642"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>llSay</CODE
>(integer channel, string text);</CODE
></P
><P
></P
></DIV
><P
>Say <CODE
CLASS="parameter"
>text</CODE
> on
    <CODE
CLASS="parameter"
>channel</CODE
>. Channel 0 is the public chat
    channel that all avatars see as chat text. Channels 1 to
    2,147,483,648 are private channels that are not sent to avatars
    but other scripts can listen for through the <A
HREF="#AEN2665"
>llListen</A
> api.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN3654"
>A.216. llScaleTexture</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN3656"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>llScaleTexture</CODE
>(integer scale_s, integer scale_t, integer face);</CODE
></P
><P
></P
></DIV
><P
>Sets the texture s and t scales of
    <CODE
CLASS="parameter"
>face</CODE
> to <CODE
CLASS="parameter"
>scale_s</CODE
> and
    <CODE
CLASS="parameter"
>scale_t</CODE
> respectively. If face is <A
HREF="#AEN6073"
>ALL_SIDES</A
>, scale the texture
    to all faces.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN3671"
>A.217. llScriptDanger</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN3673"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>integer llScriptDanger</CODE
>(vector pos);</CODE
></P
><P
></P
></DIV
><P
>Returns true if pos is over public land, land that doesn't allow everyone to edit and build, or land that doesn't allow outside scripts.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN3680"
>A.218. llSendRemoteData</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN3682"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>key llSendRemoteData</CODE
>(string dest, integer idata, string sdata);</CODE
></P
><P
></P
></DIV
><P
>Send an XML-RPC request to dest through channel with payload
    of channel (in a string), integer idata and string sdata. An
    XML-RPC reply will trigger a remote_data event with type =
    REMOTE_DATA_REPLY. The call returns a message_id that can be used
    to identify XML-RPC replies.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN3693"
>A.219. llSensor</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN3695"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>llSensor</CODE
>(string name, key id, integer type, float range, float arc);</CODE
></P
><P
></P
></DIV
><P
>Performs a single scan for <CODE
CLASS="parameter"
>name</CODE
> and
    <CODE
CLASS="parameter"
>id</CODE
> with <CODE
CLASS="parameter"
>type</CODE
> within
    <CODE
CLASS="parameter"
>range</CODE
> meters and <CODE
CLASS="parameter"
>arc</CODE
>
    radians of forward vector. Specifying a blank name or <A
HREF="#AEN6070"
>NULL_KEY</A
> id will not filter results for
    any particular name or id.  A range of 0.0 does not perform a
    scan. Range is limited to 96.0.  The <CODE
CLASS="parameter"
>type</CODE
> parameter should be an <A
HREF="#AEN5338"
>object type constant</A
> value.  If anything is found
	during the scan, a <A
HREF="#AEN5183"
>sensor</A
> event is triggered.  A maximum
	of 16 items are passed to this event.  If nothing is found during the scan, a 
	<A
HREF="#AEN5121"
>no sensor</A
> event is triggered instead.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN3720"
>A.220. llSensorRemove</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN3722"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>llSensorRemove</CODE
>(void);</CODE
></P
><P
></P
></DIV
><P
>Removes the sensor.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN3728"
>A.221. llSensorRepeat</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN3730"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>llSensorRepeat</CODE
>(string name, key id, integer type, float range, float arc, float rate);</CODE
></P
><P
></P
></DIV
><P
>Performs a single scan for <CODE
CLASS="parameter"
>name</CODE
> and
    <CODE
CLASS="parameter"
>id</CODE
> with <CODE
CLASS="parameter"
>type</CODE
> within
    <CODE
CLASS="parameter"
>range</CODE
> meters and <CODE
CLASS="parameter"
>arc</CODE
>
    radians of forward vector and repeats every
    <CODE
CLASS="parameter"
>rate</CODE
> seconds. Specifying a blank name or
    <A
HREF="#AEN6070"
>NULL_KEY</A
> id will not filter
    results for any particular name or id.  A range of 0.0 cancels the
    scan.  Range is limited to 96.0.  The <CODE
CLASS="parameter"
>type</CODE
> parameter should be an <A
HREF="#AEN5338"
>object type constant</A
>
    value. If anything is found during the scan, a <A
HREF="#AEN5183"
>sensor</A
> 
	event is triggered.  A maximum of 16 items are passed to this event.  If nothing is found 
	during the scan, a <A
HREF="#AEN5121"
>no sensor</A
> event is triggered instead.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN3758"
>A.222. llSetAlpha</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN3760"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>llSetAlpha</CODE
>(float alpha, integer face);</CODE
></P
><P
></P
></DIV
><P
>Sets the alpha value for <CODE
CLASS="parameter"
>face</CODE
>. If
    face is <A
HREF="#AEN6073"
>ALL_SIDES</A
>, set
    the alpha to all faces. The <CODE
CLASS="parameter"
>alpha</CODE
> value is
    interpreted as an opacity percentage - 1.0 is fully opaque, and
    0.2 is mostly transparent. This api will clamp
    <CODE
CLASS="parameter"
>alpha</CODE
> values less 0.1 to .1 and greater
    than 1.0 to 1.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN3773"
>A.223. llSetBuoyancy</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN3775"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>llSetBuoyancy</CODE
>(float buoyancy);</CODE
></P
><P
></P
></DIV
><P
>Set the object buoyancy. A value of 0 is none, less than 1.0 sinks,
    1.0 floats, and greater than 1.0 rises.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN3782"
>A.224. llSetCameraAtOffset</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN3784"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>llSetCameraAtOffset</CODE
>(vector offset);</CODE
></P
><P
></P
></DIV
><P
>Sets the camera at offset used in this object if an avatar
    sits on it.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN3791"
>A.225. llSetClickAction</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN3793"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>llSetClickAction</CODE
>(integer action);</CODE
></P
><P
></P
></DIV
><P
>Sets which action is invoked when a resident clicks a prim.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN3800"
>A.226. llForceMouselook</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN3802"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>llForceMouselook</CODE
>(integer mouselook);</CODE
></P
><P
></P
></DIV
><P
>Puts the camera into mouselook mode if an avatar
    sits on this object.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN3809"
>A.227. llSetCameraEyeOffset</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN3811"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>llSetCameraEyeOffset</CODE
>(vector offset);</CODE
></P
><P
></P
></DIV
><P
>Sets the camera eye offset used in this object if an avatar
    sits on it.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN3818"
>A.228. llSetColor</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN3820"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>llSetColor</CODE
>(vector color, integer face);</CODE
></P
><P
></P
></DIV
><P
>Sets the <CODE
CLASS="parameter"
>color</CODE
> of
    <CODE
CLASS="parameter"
>face</CODE
>. If face is <A
HREF="#AEN6073"
>ALL_SIDES</A
>, set the alpha to
    all faces.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN3832"
>A.229. llSetDamage</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN3834"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>llSetDamage</CODE
>(float damage);</CODE
></P
><P
></P
></DIV
><P
>Sets the amount of damage that will be done to an object
    that this object hits. This object will be destroyed on damaging
    another object.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN3841"
>A.230. llSetForce</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN3843"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>llSetForce</CODE
>(vector force, integer local);</CODE
></P
><P
></P
></DIV
><P
>If the object is physical, this function sets the
    <CODE
CLASS="parameter"
>force</CODE
>. The vector is in local coordinates if
    local is <A
HREF="#AEN5295"
>TRUE</A
>, global if
    <A
HREF="#AEN5295"
>FALSE</A
>.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN3855"
>A.231. llSetForceAndTorque</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN3857"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>llSetForceAndTorque</CODE
>(vector force, vector torque, integer local);</CODE
></P
><P
></P
></DIV
><P
>If the object is physical, this function sets the
    <CODE
CLASS="parameter"
>force</CODE
> and
    <CODE
CLASS="parameter"
>torque</CODE
>. The vectors are in local coordinates
    if local is <A
HREF="#AEN5295"
>TRUE</A
>, global if
    <A
HREF="#AEN5295"
>FALSE</A
>.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN3872"
>A.232. llSetHoverHeight</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN3874"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>llSetHoverHeight</CODE
>(float height, float water, float tau);</CODE
></P
><P
></P
></DIV
><P
>Critically damps to a height. The height is above ground and
    water if <CODE
CLASS="parameter"
>water</CODE
> is <A
HREF="#AEN5295"
>TRUE</A
>.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN3887"
>A.233. llSetLinkAlpha</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN3889"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>llSetLinkAlpha</CODE
>(integer linknumber, float alpha, integer face);</CODE
></P
><P
></P
></DIV
><P
>Sets the <CODE
CLASS="parameter"
>alpha</CODE
> of a prim in the link set.
    The <CODE
CLASS="parameter"
>linknum</CODE
>
    parameter is either the linked number available through <A
HREF="#AEN1867"
>llGetLinkNumber</A
> or a <A
HREF="#AEN5616"
>link constant</A
>.
    If <CODE
CLASS="parameter"
>face</CODE
> is
    <A
HREF="#AEN6073"
>ALL_SIDES</A
>, set the alpha 
    of all faces.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN3906"
>A.234. llSetLinkColor</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN3908"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>llSetLinkColor</CODE
>(integer linknumber, vector color, integer face);</CODE
></P
><P
></P
></DIV
><P
>Sets the <CODE
CLASS="parameter"
>color</CODE
> of a prim in the link set.
    The <CODE
CLASS="parameter"
>linknum</CODE
>
    parameter is either the linked number available through <A
HREF="#AEN1867"
>llGetLinkNumber</A
> or a <A
HREF="#AEN5616"
>link constant</A
>.
    If <CODE
CLASS="parameter"
>face</CODE
> is
    <A
HREF="#AEN6073"
>ALL_SIDES</A
>, set the color
    of all faces.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN3925"
>A.235. llSetLinkPrimitiveParams</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN3927"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>llSetLinkPrimitiveParams</CODE
>(integer linknumber, list rules);</CODE
></P
><P
></P
></DIV
><P
>Sets the primitive parameters of a prim in the link set.
    The <CODE
CLASS="parameter"
>linknum</CODE
>
    parameter is either the linked number available through <A
HREF="#AEN1867"
>llGetLinkNumber</A
> or a <A
HREF="#AEN5616"
>link constant</A
>.
    The <CODE
CLASS="parameter"
>rules</CODE
>
	list is identical to that of 
	<A
HREF="#AEN4020"
>llSetPrimitiveParams</A
>.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN3941"
>A.236. llSetLinkTexture</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN3943"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>llSetLinkTexture</CODE
>(integer linknumber, string texture, integer face);</CODE
></P
><P
></P
></DIV
><P
>Sets the <CODE
CLASS="parameter"
>texture</CODE
> of a prim in the link set.
    The <CODE
CLASS="parameter"
>linknum</CODE
>
    parameter is either the linked number available through <A
HREF="#AEN1867"
>llGetLinkNumber</A
> or a <A
HREF="#AEN5616"
>link constant</A
>.
    If <CODE
CLASS="parameter"
>face</CODE
> is
    <A
HREF="#AEN6073"
>ALL_SIDES</A
>, set the texture
    of all faces.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN3960"
>A.237. llSetLocalRot</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN3962"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>llSetLocalRot</CODE
>(rotation rot);</CODE
></P
><P
></P
></DIV
><P
>If the object is not physical, this function sets the
    rotation of a child prim relative to the root prim, and the
    linked set is adjusted.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN3969"
>A.238. llSetObjectDesc</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN3971"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>llSetObjectDesc</CODE
>(string description);</CODE
></P
><P
></P
></DIV
><P
>Sets the object description to <CODE
CLASS="parameter"
>description</CODE
>.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN3979"
>A.239. llSetObjectName</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN3981"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>llSetObjectName</CODE
>(string name);</CODE
></P
><P
></P
></DIV
><P
>Sets the object name to <CODE
CLASS="parameter"
>name</CODE
>.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN3989"
>A.240. llSetParcelMusicURL</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN3991"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>llSetParcelMusicURL</CODE
>(string url);</CODE
></P
><P
></P
></DIV
><P
>Sets the streaming audio URL for the parcel where the object
    is currently located. The <CODE
CLASS="parameter"
>url</CODE
> must be an
    http streaming source of mp3 or ogg data.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN3999"
>A.241. llSetPayPrice</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN4001"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>llSetPayPrice</CODE
>(integer default_price, list quick_pay_buttons);</CODE
></P
><P
></P
></DIV
><P
>Sets the default pay price and optionally the quick pay buttons
    for the 'Pay' window when someone pays this object.  
    See also <A
HREF="#AEN5434"
>Pay Button Constants</A
>. </P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN4011"
>A.242. llSetPos</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN4013"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>llSetPos</CODE
>(vector pos);</CODE
></P
><P
></P
></DIV
><P
>If the object is not physical, this function sets the
    position in region coordinates. If the object is a child, the
    position is treated as root relative and the linked set is
    adjusted.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN4020"
>A.243. llSetPrimitiveParams</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN4022"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>llSetPrimitiveParams</CODE
>(list rules);</CODE
></P
><P
></P
></DIV
><P
>Set primitive parameters based on <CODE
CLASS="parameter"
>rules</CODE
>. The
    <CODE
CLASS="parameter"
>rules</CODE
> are specified as an ordered list
    of parameter and value(s). Valid parameters and their expected values
    can be found in the <A
HREF="#AEN6323"
>Primitive Constants</A
>. 
    Here is a simple example:
<DIV
CLASS="informalexample"
><P
></P
><A
NAME="AEN4032"
></A
><PRE
CLASS="programlisting"
>&#13;llSetPrimitiveParams([PRIM_TYPE, PRIM_TYPE_BOX, PRIM_HOLE_DEFAULT, &#60;0,1,0&#62;,
                  0.5, &#60;-0.2, 0.2, 0&#62;, &#60;0.5,0.5,0&#62;,&#60;-0.5,0.5,0&#62;]);
</PRE
><P
></P
></DIV
></P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN4034"
>A.244. llSetRemoteScriptAccessPin</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN4036"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>llSetRemoteScriptAccessPin</CODE
>(integer pin);</CODE
></P
><P
></P
></DIV
><P
>If pin is set to a non-zero number, the task will accept remote script
    loads via llRemoteLoadScriptPin if it passes in the correct pin.
    Otherwise, llRemoteLoadScriptPin is ignored.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN4043"
>A.245. llSetRot</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN4045"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>llSetRot</CODE
>(rotation rot);</CODE
></P
><P
></P
></DIV
><P
>If the object is not physical, this function sets the
    rotation. If the object is a child, the position is treated as
    root relative and the linked set is adjusted.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN4052"
>A.246. llSetScale</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN4054"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>llSetScale</CODE
>(vector scale);</CODE
></P
><P
></P
></DIV
><P
>Sets the object scale.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN4061"
>A.247. llSetScriptState</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN4063"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>llSetScriptState</CODE
>(string name, integer run);</CODE
></P
><P
></P
></DIV
><P
>Control the state of a script on the object.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN4072"
>A.248. llSetSitText</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN4074"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>llSetSitText</CODE
>(string text);</CODE
></P
><P
></P
></DIV
><P
>Displays <CODE
CLASS="parameter"
>text</CODE
> rather than 'sit' in
    viewer pie menu.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN4082"
>A.249. llSetSoundQueueing</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN4084"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>llSetSoundQueueing</CODE
>(integer queue);</CODE
></P
><P
></P
></DIV
><P
>Sets whether successive calls to <A
HREF="#AEN3184"
>llPlaySound</A
>, <A
HREF="#AEN2773"
>llLoopSound</A
>, etc., (attached
    sounds) interrupt the playing sound. The default for objects is
    <A
HREF="#AEN5295"
>FALSE</A
>. Setting this value to
    <A
HREF="#AEN5295"
>TRUE</A
> will make the sound wait
    until the current playing sound reaches its end. The queue is one
    level deep.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN4095"
>A.250. llSetStatus</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN4097"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>llSetStatus</CODE
>(integer status, integer value);</CODE
></P
><P
></P
></DIV
><P
>Sets the <CODE
CLASS="parameter"
>status</CODE
> to
    <CODE
CLASS="parameter"
>value</CODE
>. Use <A
HREF="#AEN5304"
>status constants</A
> for the values of
    <CODE
CLASS="parameter"
>status</CODE
>.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN4110"
>A.251. llSetText</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN4112"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>llSetText</CODE
>(string text, vector color, float alpha);</CODE
></P
><P
></P
></DIV
><P
>Sets text that floats above object to
    <CODE
CLASS="parameter"
>text</CODE
>, using the specified
    <CODE
CLASS="parameter"
>color</CODE
> and
    <CODE
CLASS="parameter"
>alpha</CODE
>.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN4126"
>A.252. llSetTexture</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN4128"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>llSetTexture</CODE
>(string texture, integer face);</CODE
></P
><P
></P
></DIV
><P
>Sets the <CODE
CLASS="parameter"
>texture</CODE
> from object
    inventory of <CODE
CLASS="parameter"
>face</CODE
>. If face is <A
HREF="#AEN6073"
>ALL_SIDES</A
>, set the texture to
    all faces.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN4140"
>A.253. llSetTextureAnim</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN4142"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>llSetTextureAnim</CODE
>(integer mode, integer face, integer sizex, integer sizey, float start, float length, float rate);</CODE
></P
><P
></P
></DIV
><P
>Animates a texture by setting the texture scale and
    offset. The mode is a mask of <A
HREF="#AEN5817"
>texture animation
    constants</A
>. You can only have one texture animation on an
    object, calling llSetTextureAnim more than once on an object will
    reset it.</P
><P
>You can only do one traditional animation, <A
HREF="#AEN5817"
>ROTATE</A
> or <A
HREF="#AEN5817"
>SCALE</A
> at a time, you
    cannot combine masks. In the case of <A
HREF="#AEN5817"
>ROTATE</A
> or <A
HREF="#AEN5817"
>SCALE</A
>,
    <CODE
CLASS="parameter"
>sizex</CODE
> and <CODE
CLASS="parameter"
>sizey</CODE
> are
    ignored, and <CODE
CLASS="parameter"
>start</CODE
> and
    <CODE
CLASS="parameter"
>length</CODE
> are used as the start and length
    values of the animation. For rotation,
    <CODE
CLASS="parameter"
>start</CODE
> and <CODE
CLASS="parameter"
>length</CODE
> are
    in radians.</P
><P
>The <CODE
CLASS="parameter"
>face</CODE
> specified which face to
    animate. If <CODE
CLASS="parameter"
>face</CODE
> is <A
HREF="#AEN6073"
>ALL_SIDES</A
>, all textures on the
    object are animated. </P
><P
>The <CODE
CLASS="parameter"
>sizex</CODE
> and
    <CODE
CLASS="parameter"
>sizey</CODE
> describe the layout of the frames
    within the texture. <CODE
CLASS="parameter"
>sizex</CODE
> specifies how
    many horizontal frames and <CODE
CLASS="parameter"
>sizey</CODE
> is how
    many vertical frames.</P
><P
><CODE
CLASS="parameter"
>start</CODE
> is the frame number to begin
    the animation on. Frames are numbered from left to right, top to
    bottom, starting at 0.</P
><P
><CODE
CLASS="parameter"
>length</CODE
> is the number of frames to
    animate. 0 means to animate all frames after the start
    frame.</P
><P
><CODE
CLASS="parameter"
>rate</CODE
> is the frame rate to animate
    at. 1.0 means 1 frame per second, 10.0 means 10
    frames per second, etc.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN4188"
>A.254. llSetTimerEvent</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN4190"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>llSetTimerEvent</CODE
>(float sec);</CODE
></P
><P
></P
></DIV
><P
>Sets the <A
HREF="#AEN5211"
>timer</A
> event to
    be triggered every <CODE
CLASS="parameter"
>sec</CODE
> seconds. Passing in
    0.0 stops further <A
HREF="#AEN5211"
>timer</A
>
    events.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN4200"
>A.255. llSetTorque</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN4202"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>llSetTorque</CODE
>(vector torque, integer local);</CODE
></P
><P
></P
></DIV
><P
>If the object is physical, this function sets the
    <CODE
CLASS="parameter"
>torque</CODE
>. The vector is in local coordinates
    if local is <A
HREF="#AEN5295"
>TRUE</A
>, global if
    <A
HREF="#AEN5295"
>FALSE</A
>.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN4214"
>A.256. llSetTouchText</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN4216"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>llSetTouchText</CODE
>(string text);</CODE
></P
><P
></P
></DIV
><P
>Displays <CODE
CLASS="parameter"
>text</CODE
> in viewer pie menu that
    acts as a touch.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN4224"
>A.257. llSetVehicleFlags</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN4226"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>llSetVehicleFlags</CODE
>(integer flags);</CODE
></P
><P
></P
></DIV
><P
>Sets the vehicle <CODE
CLASS="parameter"
>flags</CODE
> to TRUE. Valid
    parameters can be found in the <A
HREF="#AEN6231"
>vehicle flags constants</A
>
    section.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN4235"
>A.258. llSetVehicleFloatParam</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN4237"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>llSetVehicleFloatParam</CODE
>(integer param_name, float param_value);</CODE
></P
><P
></P
></DIV
><P
>Sets the vehicle floating point parameter
    <CODE
CLASS="parameter"
>param_name</CODE
> to
    <CODE
CLASS="parameter"
>param_value</CODE
>. Valid parameters and their
    expected values can be found in the <A
HREF="#AEN6112"
>vehicle parameter
    constants</A
> section.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN4249"
>A.259. llSetVehicleType</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN4251"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>llSetVehicleType</CODE
>(integer type);</CODE
></P
><P
></P
></DIV
><P
>Activates the vehicle action and choose vehicle
    <CODE
CLASS="parameter"
>type</CODE
>. Valid types and an explanation of
    their characteristics can be found in the <A
HREF="#AEN6288"
>vehicle type constants</A
>
    section.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN4260"
>A.260. llSetVehicleRotationParam</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN4262"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>llSetVehicleRotationParam</CODE
>(integer param_name, rotation param_value);</CODE
></P
><P
></P
></DIV
><P
>Sets the vehicle rotation parameter
    <CODE
CLASS="parameter"
>param_name</CODE
> to
    <CODE
CLASS="parameter"
>param_value</CODE
>. Valid parameters can be found
    in the <A
HREF="#AEN6112"
>vehicle parameter
    constants</A
> section.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN4274"
>A.261. llSetVehicleVectorParam</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN4276"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>llSetVehicleVectorParam</CODE
>(integer param_name, vector param_value);</CODE
></P
><P
></P
></DIV
><P
>Sets the vehicle vector parameter
    <CODE
CLASS="parameter"
>param_name</CODE
> to
    <CODE
CLASS="parameter"
>param_value</CODE
>. Valid parameters can be found
    in the <A
HREF="#AEN6112"
>vehicle parameter
    constants</A
> section.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN4288"
>A.262. llShout</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN4290"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>llShout</CODE
>(integer channel, string text);</CODE
></P
><P
></P
></DIV
><P
>Shout <CODE
CLASS="parameter"
>text</CODE
> on
    <CODE
CLASS="parameter"
>channel</CODE
>. Channel 0 is the public chat
    channel that all avatars see as chat text. Channels 1 to
    2,147,483,648 are private channels that are not sent to avatars
    but other scripts can listen for through the <A
HREF="#AEN2665"
>llListen</A
> api.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN4302"
>A.263. llSin</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN4304"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>float llSin</CODE
>(float theta);</CODE
></P
><P
></P
></DIV
><P
>Returns the sine of <CODE
CLASS="parameter"
>theta</CODE
> in
    radians.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN4312"
>A.264. llSitTarget</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN4314"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>llSitTarget</CODE
>(vector offset, rotation rot);</CODE
></P
><P
></P
></DIV
><P
>Set the sit location for this object. If
    <CODE
CLASS="parameter"
>offset</CODE
> == <A
HREF="#AEN6080"
>ZERO_VECTOR</A
>
    clear the sit target.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN4325"
>A.265. llSleep</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN4327"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>llSleep</CODE
>(float sec);</CODE
></P
><P
></P
></DIV
><P
>Puts the script to sleep for <CODE
CLASS="parameter"
>sec</CODE
>
    seconds.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN4335"
>A.266. llSqrt</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN4337"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>float llSqrt</CODE
>(float val);</CODE
></P
><P
></P
></DIV
><P
>Returns the square root of <CODE
CLASS="parameter"
>val</CODE
>. If
    <CODE
CLASS="parameter"
>val</CODE
> is less than 0.0, this function returns
    0.0 and raises a math runtime error.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN4346"
>A.267. llStartAnimation</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN4348"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>llStartAnimation</CODE
>(string anim);</CODE
></P
><P
></P
></DIV
><P
>This function starts animation <CODE
CLASS="parameter"
>anim</CODE
>
    for the avatar that owns the object.</P
><P
></P
><DIV
CLASS="variablelist"
><P
><B
>Valid strings for <CODE
CLASS="parameter"
>anim</CODE
></B
></P
><DL
><DT
>hold_R_bazooka, hold_R_handgun, hold_R_rifle</DT
><DD
><P
>Holds the appropriately shaped weapon in the
	right hand. Automatically switches to the aims (below) when
	user enters mouse look</P
></DD
><DT
>aim_R_bazooka, aim_R_handgun, aim_R_rifle</DT
><DD
><P
>Aims the appropriately shaped weapon along the
	direction the avatar is looking.</P
></DD
><DT
>away</DT
><DD
><P
>Flops over in "away from keyboard"
	state.</P
></DD
><DT
>backflip</DT
><DD
><P
>Performs a backflip.</P
></DD
><DT
>bow</DT
><DD
><P
>Bows at waist.</P
></DD
><DT
>brush</DT
><DD
><P
>Brushes dirt from shirt.</P
></DD
><DT
>clap</DT
><DD
><P
>Applauds.</P
></DD
><DT
>courtbow</DT
><DD
><P
>Bows with a courtly flourish.</P
></DD
><DT
>crouch</DT
><DD
><P
>Crouches in place.</P
></DD
><DT
>crouchwalk</DT
><DD
><P
>Walks in place while crouching.</P
></DD
><DT
>dance1, dance2, dance3, dance4, dance5, dance6, dance7, dance8</DT
><DD
><P
>Various dance maneuvers.</P
></DD
><DT
>falldown</DT
><DD
><P
>Freefall falling animation.</P
></DD
><DT
>female_walk</DT
><DD
><P
>Walks with hip sway.</P
></DD
><DT
>fly</DT
><DD
><P
>Flies forward.</P
></DD
><DT
>flyslow</DT
><DD
><P
>Flies forward at a less aggressive
        angle.</P
></DD
><DT
>hello</DT
><DD
><P
>Waves.</P
></DD
><DT
>hold_throw_R</DT
><DD
><P
>Hold object in right hand, prepared to throw
        it.</P
></DD
><DT
>hover</DT
><DD
><P
>Hovers in place.</P
></DD
><DT
>hover_down</DT
><DD
><P
>Pretends to hover straight
        down.</P
></DD
><DT
>hover_up</DT
><DD
><P
>Pretends to hover straight
        up.</P
></DD
><DT
>jump</DT
><DD
><P
>Midair jump position.</P
></DD
><DT
>kick_roundhouse_R</DT
><DD
><P
>Roundhouse kick with right
        leg.</P
></DD
><DT
>land</DT
><DD
><P
>Lands after flying.</P
></DD
><DT
>prejump</DT
><DD
><P
>Prepares to jump.</P
></DD
><DT
>punch_L</DT
><DD
><P
>Punch with left hand.</P
></DD
><DT
>punch_R</DT
><DD
><P
>Punch with right hand.</P
></DD
><DT
>punch_onetwo</DT
><DD
><P
>Punch with one hand then the
        other.</P
></DD
><DT
>run</DT
><DD
><P
>Runs in place.</P
></DD
><DT
>salute</DT
><DD
><P
>Salutes with right hand.</P
></DD
><DT
>sit</DT
><DD
><P
>Sits on object at knee
        height.</P
></DD
><DT
>sit_ground</DT
><DD
><P
>Sits down on ground.</P
></DD
><DT
>slowwalk</DT
><DD
><P
>Walks in place slowly.</P
></DD
><DT
>smoke_idle</DT
><DD
><P
>Leans on imaginary prop while holding
        cigarette.</P
></DD
><DT
>smoke_inhale</DT
><DD
><P
>Leans on imaginary prop and smokes a
        cigarette.</P
></DD
><DT
>smoke_throw_down</DT
><DD
><P
>Leans on imaginary prop, throws down a
        cigarette, and stamps it out.</P
></DD
><DT
>snapshot</DT
><DD
><P
>Pantomimes taking a picture.</P
></DD
><DT
>soft_land</DT
><DD
><P
>Stumbles a bit as if
        landing.</P
></DD
><DT
>stand</DT
><DD
><P
>Stands in place.</P
></DD
><DT
>standup</DT
><DD
><P
>Falls on face and stands up.</P
></DD
><DT
>stride</DT
><DD
><P
>Legs extended as if stepping off of a
        ledge.</P
></DD
><DT
>sword_strike_R</DT
><DD
><P
>Strike with sword in right
        hand.</P
></DD
><DT
>talk</DT
><DD
><P
>Head moves as if talking.</P
></DD
><DT
>throw_R</DT
><DD
><P
>Throws object in right hand.</P
></DD
><DT
>tryon_shirt</DT
><DD
><P
>Turns around and models a new
        shirt.</P
></DD
><DT
>turnleft</DT
><DD
><P
>Pretends to turn left.</P
></DD
><DT
>turnright</DT
><DD
><P
>Pretends to turn right.</P
></DD
><DT
>type</DT
><DD
><P
>Makes typing motion.</P
></DD
><DT
>uphillwalk</DT
><DD
><P
>Walks uphill in place.</P
></DD
><DT
>walk</DT
><DD
><P
>Walks in place.</P
></DD
><DT
>whisper</DT
><DD
><P
>Whispers behind hand.</P
></DD
><DT
>whistle</DT
><DD
><P
>Whistles with hands in
        mouth.</P
></DD
><DT
>yell</DT
><DD
><P
>Shouts between cupped hands.</P
></DD
></DL
></DIV
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN4578"
>A.268. llStopAnimation</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN4580"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>llStopAnimation</CODE
>(string anim);</CODE
></P
><P
></P
></DIV
><P
>Stop animation <CODE
CLASS="parameter"
>anim</CODE
> for avatar that
    owns object.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN4588"
>A.269. llStopHover</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN4590"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>llStopHover</CODE
>(void);</CODE
></P
><P
></P
></DIV
><P
>Stop hover to a height.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN4596"
>A.270. llStopLookAt</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN4598"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>llStopLookAt</CODE
>(void);</CODE
></P
><P
></P
></DIV
><P
>Stop causing object to look at target.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN4604"
>A.271. llStopMoveToTarget</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN4606"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>llStopMoveToTarget</CODE
>(void);</CODE
></P
><P
></P
></DIV
><P
>Stops critically damped motion.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN4612"
>A.272. llStopPointAt</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN4614"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>llStopPointAt</CODE
>(void);</CODE
></P
><P
></P
></DIV
><P
>Stop avatar that owns object pointing.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN4620"
>A.273. llStopSound</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN4622"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>llStopSound</CODE
>(void);</CODE
></P
><P
></P
></DIV
><P
>Stops a currently playing attached sound started with <A
HREF="#AEN3184"
>llPlaySound</A
> or <A
HREF="#AEN2773"
>llLoopSound</A
>. Has no effect on
    sounds started with <A
HREF="#AEN4756"
>llTriggerSound</A
>.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN4631"
>A.274. llStringLength</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN4633"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>integer llStringLength</CODE
>(string src);</CODE
></P
><P
></P
></DIV
><P
>Returns the number of characters in
    <CODE
CLASS="parameter"
>src</CODE
>.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN4641"
>A.275. llSubStringIndex</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN4643"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>integer llSubStringIndex</CODE
>(string source, string pattern);</CODE
></P
><P
></P
></DIV
><P
>Finds index in source where pattern first appears. Returns
    -1 if no match is found.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN4652"
>A.276. llStringToBase64</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN4654"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>string llStringToBase64</CODE
>(string str);</CODE
></P
><P
></P
></DIV
><P
>Converts a string to the Base 64 representation of the string.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN4661"
>A.277. llTakeControls</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN4663"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>llTakeControls</CODE
>(integer controls, integer accept, integer pass_on);</CODE
></P
><P
></P
></DIV
><P
>If (<CODE
CLASS="parameter"
>accept</CODE
> ==
    (<CODE
CLASS="parameter"
>controls</CODE
> &#38; input)), send input to
    object. If the boolean <CODE
CLASS="parameter"
>pass_on</CODE
> is <A
HREF="#AEN5295"
>TRUE</A
>, also send input to
    avatar.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN4678"
>A.278. llTan</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN4680"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>float llTan</CODE
>(float theta);</CODE
></P
><P
></P
></DIV
><P
>Returns the tangent of <CODE
CLASS="parameter"
>theta</CODE
>
    radians.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN4688"
>A.279. llTarget</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN4690"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>integer llTarget</CODE
>(vector position, float range);</CODE
></P
><P
></P
></DIV
><P
>Set object position within <CODE
CLASS="parameter"
>range</CODE
> of
    <CODE
CLASS="parameter"
>position</CODE
> as a target and returns an integer
    ID for the target.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN4701"
>A.280. llTargetOmega</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN4703"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>llTargetOmega</CODE
>(vector axis, float spinrate, float gain);</CODE
></P
><P
></P
></DIV
><P
>Attempt to spin at <CODE
CLASS="parameter"
>spinrate</CODE
> with
    strength <CODE
CLASS="parameter"
>gain</CODE
> on
    <CODE
CLASS="parameter"
>axis</CODE
>. A <CODE
CLASS="parameter"
>spinrate</CODE
> of
    0.0 cancels the spin. This function works in object local
    coordinates for child objects and works in world coordinates for
    root objects.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN4718"
>A.281. llTargetRemove</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN4720"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>llTargetRemove</CODE
>(integer tnumber);</CODE
></P
><P
></P
></DIV
><P
>Remove target number <CODE
CLASS="parameter"
>tnumber</CODE
>.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN4728"
>A.282. llTeleportAgentHome</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN4730"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>llTeleportAgentHome</CODE
>(key id);</CODE
></P
><P
></P
></DIV
><P
>Teleport agent on the owner's land to agent's home
    location.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN4737"
>A.283. llToLower</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN4739"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>llToLower</CODE
>();</CODE
></P
><P
></P
></DIV
><P
></P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN4746"
>A.284. llToUpper</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN4748"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>string llToUpper</CODE
>(string src);</CODE
></P
><P
></P
></DIV
><P
>Returns <CODE
CLASS="parameter"
>src</CODE
> in all lower case.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN4756"
>A.285. llTriggerSound</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN4758"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>llTriggerSound</CODE
>(string sound, float volume);</CODE
></P
><P
></P
></DIV
><P
>Plays a transient sound NOT attached to an object. The sound
    plays from a stationary position located at the center of the
    object at the time of the trigger. There is no limit to the number
    of triggered sounds which can be generated by an object, and
    calling <A
HREF="#AEN4756"
>llTriggerSound</A
>
    does not affect the attached sounds created by <A
HREF="#AEN3184"
>llPlaySound</A
> and <A
HREF="#AEN2773"
>llLoopSound</A
>. This is very useful
    for things like collision noises, explosions, etc. There is no
    way to stop or alter the volume of a sound triggered by
    this function.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN4770"
>A.286. llTriggerSoundLimited</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN4772"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>llTriggerSoundLimited</CODE
>(string sound, float volume, vector tne, vector bsw);</CODE
></P
><P
></P
></DIV
><P
>Plays a transient sound NOT attached to an object with its
    audible range limited by the axis aligned bounding box define by
    <CODE
CLASS="parameter"
>tne</CODE
> (top-north-eash) and
    <CODE
CLASS="parameter"
>bsw</CODE
> (bottom-south-west). The sound plays
    from a stationary position located at the center of the object at
    the time of the trigger. There is no limit to the number of
    triggered sounds which can be generated by an object, and calling
    <A
HREF="#AEN4756"
>llTriggerSound</A
> does not
    affect the attached sounds created by <A
HREF="#AEN3184"
>llPlaySound</A
> and <A
HREF="#AEN2773"
>llLoopSound</A
>. This is very useful
    for things like collision noises, explosions, etc. There is no way
    to stop or alter the volume of a sound triggered by this
    function.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN4790"
>A.287. llUnescapeURL</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN4792"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>string llUnescapeURL</CODE
>(string url);</CODE
></P
><P
></P
></DIV
><P
>Returns the string that is the URL unescaped version of <CODE
CLASS="parameter"
>url</CODE
>,
    replacing %20 with spaces etc.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN4800"
>A.288. llUnSit</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN4802"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>llUnSit</CODE
>(key id);</CODE
></P
><P
></P
></DIV
><P
>If agent identified by <CODE
CLASS="parameter"
>id</CODE
> is sitting
    on the object the script is attached to or is over land owned by
    the objects owner, the agent is forced to stand up.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN4810"
>A.289. llVecDist</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN4812"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>float llVecDist</CODE
>(vector a, vector b);</CODE
></P
><P
></P
></DIV
><P
>Returns the distance from <CODE
CLASS="parameter"
>a</CODE
> to
    <CODE
CLASS="parameter"
>b</CODE
></P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN4823"
>A.290. llVecMag</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN4825"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>float llVecMag</CODE
>(vector vec);</CODE
></P
><P
></P
></DIV
><P
>Returns the magnitude of <CODE
CLASS="parameter"
>vec</CODE
>.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN4833"
>A.291. llVecNorm</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN4835"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>vector llVecNorm</CODE
>(vector vec);</CODE
></P
><P
></P
></DIV
><P
>Returns normalized <CODE
CLASS="parameter"
>vec</CODE
>.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN4843"
>A.292. llVolumeDetect</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN4845"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>llVolumeDetect</CODE
>(integer detect);</CODE
></P
><P
></P
></DIV
><P
>When detect = TRUE, this makes the entire link set the script is attached to phantom but if another object interpenetrates it, it will get a collision_start event. When an object stops interpenetrating, a collision_end event is generated. While the other is interpenetrating, collision events are NOT generated. The script must be applied to the root object of the link set to get the collision events. Collision filters work normally.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN4852"
>A.293. llWater</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN4854"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>float llWater</CODE
>(vector offset);</CODE
></P
><P
></P
></DIV
><P
>Returns the water height at the object position +
    <CODE
CLASS="parameter"
>offset</CODE
>.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN4862"
>A.294. llWhisper</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN4864"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>llWhisper</CODE
>(integer channel, string text);</CODE
></P
><P
></P
></DIV
><P
>Whisper <CODE
CLASS="parameter"
>text</CODE
> on
    <CODE
CLASS="parameter"
>channel</CODE
>. Channel 0 is the public chat
    channel that all avatars see as chat text. Channels 1 to
    2,147,483,648 are private channels that are not sent to avatars
    but other scripts can listen for through the <A
HREF="#AEN2665"
>llListen</A
> api.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN4876"
>A.295. llWind</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN4878"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>vector llWind</CODE
>(vector offset);</CODE
></P
><P
></P
></DIV
><P
>Returns the wind velocity below the object position +
    <CODE
CLASS="parameter"
>offset</CODE
>.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN4886"
>A.296. llXorBase64Strings</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN4888"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>string llXorBase64Strings</CODE
>(string s1, string s2);</CODE
></P
><P
></P
></DIV
><P
>Performs an exclusive or on two Base 64 strings and returns
    a Base 64 string. The <CODE
CLASS="parameter"
>s2</CODE
> parameter repeats if
    it is shorter than <CODE
CLASS="parameter"
>s1</CODE
>.</P
></DIV
></DIV
><DIV
CLASS="appendix"
><HR><H1
><A
NAME="AEN4899"
></A
>Appendix B. Events</H1
><P
>Every state must have at least one handler. You can choose to
  handle an event by defining one of the reserved event
  handlers named here.</P
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN4902"
>B.1. at_rot_target</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN4904"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>at_rot_target</CODE
>(integer number, rotation target_rotation, rotation our_rotation);</CODE
></P
><P
></P
></DIV
><P
>This event is triggered when a script comes within a defined
    angle of a target rotation. The range is set by a call to <A
HREF="#AEN3579"
>llRotTarget</A
>.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN4916"
>B.2. at_target</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN4918"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>not_at_target</CODE
>(integer number, vector target_position, vector our_position);</CODE
></P
><P
></P
></DIV
><P
>This event is triggered when a script comes within a defined
    range from a target position. The range and position are set by a
    call to <A
HREF="#AEN4688"
>llTarget</A
>.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN4930"
>B.3. attach</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN4932"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>attach</CODE
>(key attached);</CODE
></P
><P
></P
></DIV
><P
>This event is triggered whenever a object with this script
    is attached or detached from an avatar. If it is attached,
    attached is the key of the avatar it is attached to, otherwise
    attached is <A
HREF="#AEN6070"
>NULL_KEY</A
>.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN4940"
>B.4. changed</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN4942"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>changed</CODE
>(integer changed);</CODE
></P
><P
></P
></DIV
><P
>Triggered when various events change the object. The
    <CODE
CLASS="parameter"
>changed</CODE
> will be a bitfield of <A
HREF="#AEN5690"
>change constants</A
>.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN4951"
>B.5. collision</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN4953"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>collision</CODE
>(integer total_number);</CODE
></P
><P
></P
></DIV
><P
>This event is raised while another object is colliding with
    the object the script is attached to. The number of detected
    objects is passed to the script. Information on those objects may
    be gathered via the <A
HREF="#lib_lldetected"
>llDetected*</A
> library
    functions. (Collisions are also generated if a user walks into an
    object.)</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN4961"
>B.6. collision_end</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN4963"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>collision_end</CODE
>(integer total_number);</CODE
></P
><P
></P
></DIV
><P
>This event is raised when another object stops colliding
    with the object the script is attached to. The number of detected
    objects is passed to the script. Information on those objects may
    be gathered via the <A
HREF="#lib_lldetected"
>llDetected*</A
> library
    functions. (Collisions are also generated if a user walks into an
    object.)</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN4971"
>B.7. collision_start</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN4973"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>collision_start</CODE
>(integer total_number);</CODE
></P
><P
></P
></DIV
><P
>This event is raised when another object begins to collide
    with the object the script is attached to. The number of detected
    objects is passed to the script. Information on those objects may
    be gathered via the <A
HREF="#lib_lldetected"
>llDetected*</A
> library
    functions. (Collisions are also generated if a user walks into an
    object.)</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN4981"
>B.8. control</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN4983"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>control</CODE
>(key name, integer levels, integer edges);</CODE
></P
><P
></P
></DIV
><P
>Once a script has the ability to grab control inputs from
    the avatar, this event will be used to pass the commands into the
    script. The <CODE
CLASS="parameter"
>levels</CODE
> and
    <CODE
CLASS="parameter"
>edges</CODE
> are bitfields of <A
HREF="#AEN5643"
>control constants</A
>.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN4997"
>B.9. dataserver</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN4999"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>dataserver</CODE
>(key requested, string data);</CODE
></P
><P
></P
></DIV
><P
>This event is triggered when the requested data is returned
    to the script. Data may be requested by the <A
HREF="#AEN3346"
>llRequestAgentData</A
>, the <A
HREF="#AEN3391"
>llRequestSimulatorData</A
>, the
    <A
HREF="#AEN3363"
>llRequestInventoryData</A
>,
    and the <A
HREF="#AEN1946"
>llGetNotecardLine</A
> function
    calls.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN5012"
>B.10. email</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN5014"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>email</CODE
>(string time, string address, string subject, string body, integer remaining);</CODE
></P
><P
></P
></DIV
><P
>This event is triggered when an email sent to this script
    arrives. The <CODE
CLASS="parameter"
>remaining</CODE
> tells how many more
    emails are known as still pending.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN5030"
>B.11. land_collision</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN5032"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>land_collision</CODE
>(vector position);</CODE
></P
><P
></P
></DIV
><P
>This event is raised when the object the script is attached
    to is colliding with the ground.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN5039"
>B.12. land_collision_end</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN5041"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>land_collision_end</CODE
>(vector position);</CODE
></P
><P
></P
></DIV
><P
>This event is raised when the object the script is attached
    to stops colliding with the ground.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN5048"
>B.13. land_collision_start</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN5050"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>land_collision_start</CODE
>(vector position);</CODE
></P
><P
></P
></DIV
><P
>This event is raised when the object the script is attached
    to begins to collide with the ground.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN5057"
>B.14. link_message</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN5059"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>link_message</CODE
>(integer sender_number, integer number, string message, key id);</CODE
></P
><P
></P
></DIV
><P
>Triggered when object receives a link message via <A
HREF="#AEN2919"
>llMessageLinked</A
> library
    function call.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN5073"
>B.15. listen</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN5075"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>listen</CODE
>(integer channel, string name, key id, string message);</CODE
></P
><P
></P
></DIV
><P
>This event is raised whenever a chat message matching the
    constraints passed in the <A
HREF="#AEN2665"
>llListen</A
>
    command is heard. The <CODE
CLASS="parameter"
>name</CODE
> and
    <CODE
CLASS="parameter"
>id</CODE
> of the speaker as well as the
    <CODE
CLASS="parameter"
>message</CODE
> are passed in as parameters.
    Channel 0 is the public chat channel that all avatars see as chat
    text. Channels 1 through 2,147,483,648 are private channels that
    are not sent to avatars but other scripts can listen on those
    channels.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN5092"
>B.16. money</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN5094"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>money</CODE
>(key giver, integer amount);</CODE
></P
><P
></P
></DIV
><P
>This event is triggered when user
    <CODE
CLASS="parameter"
>giver</CODE
> has given an
    <CODE
CLASS="parameter"
>amount</CODE
> of Linden dollars to the
    object.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN5105"
>B.17. moving_end</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN5107"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>moving_end</CODE
>(void);</CODE
></P
><P
></P
></DIV
><P
>Triggered whenever a object with this script stops
    moving.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN5113"
>B.18. moving_start</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN5115"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>moving_start</CODE
>(void);</CODE
></P
><P
></P
></DIV
><P
>Triggered whenever a object with this script starts
    moving.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN5121"
>B.19. no_sensor</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN5123"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>no_sensor</CODE
>(void);</CODE
></P
><P
></P
></DIV
><P
>This event is raised when sensors are active (via the <A
HREF="#AEN3693"
>llSensor</A
> library call) but are not
    sensing anything.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN5130"
>B.20. not_at_rot_target</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN5132"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>not_at_rot_target</CODE
>(void);</CODE
></P
><P
></P
></DIV
><P
>When a target is set via the <A
HREF="#AEN3579"
>llRotTarget</A
> library call, but the
    script is outside the specified angle this event is raised.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN5139"
>B.21. not_at_target</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN5141"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>not_at_target</CODE
>(void);</CODE
></P
><P
></P
></DIV
><P
>When a target is set via the <A
HREF="#AEN4688"
>llTarget</A
> library call, but the
    script is outside the specified range this event is raised.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN5148"
>B.22. object_rez</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN5150"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>object_rez</CODE
>(key id);</CODE
></P
><P
></P
></DIV
><P
>Triggered when object rezzes another object from its
    inventory via the <A
HREF="#AEN3461"
>llRezObject</A
> api. The
    <CODE
CLASS="parameter"
>id</CODE
> is the globally unique key for the
    object.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN5159"
>B.23. on_rez</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN5161"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>on_rez</CODE
>(integer start_param);</CODE
></P
><P
></P
></DIV
><P
>Triggered whenever a object is rezzed from inventory or by
    another object. The <CODE
CLASS="parameter"
>start_param</CODE
> is the
    parameter passed in from the call to <A
HREF="#AEN3461"
>llRezObject</A
> or <A
HREF="#AEN3434"
>llRezAtRoot</A
>.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN5171"
>B.24. run_time_permissions</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN5173"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>run_time_permissions</CODE
>(integer permissions);</CODE
></P
><P
></P
></DIV
><P
>Scripts need permission from either the owner or the avatar
    they wish to act on before they perform certain functions, such as
    debiting money from their owner's account, triggering an animation
    on an avatar, or capturing control inputs. The <A
HREF="#AEN3375"
>llRequestPermissions</A
>
    library function is used to request these permissions and the
    various <A
HREF="#AEN5360"
>permissions integer
    constants</A
> can be supplied. The integer returned to this
    event handler contains the current set of permissions flags, so if
    <CODE
CLASS="parameter"
>permissions</CODE
> equal 0 then no permissions are
    set.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN5183"
>B.25. sensor</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN5185"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>sensor</CODE
>(integer total_number);</CODE
></P
><P
></P
></DIV
><P
>This event is raised whenever objects matching the
    constraints of the <A
HREF="#AEN3693"
>llSensor</A
>
    command are detected. The number of detected objects is passed to
    the script in the <CODE
CLASS="parameter"
>total_number</CODE
>
    parameter. A maximum of 16 objects are passed to this event.
	Information on those objects may be gathered via the
    <A
HREF="#lib_lldetected"
>llDetected*</A
> library
    functions.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN5195"
>B.26. state_entry</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN5197"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>state_entry</CODE
>(void);</CODE
></P
><P
></P
></DIV
><P
>The state_entry event occurs whenever a new state is
    entered, including program start, and is always the first event
    handled.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN5203"
>B.27. state_exit</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN5205"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>state_exit</CODE
>(void);</CODE
></P
><P
></P
></DIV
><P
>The state_exit event occurs whenever the state command is
    used to transition to another state. It is handled before the new
    state's state_entry event.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN5211"
>B.28. timer</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN5213"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>timer</CODE
>(void);</CODE
></P
><P
></P
></DIV
><P
>This event is raised at regular intervals set by the <A
HREF="#AEN4188"
>llSetTimerEvent</A
> library
    function.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN5220"
>B.29. touch</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN5222"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>touch</CODE
>(integer total_number);</CODE
></P
><P
></P
></DIV
><P
>This event is raised while a user is touching the object the
    script is attached to. The number of touching objects is passed to
    the script in the <CODE
CLASS="parameter"
>total_number</CODE
>
    parameter. Information on those objects may be gathered via the
    <A
HREF="#lib_lldetected"
>llDetected*</A
> library
    functions.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN5231"
>B.30. touch_end</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN5233"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>touch_end</CODE
>(integer total_number);</CODE
></P
><P
></P
></DIV
><P
>This event is raised when a user stops touching the object
    the script is attached to. The number of touching objects is
    passed to the script in the <CODE
CLASS="parameter"
>total_number</CODE
>
    parameter. Information on those objects may be gathered via the
    <A
HREF="#lib_lldetected"
>llDetected*</A
> library
    functions.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN5242"
>B.31. touch_start</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN5244"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>touch_start</CODE
>(integer total_number);</CODE
></P
><P
></P
></DIV
><P
>This event is raised when a user first touches the object
    the script is attached to. The number of touching objects is
    passed to the script in the <CODE
CLASS="parameter"
>total_number</CODE
>
    parameter. Information on those objects may be gathered via the
    <A
HREF="#lib_lldetected"
>llDetected*</A
> library
    functions.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN5253"
>B.32. remote_data</A
></H2
><DIV
CLASS="funcsynopsis"
><P
></P
><A
NAME="AEN5255"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>remote_data</CODE
>(integer type, key channel, key message_id, string sender, integer ival, string sval);</CODE
></P
><P
></P
></DIV
><P
>This event is raised when a user creates an XML-RPC
    channel via <A
HREF="#AEN3011"
>llOpenRemoteDataChannel</A
>,
    a remote XML-RPC server replies to a <A
HREF="#AEN3680"
>llSendRemoteData</A
>,
    or a remote XML-RPC client sends in an XML-RPC request.  In the open case,
    <CODE
CLASS="parameter"
>type</CODE
> = REMOTE_DATA_CHANNEL, <CODE
CLASS="parameter"
>channel</CODE
> = NULL_KEY,
    <CODE
CLASS="parameter"
>message_id</CODE
> = NULL_KEY, <CODE
CLASS="parameter"
>sender</CODE
> is an empty string,
    <CODE
CLASS="parameter"
>ival</CODE
> = 0, and <CODE
CLASS="parameter"
>sval</CODE
> is an empty string.  In the reply case,
    <CODE
CLASS="parameter"
>type</CODE
> = REMOTE_DATA_REPLY, <CODE
CLASS="parameter"
>channel</CODE
> is set to the channel that the request was sent on,
    <CODE
CLASS="parameter"
>message_id</CODE
> is set to the id of the message, <CODE
CLASS="parameter"
>sender</CODE
> is an empty string,
    <CODE
CLASS="parameter"
>ival</CODE
> = 0, and <CODE
CLASS="parameter"
>sval</CODE
> is a string.  In the remote request case,
    <CODE
CLASS="parameter"
>type</CODE
> = REMOTE_DATA_REQUEST, <CODE
CLASS="parameter"
>channel</CODE
> is set to the channel that sent the message,
    <CODE
CLASS="parameter"
>message_id</CODE
> is set to the id of the message, <CODE
CLASS="parameter"
>sender</CODE
> is set by the sender,
    <CODE
CLASS="parameter"
>ival</CODE
> is an integer, and <CODE
CLASS="parameter"
>sval</CODE
> is a string.
    parameter.</P
></DIV
></DIV
><DIV
CLASS="appendix"
><HR><H1
><A
NAME="AEN5292"
></A
>Appendix C. Constants</H1
><P
>To ease scripting, many useful constants are defined by
  LSL.</P
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN5295"
>C.1. Boolean Constants</A
></H2
><P
>The boolean constants represent the values for TRUE and
    FALSE. LSL represents booleans as integer values 1 and 0
    respectively. Since there is no boolean type these constants act
    as a scripting aid usually employed for testing variables which
    conceptually represent boolean values.</P
><P
><P
></P
><UL
><LI
><P
>TRUE</P
></LI
><LI
><P
>FALSE</P
></LI
></UL
></P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN5304"
>C.2. Status Constants</A
></H2
><P
>The status constants are used in the <A
HREF="#AEN4095"
>llSetStatus</A
> and <A
HREF="#AEN2184"
>llGetStatus</A
> library calls. These
    constants can be bitwise or'ed together when calling the library
    functions to set the same value to more than one status
    flag</P
><P
></P
><DIV
CLASS="variablelist"
><P
><B
>Status Constants</B
></P
><DL
><DT
>STATUS_PHYSICS</DT
><DD
><P
>Controls whether the object moves
        physically. This controls the same flag that the ui checkbox
        for 'Physical' controls. The default is FALSE.</P
></DD
><DT
>STATUS_PHANTOM</DT
><DD
><P
>Controls whether the object collides or
        not. Setting the value to TRUE makes the object non-colliding
        with all objects. It is a good idea to use this for most
        objects that move or rotate, but are non-physical. It is also
        useful for simulating volumetric lighting. The default is
        FALSE.</P
></DD
><DT
>STATUS_ROTATE_X, STATUS_ROTATE_Y, STATUS_ROTATE_Z</DT
><DD
><P
>Controls whether the object can physically rotate
          around the specific axis or not. This flag has no meaning
          for non-physical objects. Set the value to FALSE 
          to disable rotation around that axis. The default is TRUE
          for a physical object.</P
><P
>A useful example to think about when visualizing the
          effect is a 'sit-and-spin' device. They spin around the Z
          axis (up) but not around the X or Y axis.</P
></DD
><DT
>STATUS_BLOCK_GRAB</DT
><DD
><P
>Controls whether the object can be grabbed. A
        grab is the default action when in third person, and is
        available as the 'hand' tool in build mode. This is useful for
        physical objects that you don't want other people to be able
        to trivially disturb. The default if FALSE</P
></DD
><DT
>STATUS_SANDBOX</DT
><DD
><P
>Controls whether the object can cross region
        boundaries and move more than 20 meters from its creation
        point. The default if FALSE.</P
></DD
><DT
>STATUS_DIE_AT_EDGE</DT
><DD
><P
>Controls whether the object is returned to the
        owner's inventory if it wanders off the edge of the world. It
        is useful to set this status TRUE for things like bullets or
        rockets. The default is TRUE</P
></DD
></DL
></DIV
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN5338"
>C.3. Object Type Constants</A
></H2
><P
>These constants can be combined using the binary '|'
    operator and are used in the <A
HREF="#AEN3693"
>llSensor</A
> and related calls.</P
><P
></P
><DIV
CLASS="variablelist"
><P
><B
>Object Type Constants</B
></P
><DL
><DT
>AGENT</DT
><DD
><P
>Objects in world that are agents.</P
></DD
><DT
>ACTIVE</DT
><DD
><P
>Objects in world that are running a script or
        currently physically moving.</P
></DD
><DT
>PASSIVE</DT
><DD
><P
>Static in-world objects.</P
></DD
><DT
>SCRIPTED</DT
><DD
><P
>Scripted in-world objects.</P
></DD
></DL
></DIV
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN5360"
>C.4. Permission Constants</A
></H2
><P
>The permission constants are used for passing values to
    <A
HREF="#AEN3375"
>llRequestPermissions</A
>,
    determining the value of <A
HREF="#AEN2048"
>llGetPermissions</A
>, and
    explicitly passed to the <A
HREF="#AEN5171"
>run_time_permissions</A
>
    event. For many of the basic library functions to work, a
    specific permission must be enabled. The permission constants can
    be or'ed together to be used in conjunction.</P
><P
></P
><DIV
CLASS="variablelist"
><P
><B
>Permission Constants</B
></P
><DL
><DT
>PERMISSION_DEBIT</DT
><DD
><P
>If this permission is enabled, the object can
        successfully call <A
HREF="#AEN2342"
>llGiveMoney</A
> to debit the
        owner's account.</P
></DD
><DT
>PERMISSION_TAKE_CONTROLS</DT
><DD
><P
>If this permission enabled, the object can
        successfully call the <A
HREF="#AEN4661"
>llTakeControls</A
> library
        call.</P
></DD
><DT
>PERMISSION_REMAP_CONTROLS</DT
><DD
><P
>(not yet implemented)</P
></DD
><DT
>PERMISSION_TRIGGER_ANIMATION</DT
><DD
><P
>If this permission is enabled, the object can
        successfully call <A
HREF="#AEN4346"
>llStartAnimation</A
> for the
        avatar that owns this object.</P
></DD
><DT
><A
NAME="const_permission_attach"
></A
>PERMISSION_ATTACH</DT
><DD
><P
>If this permission is enabled, the object can
        successfully call <A
HREF="#AEN1119"
>llAttachToAvatar</A
> to attach
        to the given avatar.</P
></DD
><DT
>PERMISSION_RELEASE_OWNERSHIP</DT
><DD
><P
>(not yet implemented)</P
></DD
><DT
><A
NAME="const_permission_change_links"
></A
>PERMISSION_CHANGE_LINKS</DT
><DD
><P
>If this permission is enabled, the object can
        successfully call <A
HREF="#AEN1292"
>llCreateLink</A
>, <A
HREF="#AEN1191"
>llBreakLink</A
>, and <A
HREF="#AEN1182"
>llBreakAllLinks</A
> to change
        links to other objects.</P
></DD
><DT
>PERMISSION_CHANGE_JOINTS</DT
><DD
><P
>(not yet implemented)</P
></DD
><DT
>PERMISSION_CHANGE_PERMISSIONS</DT
><DD
><P
>(not yet implemented)</P
></DD
></DL
></DIV
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN5411"
>C.5. Inventory Constants</A
></H2
><P
>These constants can be used to refer to a specific inventory
    type in calls to <A
HREF="#AEN1789"
>llGetInventoryNumber</A
> and
    <A
HREF="#AEN1774"
>llGetInventoryName</A
>.  They
	are also returned by <A
HREF="#AEN1816"
>llGetInventoryType</A
>.
	</P
><P
></P
><DIV
CLASS="variablelist"
><P
><B
>Inventory Constants</B
></P
><DL
><DT
>INVENTORY_TEXTURE, INVENTORY_SOUND, INVENTORY_OBJECT, INVENTORY_SCRIPT, INVENTORY_LANDMARK, INVENTORY_CLOTHING, INVENTORY_NOTECARD, INVENTORY_BODYPART, INVENTORY_ANIMATION, INVENTORY_GESTURE, INVENTORY_ALL, INVENTORY_NONE</DT
><DD
><P
>Each constant refers to the named type of
        inventory.</P
></DD
></DL
></DIV
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN5434"
>C.6. Pay Price Constants</A
></H2
><P
>These constants can be used in <A
HREF="#AEN1789"
>llSetPayPrice</A
></P
><P
></P
><DIV
CLASS="variablelist"
><P
><B
>Pay Price Constants</B
></P
><DL
><DT
>PAY_HIDE</DT
><DD
><P
>Do not show this quick pay button.</P
></DD
><DT
>PAY_DEFAULT</DT
><DD
><P
>Use the default value for this quick pay button.</P
></DD
></DL
></DIV
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN5448"
>C.7. Attachment Constants</A
></H2
><P
>These constants are used to refer to attachment points in
    calls to <A
HREF="#AEN1119"
>llAttachToAvatar</A
>.</P
><P
></P
><DIV
CLASS="variablelist"
><P
><B
>Attachment Constants</B
></P
><DL
><DT
>ATTACH_CHEST</DT
><DD
><P
>Attach to the avatar chest.</P
></DD
><DT
>ATTACH_HEAD</DT
><DD
><P
>Attach to the avatar head.</P
></DD
><DT
>ATTACH_LSHOULDER</DT
><DD
><P
>Attach to the avatar left shoulder.</P
></DD
><DT
>ATTACH_RSHOULDER</DT
><DD
><P
>Attach to the avatar right shoulder.</P
></DD
><DT
>ATTACH_LHAND</DT
><DD
><P
>Attach to the avatar left hand.</P
></DD
><DT
>ATTACH_RHAND</DT
><DD
><P
>Attach to the avatar right hand.</P
></DD
><DT
>ATTACH_LFOOT</DT
><DD
><P
>Attach to the avatar left foot.</P
></DD
><DT
>ATTACH_RFOOT</DT
><DD
><P
>Attach to the avatar right foot.</P
></DD
><DT
>ATTACH_BACK</DT
><DD
><P
>Attach to the avatar back.</P
></DD
><DT
>ATTACH_PELVIS</DT
><DD
><P
>Attach to the avatar pelvis.</P
></DD
><DT
>ATTACH_MOUTH</DT
><DD
><P
>Attach to the avatar mouth.</P
></DD
><DT
>ATTACH_CHIN</DT
><DD
><P
>Attach to the avatar chin.</P
></DD
><DT
>ATTACH_LEAR</DT
><DD
><P
>Attach to the avatar left ear.</P
></DD
><DT
>ATTACH_REAR</DT
><DD
><P
>Attach to the avatar right ear.</P
></DD
><DT
>ATTACH_LEYE</DT
><DD
><P
>Attach to the avatar left eye.</P
></DD
><DT
>ATTACH_REYE</DT
><DD
><P
>Attach to the avatar right eye.</P
></DD
><DT
>ATTACH_NOSE</DT
><DD
><P
>Attach to the avatar nose.</P
></DD
><DT
>ATTACH_RUARM</DT
><DD
><P
>Attach to the avatar right upper arm.</P
></DD
><DT
>ATTACH_RLARM</DT
><DD
><P
>Attach to the avatar right lower arm.</P
></DD
><DT
>ATTACH_LUARM</DT
><DD
><P
>Attach to the avatar left upper arm.</P
></DD
><DT
>ATTACH_LLARM</DT
><DD
><P
>Attach to the avatar left lower arm.</P
></DD
><DT
>ATTACH_RHIP</DT
><DD
><P
>Attach to the avatar right hip.</P
></DD
><DT
>ATTACH_RULEG</DT
><DD
><P
>Attach to the avatar right upper leg.</P
></DD
><DT
>ATTACH_RLLEG</DT
><DD
><P
>Attach to the avatar right lower leg.</P
></DD
><DT
>ATTACH_LHIP</DT
><DD
><P
>Attach to the avatar left hip.</P
></DD
><DT
>ATTACH_LULEG</DT
><DD
><P
>Attach to the avatar lower upper leg.</P
></DD
><DT
>ATTACH_LLLEG</DT
><DD
><P
>Attach to the avatar lower left leg.</P
></DD
><DT
>ATTACH_BELLY</DT
><DD
><P
>Attach to the avatar belly.</P
></DD
><DT
>ATTACH_RPEC</DT
><DD
><P
>Attach to the avatar right pectoral.</P
></DD
><DT
>ATTACH_LPEC</DT
><DD
><P
>Attach to the avatar left pectoral.</P
></DD
></DL
></DIV
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN5574"
>C.8. Land Constants</A
></H2
><P
>These constants are only used in calls to <A
HREF="#AEN2949"
>llModifyLand</A
>. The constants
    are equivalent to the similarly labelled user interface elements
    for editing land in the viewer.</P
><P
></P
><DIV
CLASS="variablelist"
><P
><B
>Land Constants</B
></P
><DL
><DT
>LAND_LEVEL</DT
><DD
><P
>Action to make the land flat and level.</P
></DD
><DT
>LAND_RAISE</DT
><DD
><P
>Action to raise the land.</P
></DD
><DT
>LAND_LOWER</DT
><DD
><P
>Action to lower the land.</P
></DD
><DT
>LAND_SMOOTH</DT
><DD
><P
>Action to smooth the land.</P
></DD
><DT
>LAND_NOISE</DT
><DD
><P
>Action to push the land toward a pseudo-random 
		heightfield.</P
></DD
><DT
>LAND_REVERT</DT
><DD
><P
>Action to push the land toward the original
		shape from when it was first terraformed.</P
></DD
><DT
>LAND_SMALL_BRUSH</DT
><DD
><P
>Use a small brush size.</P
></DD
><DT
>LAND_MEDIUM_BRUSH</DT
><DD
><P
>Use a medium brush size.</P
></DD
><DT
>LAND_LARGE_BRUSH</DT
><DD
><P
>Use a large brush size.</P
></DD
></DL
></DIV
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN5616"
>C.9. Link Constants</A
></H2
><P
>These constants are used in calls to <A
HREF="#AEN3906"
>llSetLinkColor</A
> and <A
HREF="#AEN2919"
>llMessageLinked</A
>.</P
><P
></P
><DIV
CLASS="variablelist"
><P
><B
>Link Constants</B
></P
><DL
><DT
>LINK_SET</DT
><DD
><P
>This targets every object in the linked
        set.</P
></DD
><DT
>LINK_ROOT</DT
><DD
><P
>This targets the root of the linked
        set.</P
></DD
><DT
>LINK_ALL_OTHERS</DT
><DD
><P
>This targets every object in the linked set
        except the object with the script.</P
></DD
><DT
>LINK_ALL_CHILDREN</DT
><DD
><P
>This targets every object except the root in
        the linked set.</P
></DD
><DT
>LINK_THIS</DT
><DD
><P
>This targets the object making the call only.
		</P
></DD
></DL
></DIV
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN5643"
>C.10. Control Constants</A
></H2
><P
>These constants are used in <A
HREF="#AEN4661"
>llTakeControls</A
> as well as the
    <A
HREF="#AEN4981"
>control</A
> event handler.</P
><P
></P
><DIV
CLASS="variablelist"
><P
><B
>Control Constants</B
></P
><DL
><DT
>CONTROL_FWD</DT
><DD
><P
>Test for the avatar move forward
        control.</P
></DD
><DT
>CONTROL_BACK</DT
><DD
><P
>Test for the avatar move back
        control.</P
></DD
><DT
>CONTROL_LEFT</DT
><DD
><P
>Test for the avatar move left
        control.</P
></DD
><DT
>CONTROL_RIGHT</DT
><DD
><P
>Test for the avatar move right
        control.</P
></DD
><DT
>CONTROL_ROT_LEFT</DT
><DD
><P
>Test for the avatar rotate left
        control.</P
></DD
><DT
>CONTROL_ROT_RIGHT</DT
><DD
><P
>Test for the avatar rotate right
        control.</P
></DD
><DT
>CONTROL_UP</DT
><DD
><P
>Test for the avatar move up
        control.</P
></DD
><DT
>CONTROL_DOWN</DT
><DD
><P
>Test for the avatar move down
        control.</P
></DD
><DT
>CONTROL_LBUTTON</DT
><DD
><P
>Test for the avatar left button
        control.</P
></DD
><DT
>CONTROL_ML_BUTTON</DT
><DD
><P
>Test for the avatar left button control while
        in mouse look.</P
></DD
></DL
></DIV
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN5690"
>C.11. Change Constants</A
></H2
><P
>These constants are used in the <A
HREF="#AEN4940"
>changed</A
> event handler.</P
><P
></P
><DIV
CLASS="variablelist"
><P
><B
>Change Constants</B
></P
><DL
><DT
>CHANGED_INVENTORY</DT
><DD
><P
>The object inventory has changed.</P
></DD
><DT
>CHANGED_ALLOWED_DROP</DT
><DD
><P
>The object inventory has changed because an item
        was added through the <A
HREF="#AEN1047"
>llAllowInventoryDrop</A
>
        interface.</P
></DD
><DT
>CHANGED_COLOR</DT
><DD
><P
>The object color has changed.</P
></DD
><DT
>CHANGED_SHAPE</DT
><DD
><P
>The object shape has changed, eg, a box to a
        cylinder</P
></DD
><DT
>CHANGED_SCALE</DT
><DD
><P
>The object scale has changed.</P
></DD
><DT
>CHANGED_TEXTURE</DT
><DD
><P
>The texture offset, scale rotation, or simply
        the object texture has changed.</P
></DD
><DT
>CHANGED_LINK</DT
><DD
><P
>The object has linked or its links were
        broken.</P
></DD
><DT
>CHANGED_REGION</DT
><DD
><P
>The object has changed regions.</P
></DD
><DT
>CHANGED_TELEPORT</DT
><DD
><P
>The object has been teleported.</P
></DD
></DL
></DIV
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN5733"
>C.12. Type Constants</A
></H2
><P
>These constants are used to determine the variable type
    stored in a heterogeneous list. The value returned from <A
HREF="#AEN1875"
>llGetListEntryType</A
> can be
    used for comparison against these constants.</P
><P
></P
><DIV
CLASS="variablelist"
><P
><B
>Type Constants</B
></P
><DL
><DT
>TYPE_INTEGER</DT
><DD
><P
>The list entry is an integer.</P
></DD
><DT
>TYPE_FLOAT</DT
><DD
><P
>The list entry is a float.</P
></DD
><DT
>TYPE_STRING</DT
><DD
><P
>The list entry is a string.</P
></DD
><DT
>TYPE_KEY</DT
><DD
><P
>The list entry is a key.</P
></DD
><DT
>TYPE_VECTOR</DT
><DD
><P
>The list entry is a vector.</P
></DD
><DT
>TYPE_ROTATION</DT
><DD
><P
>The list entry is a rotation.</P
></DD
><DT
>TYPE_INVALID</DT
><DD
><P
>The list entry is invalid.</P
></DD
></DL
></DIV
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN5767"
>C.13. Agent Info Constants</A
></H2
><P
>Each of these constants represents a bit in the integer
    returned from the <A
HREF="#AEN1605"
>llGetAgentInfo</A
> function and can
    be used in an expression to determine the specified information
    about an agent.</P
><P
></P
><DIV
CLASS="variablelist"
><P
><B
>Agent Info Constants</B
></P
><DL
><DT
>AGENT_FLYING</DT
><DD
><P
>The agent is flying.</P
></DD
><DT
>AGENT_ATTACHMENTS</DT
><DD
><P
>The agent has attachments.</P
></DD
><DT
>AGENT_SCRIPTED</DT
><DD
><P
>The agent has scripted attachments.</P
></DD
><DT
>AGENT_SITTING</DT
><DD
><P
>The agent is sitting.</P
></DD
><DT
>AGENT_ON_OBJECT</DT
><DD
><P
>The agent is sitting on an object.</P
></DD
><DT
>AGENT_WALKING</DT
><DD
><P
>The agent is walking.</P
></DD
><DT
>AGENT_IN_AIR</DT
><DD
><P
>The agent is in the air.</P
></DD
><DT
>AGENT_MOUSELOOK</DT
><DD
><P
>The agent is in mouselook.</P
></DD
><DT
>AGENT_AWAY</DT
><DD
><P
>The agent is away (AFK).</P
></DD
><DT
>AGENT_TYPING</DT
><DD
><P
>The agent is typing.</P
></DD
><DT
>AGENT_CROUCHING</DT
><DD
><P
>The agent is crouching.</P
></DD
></DL
></DIV
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN5817"
>C.14. Texture Animation
    Constants</A
></H2
><P
>These constants are used in the <A
HREF="#AEN4140"
>llSetTextureAnim</A
> api to
    control the animation mode.</P
><P
></P
><DIV
CLASS="variablelist"
><P
><B
>Texture Animation Constants</B
></P
><DL
><DT
>ANIM_ON</DT
><DD
><P
>Texture animation is on.</P
></DD
><DT
>LOOP</DT
><DD
><P
>Loop the texture animation.</P
></DD
><DT
>REVERSE</DT
><DD
><P
>Play animation in reverse direction.</P
></DD
><DT
>PING_PONG</DT
><DD
><P
>play animation going forwards, then
        backwards.</P
></DD
><DT
>SMOOTH</DT
><DD
><P
>slide in the X direction, instead of playing
        separate frames.</P
></DD
><DT
>ROTATE</DT
><DD
><P
>Animate texture rotation.</P
></DD
><DT
>SCALE</DT
><DD
><P
>Animate the texture scale.</P
></DD
></DL
></DIV
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN5851"
>C.15. Particle System Constants</A
></H2
><P
>These constants are used in calls to the <A
HREF="#AEN3149"
>llParticleSystem</A
> api to
    specify parameters.</P
><P
></P
><DIV
CLASS="variablelist"
><P
><B
>Particle System Parameters</B
></P
><DL
><DT
>PSYS_PART_FLAGS</DT
><DD
><P
>Each particle that is emitted by the particle system
          is simulated based on the following flags. To use multiple
          flags, bitwise or (|) them together.</P
><P
></P
><DIV
CLASS="variablelist"
><P
><B
>PSYS_PART_FLAGS Values</B
></P
><DL
><DT
>PSYS_PART_INTERP_COLOR_MASK</DT
><DD
><P
>Interpolate both the color and alpha
                from the start value to the end
                value.</P
></DD
><DT
>PSYS_PART_INTERP_SCALE_MASK</DT
><DD
><P
>Interpolate the particle scale from
                the start value to the end value.</P
></DD
><DT
>PSYS_PART_WIND_MASK</DT
><DD
><P
>Particles have their velocity damped
                towards the wind velocity.</P
></DD
><DT
>PSYS_PART_BOUNCE_MASK</DT
><DD
><P
>Particles bounce off of a plane at the
                object's Z height.</P
></DD
><DT
>PSYS_PART_FOLLOW_SRC_MASK</DT
><DD
><P
>The particle position is relative to
                the source object's position.</P
></DD
><DT
>PSYS_PART_FOLLOW_VELOCITY_MASK</DT
><DD
><P
>The particle orientation is rotated so
                the vertical axis faces towards the particle
                velocity.</P
></DD
><DT
>PSYS_PART_TARGET_POS_MASK</DT
><DD
><P
>The particle heads towards the
                location of the target object as defined by
                PSYS_SRC_TARGET_KEY.</P
></DD
><DT
>PSYS_PART_EMISSIVE_MASK</DT
><DD
><P
>The particle glows.</P
></DD
><DT
>PSYS_PART_RANDOM_ACCEL_MASK</DT
><DD
><P
>(not implemented)</P
></DD
><DT
>PSYS_PART_RANDOM_VEL_MASK</DT
><DD
><P
>(not implemented)</P
></DD
><DT
>PSYS_PART_TRAIL_MASK</DT
><DD
><P
>(not implemented)</P
></DD
></DL
></DIV
></DD
><DT
>PSYS_SRC_PATTERN</DT
><DD
><P
>The pattern which is used to generate particles. Use
          one of the following values:</P
><P
></P
><DIV
CLASS="variablelist"
><P
><B
>PSYS_SRC_PATTERN Values</B
></P
><DL
><DT
>PSYS_SRC_PATTERN_DROP</DT
><DD
><P
>Drop particles at the source
                position.</P
></DD
><DT
>PSYS_SRC_PATTERN_EXPLODE</DT
><DD
><P
>Shoot particles out in all directions,
                using the burst parameters.</P
></DD
><DT
>PSYS_SRC_PATTERN_ANGLE</DT
><DD
><P
>Shoot particles across a 2 dimensional
                area defined by the arc created from
                PSYS_SRC_OUTERANGLE. There will be an open area
                defined by PSYS_SRC_INNERANGLE within the larger
                arc.</P
></DD
><DT
>PSYS_SRC_PATTERN_ANGLE_CONE</DT
><DD
><P
>Shoot particles out in a 3 dimensional
                cone with an outer arc of PSYS_SRC_OUTERANGLE and an
                inner open area defined by
                PSYS_SRC_INNERANGLE.</P
></DD
></DL
></DIV
></DD
><DT
>PSYS_PART_START_COLOR</DT
><DD
><P
>a vector &#60;r,g,b&#62; which determines the starting
        color of the object.</P
></DD
><DT
>PSYS_PART_START_ALPHA</DT
><DD
><P
>a float which determines the starting alpha of
        the object.</P
></DD
><DT
>PSYS_PART_END_COLOR</DT
><DD
><P
>a vector &#60;r, g, b&#62; which determines the ending
        color of the object.</P
></DD
><DT
>PSYS_PART_END_ALPHA</DT
><DD
><P
>a float which determines the ending alpha of
        the object.</P
></DD
><DT
>PSYS_PART_START_SCALE</DT
><DD
><P
>a vector &#60;sx, sy, z&#62;, which is the starting
        size of the particle billboard in meters (z is
        ignored).</P
></DD
><DT
>PSYS_PART_END_SCALE</DT
><DD
><P
>a vector &#60;sx, sy, z&#62;, which is the ending size
        of the particle billboard in meters (z is
        ignored).</P
></DD
><DT
>PSYS_PART_MAX_AGE</DT
><DD
><P
>age in seconds of a particle at which it
        dies.</P
></DD
><DT
>PSYS_SRC_ACCEL</DT
><DD
><P
>a vector &#60;x, y, z&#62; which is the acceleration
        to apply on particles.</P
></DD
><DT
>PSYS_SRC_TEXTURE</DT
><DD
><P
>an asset name for the texture to use for the
        particles.</P
></DD
><DT
>PSYS_SRC_BURST_RATE</DT
><DD
><P
>how often to release a particle burst (float
        seconds).</P
></DD
><DT
>PSYS_SRC_INNERANGLE</DT
><DD
><P
>specifies the inner angle of the arc created
        by the PSYS_SRC_PATTERN_ANGLE or
        PSYS_SRC_PATTERN_ANGLE_CONE source pattern. The area
        specified will not have particles in it..</P
></DD
><DT
>PSYS_SRC_OUTERANGLE</DT
><DD
><P
>specifies the outer angle of the arc created
        by the PSYS_SRC_PATTERN_ANGLE or
        PSYS_SRC_PATTERN_ANGLE_CONE source pattern. The area
        between the outer and inner angle will be filled with
        particles..</P
></DD
><DT
>PSYS_SRC_BURST_PART_COUNT</DT
><DD
><P
>how many particles to release in a
        burst.</P
></DD
><DT
>PSYS_SRC_BURST_RADIUS</DT
><DD
><P
>what distance from the center of the object to
        create the particles.</P
></DD
><DT
>PSYS_SRC_BURST_SPEED_MIN</DT
><DD
><P
>minimum speed that a particle should be
        moving.</P
></DD
><DT
>PSYS_SRC_BURST_SPEED_MAX</DT
><DD
><P
>maximum speed that a particle should be
        moving.</P
></DD
><DT
>PSYS_SRC_MAX_AGE</DT
><DD
><P
>how long this particle system should last, 0.0
        means forever.</P
></DD
><DT
>PSYS_SRC_TARGET_KEY</DT
><DD
><P
>the key of a target object to move towards if
        PSYS_PART_TARGET_POS_MASK is enabled.</P
></DD
><DT
>PSYS_SRC_OMEGA</DT
><DD
><P
>Sets the angular velocity to rotate the axis
        that SRC_PATTERN_ANGLE and SRC_PATTERN_ANGLE_CONE
        use..</P
></DD
></DL
></DIV
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN6005"
>C.16. Agent Data Constants</A
></H2
><P
>These constants are used in calls to the <A
HREF="#AEN3346"
>llRequestAgentData</A
> api to
    collect information about an agent which will be provided in the
    <A
HREF="#AEN4997"
>dataserver event</A
>.</P
><P
></P
><DIV
CLASS="variablelist"
><P
><B
>Agent Data Constants</B
></P
><DL
><DT
>DATA_ONLINE</DT
><DD
><P
>"1" for online "0" for
        offline.</P
></DD
><DT
>DATA_NAME</DT
><DD
><P
>The name of the agent.</P
></DD
><DT
>DATA_BORN</DT
><DD
><P
>The date the agent was born returned in ISO
        8601 format of YYYY-MM-DD.</P
></DD
><DT
>DATA_RATING</DT
><DD
><P
>Returns the agent ratings as a comma separated
        string of six integers. They are:
          <P
></P
><OL
TYPE="1"
><LI
><P
>Positive rated behavior</P
></LI
><LI
><P
>Negative rated behavior</P
></LI
><LI
><P
>Positive rated appearance</P
></LI
><LI
><P
>Negative rated appearance</P
></LI
><LI
><P
>Positive rated building</P
></LI
><LI
><P
>Negative rated building</P
></LI
></OL
>
        </P
></DD
></DL
></DIV
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN6041"
>C.17. Float Constants</A
></H2
><P
>LSL provides a small collection of floating point constants
    for use in float arithmetic. These constants are usually employed
    while performing trigonometric calculations, but are sometimes
    useful for other applications such as specifying arc radians to
    sensor or particle system functions.</P
><P
></P
><DIV
CLASS="variablelist"
><P
><B
>Float Constants</B
></P
><DL
><DT
>PI</DT
><DD
><P
>3.14159265 - The radians of a
        hemicircle.</P
></DD
><DT
>TWO_PI</DT
><DD
><P
>6.28318530 - The radians of a
        circle.</P
></DD
><DT
>PI_BY_TWO</DT
><DD
><P
>1.57079633 - The radians of a quarter
        circle.</P
></DD
><DT
>DEG_TO_RAD</DT
><DD
><P
>0.01745329 - Number of radians per degree.
        You can use this to convert degrees to radians by multiplying
        the degrees by this number.</P
></DD
><DT
>RAD_TO_DEG</DT
><DD
><P
>57.2957795 - Number of degrees per radian. You
        can use this number to convert radians to degrees by
        multiplying the radians by this number.</P
></DD
><DT
>SQRT2</DT
><DD
><P
>1.41421356 - The square root of 2.</P
></DD
></DL
></DIV
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN6070"
>C.18. Key Constant</A
></H2
><P
>There is only one key constant which acts as an invalid
    key: NULL_KEY.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN6073"
>C.19. Miscellaneous Integer Constants</A
></H2
><P
>There is one uncategorized integer constant which is used in
    some of the texturing and coloring api: ALL_SIDES</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN6076"
>C.20. Miscellaneous String
    Constants</A
></H2
><P
>There is one uncategorized string constant
    which is used in the <A
HREF="#AEN4997"
>dataserver</A
> event:
    EOF</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN6080"
>C.21. Vector Constant</A
></H2
><P
>There is only one vector constant which acts as a zero
    vector: ZERO_VECTOR = &#60;0,0,0&#62;.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN6083"
>C.22. Rotation Constant</A
></H2
><P
>There is only one rotation constant which acts as a zero
    rotation: ZERO_ROTATION = &#60;0,0,0,1&#62;.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN6086"
>C.23. Simulator Data Constants</A
></H2
><P
>These constants are used in calls to the <A
HREF="#AEN3391"
>llRequestSimulatorData</A
> api to
    collect information about a simulator which will be provided in the
    <A
HREF="#AEN4997"
>dataserver event</A
>.</P
><P
></P
><DIV
CLASS="variablelist"
><P
><B
>Simulator Data Constants</B
></P
><DL
><DT
>DATA_SIM_POS</DT
><DD
><P
>The global position of the simulator.  Cast the 
		value to a vector.</P
></DD
><DT
>DATA_SIM_STATUS</DT
><DD
><P
>The status of the simulator.  Currently, this may be one of the following: 
		<P
></P
><UL
><LI
STYLE="list-style-type: opencircle"
><P
>up</P
></LI
><LI
STYLE="list-style-type: opencircle"
><P
>down</P
></LI
><LI
STYLE="list-style-type: opencircle"
><P
>stopping</P
></LI
><LI
STYLE="list-style-type: opencircle"
><P
>starting</P
></LI
><LI
STYLE="list-style-type: opencircle"
><P
>crashed</P
></LI
></UL
>
		</P
></DD
></DL
></DIV
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN6112"
>C.24. Vehicle Parameters</A
></H2
><P
></P
><DIV
CLASS="variablelist"
><P
><B
>Parameters</B
></P
><DL
><DT
><A
HREF="#AEN956"
>VEHICLE_LINEAR_FRICTION_TIMESCALE</A
></DT
><DD
><P
>A vector of timescales for exponential decay of the
        vehicle's linear velocity along its preferred axes of motion (at, left,
        up). Range = [0.07, inf) seconds for each element of the vector.
        </P
></DD
><DT
><A
HREF="#AEN956"
>VEHICLE_ANGULAR_FRICTION_TIMESCALE</A
></DT
><DD
><P
>A vector of timescales for exponential decay of the
        vehicle's angular velocity about its preferred axes of motion (at,
        left, up). Range = [0.07, inf) seconds for each element of the vector.
        </P
></DD
><DT
><A
HREF="#AEN866"
>VEHICLE_LINEAR_MOTOR_DIRECTION</A
></DT
><DD
><P
>The direction and magnitude (in preferred frame) of the
        vehicle's linear motor. The vehicle will accelerate (or decelerate if
        necessary) to match its velocity to its motor. Range of magnitude =
        [0, 30] meters/second.
		</P
></DD
><DT
><A
HREF="#AEN866"
>VEHICLE_LINEAR_MOTOR_OFFSET</A
></DT
><DD
><P
>The offset point from the vehicle's center of mass at which
		the linear motor's impulse is applied. This allows the linear motor
		to also cause rotational torque.  Range of magnitude = [0, 100]
		meters.</P
></DD
><DT
><A
HREF="#AEN866"
>VEHICLE_LINEAR_MOTOR_TIMESCALE</A
></DT
><DD
><P
>The timescale for exponential approach to full
        linear motor velocity.</P
></DD
><DT
><A
HREF="#AEN866"
>VEHICLE_LINEAR_MOTOR_DECAY_TIMESCALE</A
></DT
><DD
><P
>The timescale for exponential decay of the linear
        motor's magnitude.</P
></DD
><DT
><A
HREF="#AEN898"
>VEHICLE_ANGULAR_MOTOR_DIRECTION</A
></DT
><DD
><P
>The direction and magnitude (in preferred frame)
        of the vehicle's angular motor.The vehicle will accelerate (or
        decelerate if necessary) to match its velocity to its
        motor.</P
></DD
><DT
><A
HREF="#AEN898"
>VEHICLE_ANGULAR_MOTOR_TIMESCALE</A
></DT
><DD
><P
>The timescale for exponential approach to full
        angular motor velocity.</P
></DD
><DT
><A
HREF="#AEN898"
>VEHICLE_ANGULAR_MOTOR_DECAY_TIMESCALE</A
></DT
><DD
><P
>The timescale for exponential decay of the angular
        motor's magnitude.</P
></DD
><DT
><A
HREF="#AEN979"
>VEHICLE_HOVER_HEIGHT</A
></DT
><DD
><P
>The height (above the terrain or water, or global)
        at which the vehicle will try to hover.</P
></DD
><DT
><A
HREF="#AEN979"
>VEHICLE_HOVER_EFFICIENCY</A
></DT
><DD
><P
>A slider between minimum (0.0 = bouncy) and
        maximum (1.0 = fast as possible) damped motion of the hover
        behavior.</P
></DD
><DT
><A
HREF="#AEN979"
>VEHICLE_HOVER_TIMESCALE</A
></DT
><DD
><P
>The period of bounce (or timescale of exponential
        approach, depending on the hover efficiency) for the vehicle to
        hover to the proper height.</P
></DD
><DT
><A
HREF="#AEN972"
>VEHICLE_BUOYANCY</A
></DT
><DD
><P
>A slider between minimum (0.0) and maximum
        anti-gravity (1.0).</P
></DD
><DT
><A
HREF="#vehicle_linear_deflection"
>VEHICLE_LINEAR_DEFLECTION_EFFICIENCY</A
></DT
><DD
><P
>A slider between minimum (0.0) and maximum (1.0)
        deflection of linear velocity. That is, it's a simple scalar for
        modulating the strength of linear deflection.</P
></DD
><DT
><A
HREF="#vehicle_linear_deflection"
>VEHICLE_LINEAR_DEFLECTION_TIMESCALE</A
></DT
><DD
><P
>The timescale for exponential success of linear
        deflection. It is another way to specify how much time
        it takes for the vehicle's linear velocity to be redirected to
        it's preferred axis of motion.</P
></DD
><DT
><A
HREF="#vehicle_angular_deflection"
>VEHICLE_ANGULAR_DEFLECTION_EFFICIENCY</A
></DT
><DD
><P
>A slider between minimum (0.0) and maximum (1.0)
        deflection of angular orientation. That is, it's a simple scalar
        for modulating the strength of angular deflection such that the
        vehicle's preferred axis of motion points toward it's real
        velocity.</P
></DD
><DT
><A
HREF="#vehicle_angular_deflection"
>VEHICLE_ANGULAR_DEFLECTION_TIMESCALE</A
></DT
><DD
><P
>The timescale for exponential success of angular
        deflection. It's another way to specify the strength
        of the vehicle's tendency to reorient itself so that it's
        preferred axis of motion agrees with it's true
        velocity.</P
></DD
><DT
><A
HREF="#AEN938"
>VEHICLE_VERTICAL_ATTRACTION_EFFICIENCY</A
></DT
><DD
><P
>A slider between minimum (0.0 = wobbly) and
        maximum (1.0 = firm as possible) stability of the vehicle to keep
        itself upright.</P
></DD
><DT
><A
HREF="#AEN938"
>VEHICLE_VERTICAL_ATTRACTION_TIMESCALE</A
></DT
><DD
><P
>The period of wobble, or timescale for exponential
        approach, of the vehicle to rotate such that it's preferred
        "up" axis is oriented along the world's "up"
        axis.</P
></DD
><DT
><A
HREF="#AEN949"
>VEHICLE_BANKING_EFFICIENCY</A
></DT
><DD
><P
>A slider between anti (-1.0), none (0.0), and
        maximum (1.0) banking strength.</P
></DD
><DT
><A
HREF="#AEN949"
>VEHICLE_BANKING_MIX</A
></DT
><DD
><P
>A slider between static (0.0) and dynamic (1.0)
        banking. "Static" means the banking scales only with the
        angle of roll, whereas "dynamic" is a term that also
        scales with the vehicle's linear speed.</P
></DD
><DT
><A
HREF="#AEN949"
>VEHICLE_BANKING_TIMESCALE</A
></DT
><DD
><P
>The timescale for banking to exponentially
        approach it's maximum effect. This is another way to scale the
        strength of the banking effect, however it affects the term that
        is proportional to the difference between what the banking
        behavior is trying to do, and what the vehicle is actually
        doing.</P
></DD
><DT
><A
HREF="#AEN990"
>VEHICLE_REFERENCE_FRAME</A
></DT
><DD
><P
>A rotation of the vehicle's preferred axes of
        motion and orientation (at, left, up) with respect to the
        vehicle's local frame (x, y, z).</P
></DD
></DL
></DIV
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN6231"
>C.25. Vehicle Flags</A
></H2
><P
></P
><DIV
CLASS="variablelist"
><P
><B
>Flags</B
></P
><DL
><DT
><A
NAME="const_vehicle_flag_no_deflection_up"
></A
>VEHICLE_FLAG_NO_DEFLECTION_UP</DT
><DD
><P
>This flag prevents 
		<A
HREF="#vehicle_linear_deflection"
>linear deflection</A
> 
		parallel to world z-axis. This is useful for preventing ground 
		vehicles with large linear deflection, like bumper cars, from climbing 
		their linear deflection into the sky.</P
></DD
><DT
><A
NAME="const_vehicle_flag_limit_roll_only"
></A
>VEHICLE_FLAG_LIMIT_ROLL_ONLY</DT
><DD
><P
>For vehicles with 
		<A
HREF="#AEN938"
>vertical attractor</A
>
		that want to be able to climb/dive, for instance, airplanes that want 
        to use the <A
HREF="#AEN949"
>banking</A
>
		feature.</P
></DD
><DT
><A
NAME="const_vehicle_flag_hover_water_only"
></A
>VEHICLE_FLAG_HOVER_WATER_ONLY</DT
><DD
><P
>Ignore terrain height when 
		<A
HREF="#AEN979"
>hovering</A
>.</P
></DD
><DT
><A
NAME="const_vehicle_flag_hover_terrain_only"
></A
>VEHICLE_FLAG_HOVER_TERRAIN_ONLY</DT
><DD
><P
>Ignore water height when 
		<A
HREF="#AEN979"
>hovering</A
>.</P
></DD
><DT
><A
NAME="const_vehicle_flag_hover_global_height"
></A
>VEHICLE_FLAG_HOVER_GLOBAL_HEIGHT</DT
><DD
><P
><A
HREF="#AEN979"
>Hover</A
> at 
		global height instead of height above ground or water.</P
></DD
><DT
><A
NAME="const_vehicle_flag_hover_up_only"
></A
>VEHICLE_FLAG_HOVER_UP_ONLY</DT
><DD
><P
><A
HREF="#AEN979"
>Hover</A
> doesn't 
		push down. Use this flag for hovering
        vehicles that should be able to jump above their 
		<A
HREF="#vehicle_hover_height"
>hover height</A
>.
        </P
></DD
><DT
>VEHICLE_FLAG_LIMIT_MOTOR_UP</DT
><DD
><P
>Prevents ground vehicles from motoring into the 
        sky. This flag has a subtle effect when used with conjunction
		with <A
HREF="#AEN949"
>banking</A
>: the strength
		of the banking will decay when the vehicle no longer experiences
		collisions. The decay timescale is the same as 
		<A
HREF="#vehicle_banking_timescale"
>VEHICLE_BANKING_TIMESCALE
		</A
>. This is to help prevent ground vehicles from steering
		when they are in mid jump.
		</P
></DD
><DT
><A
NAME="const_vehicle_flag_mouselook_steer"
></A
>VEHICLE_FLAG_MOUSELOOK_STEER</DT
><DD
><P
>Steer the vehicle using the mouse.  Use this 
		flag to make the angular motor try to make the vehicle
		turn such that its <A
HREF="#vehicle_roll_pitch_yaw"
>local 
		x-axis</A
> points in the same direction as 
		the client-side camera.</P
></DD
><DT
><A
NAME="const_vehicle_flag_mouselook_bank"
></A
>VEHICLE_FLAG_MOUSELOOK_BANK</DT
><DD
><P
>Same as above, but relies on
		<A
HREF="#AEN949"
>banking</A
>.  It remaps 
		left-right motions of the client camera (also known as "yaw") to 
		rotations about the vehicle's <A
HREF="#vehicle_roll_pitch_yaw"
>&#13;		local x-axis</A
>.
		</P
></DD
><DT
><A
NAME="const_vehicle_flag_camera_decoupled"
></A
>VEHICLE_FLAG_CAMERA_DECOUPLED</DT
><DD
><P
>Makes mouselook camera rotate independently of 
		the vehicle.  By default the client mouselook camera will rotate 
		about with the vehicle, however when this flag is set the camera
		direction is independent of the vehicle's rotation.
		</P
></DD
></DL
></DIV
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN6288"
>C.26. Vehicle Types</A
></H2
><P
></P
><DIV
CLASS="variablelist"
><P
><B
>Types</B
></P
><DL
><DT
>VEHICLE_TYPE_SLED</DT
><DD
><P
>Simple vehicle that bumps along the ground, and likes to move along
        it's local x-axis.</P
><DIV
CLASS="informalexample"
><P
></P
><A
NAME="AEN6296"
></A
><PRE
CLASS="programlisting"
>&#13;// most friction for left-right, least for up-down
llSetVehicleVectorParam( VEHICLE_LINEAR_FRICTION_TIMESCALE, &#60;30, 1, 1000&#62; );

// no angular friction
llSetVehicleVectorParam( VEHICLE_ANGULAR_FRICTION_TIMESCALE, &#60;1000, 1000, 1000&#62; );

// no linear motor
llSetVehicleVectorParam( VEHICLE_LINEAR_MOTOR_DIRECTION, &#60;0, 0, 0&#62; );
llSetVehicleFloatParam( VEHICLE_LINEAR_MOTOR_TIMESCALE, 1000 );
llSetVehicleFloatParam( VEHICLE_LINEAR_MOTOR_DECAY_TIMESCALE, 120 );

// no angular motor
llSetVehicleVectorParam( VEHICLE_ANGULAR_MOTOR_DIRECTION, &#60;0, 0, 0&#62; );
llSetVehicleFloatParam( VEHICLE_ANGULAR_MOTOR_TIMESCALE, 1000 );
llSetVehicleFloatParam( VEHICLE_ANGULAR_MOTOR_DECAY_TIMESCALE, 120 );

// no hover (but with timescale of 10 sec if enabled)
llSetVehicleFloatParam( VEHICLE_HOVER_HEIGHT, 0 );
llSetVehicleFloatParam( VEHICLE_HOVER_EFFICIENCY, 10 );
llSetVehicleFloatParam( VEHICLE_HOVER_TIMESCALE, 10 );
llSetVehicleFloatParam( VEHICLE_BUOYANCY, 0 );

// maximum linear deflection with timescale of 1 second
llSetVehicleFloatParam( VEHICLE_LINEAR_DEFLECTION_EFFICIENCY, 1 );
llSetVehicleFloatParam( VEHICLE_LINEAR_DEFLECTION_TIMESCALE, 1 );

// no angular deflection 
llSetVehicleFloatParam( VEHICLE_ANGULAR_DEFLECTION_EFFICIENCY, 0 );
llSetVehicleFloatParam( VEHICLE_ANGULAR_DEFLECTION_TIMESCALE, 10 );

// no vertical attractor (doesn't mind flipping over)
llSetVehicleFloatParam( VEHICLE_VERTICAL_ATTRACTION_EFFICIENCY, 1 );
llSetVehicleFloatParam( VEHICLE_VERTICAL_ATTRACTION_TIMESCALE, 1000 );

// no banking
llSetVehicleFloatParam( VEHICLE_BANKING_EFFICIENCY, 0 );
llSetVehicleFloatParam( VEHICLE_BANKING_MIX, 1 );
llSetVehicleFloatParam( VEHICLE_BANKING_TIMESCALE, 10 );

// default rotation of local frame
llSetVehicleRotationParam( VEHICLE_REFERENCE_FRAME, &#60;0, 0, 0, 1&#62; );

// remove these flags 
llRemoveVehicleFlags( VEHICLE_FLAG_HOVER_WATER_ONLY 
                      | VEHICLE_FLAG_HOVER_TERRAIN_ONLY 
                      | VEHICLE_FLAG_HOVER_GLOBAL_HEIGHT 
                      | VEHICLE_FLAG_HOVER_UP_ONLY );

// set these flags (the limit_roll flag will have no effect
// until banking is enabled, if ever)
llSetVehicleFlags( VEHICLE_FLAG_NO_DEFLECTION_UP 
                   | VEHICLE_FLAG_LIMIT_ROLL_ONLY
                   | VEHICLE_FLAG_LIMIT_MOTOR_UP );
        </PRE
><P
></P
></DIV
></DD
><DT
>VEHICLE_TYPE_CAR</DT
><DD
><P
>Another vehicle that bounces along the ground but
        needs the motors to be driven from external controls or <A
HREF="#AEN5211"
>timer</A
> events.</P
><DIV
CLASS="informalexample"
><P
></P
><A
NAME="AEN6303"
></A
><PRE
CLASS="programlisting"
>&#13;// most friction for left-right, least for up-down
llSetVehicleVectorParam( VEHICLE_LINEAR_FRICTION_TIMESCALE, &#60;100, 2, 1000&#62; );
        
// no angular friction
llSetVehicleVectorParam( VEHICLE_ANGULAR_FRICTION_TIMESCALE, &#60;1000, 1000, 1000&#62; );

// linear motor wins after about a second, decays after about a minute
llSetVehicleVectorParam( VEHICLE_LINEAR_MOTOR_DIRECTION, &#60;0, 0, 0&#62; );
llSetVehicleFloatParam( VEHICLE_LINEAR_MOTOR_TIMESCALE, 1 );
llSetVehicleFloatParam( VEHICLE_LINEAR_MOTOR_DECAY_TIMESCALE, 60 );

// angular motor wins after a second, decays in less time than that
llSetVehicleVectorParam( VEHICLE_ANGULAR_MOTOR_DIRECTION, &#60;0, 0, 0&#62; );
llSetVehicleFloatParam( VEHICLE_ANGULAR_MOTOR_TIMESCALE, 1 );
llSetVehicleFloatParam( VEHICLE_ANGULAR_MOTOR_DECAY_TIMESCALE, 0.8 );

// no hover 
llSetVehicleFloatParam( VEHICLE_HOVER_HEIGHT, 0 );
llSetVehicleFloatParam( VEHICLE_HOVER_EFFICIENCY, 0 );
llSetVehicleFloatParam( VEHICLE_HOVER_TIMESCALE, 1000 );
llSetVehicleFloatParam( VEHICLE_BUOYANCY, 0 );

// maximum linear deflection with timescale of 2 seconds
llSetVehicleFloatParam( VEHICLE_LINEAR_DEFLECTION_EFFICIENCY, 1 );
llSetVehicleFloatParam( VEHICLE_LINEAR_DEFLECTION_TIMESCALE, 2 );

// no angular deflection 
llSetVehicleFloatParam( VEHICLE_ANGULAR_DEFLECTION_EFFICIENCY, 0 );
llSetVehicleFloatParam( VEHICLE_ANGULAR_DEFLECTION_TIMESCALE, 10 );
        
// critically damped vertical attractor
llSetVehicleFloatParam( VEHICLE_VERTICAL_ATTRACTION_EFFICIENCY, 1 );
llSetVehicleFloatParam( VEHICLE_VERTICAL_ATTRACTION_TIMESCALE, 10 );

// weak negative critically damped banking
llSetVehicleFloatParam( VEHICLE_BANKING_EFFICIENCY, -0.2 );
llSetVehicleFloatParam( VEHICLE_BANKING_MIX, 1 );
llSetVehicleFloatParam( VEHICLE_BANKING_TIMESCALE, 1 );

// default rotation of local frame
llSetVehicleRotationParam( VEHICLE_REFERENCE_FRAME, &#60;0, 0, 0, 1&#62; );

// remove these flags 
llRemoveVehicleFlags( VEHICLE_FLAG_HOVER_WATER_ONLY 
                      | VEHICLE_FLAG_HOVER_TERRAIN_ONLY 
                      | VEHICLE_FLAG_HOVER_GLOBAL_HEIGHT);

// set these flags 
llSetVehicleFlags( VEHICLE_FLAG_NO_DEFLECTION_UP 
                   | VEHICLE_FLAG_LIMIT_ROLL_ONLY 
                   | VEHICLE_FLAG_HOVER_UP_ONLY
                   | VEHICLE_FLAG_LIMIT_MOTOR_UP );
        </PRE
><P
></P
></DIV
></DD
><DT
>VEHICLE_TYPE_BOAT</DT
><DD
><P
>Hovers over water with lots of friction and some angular deflection.</P
><DIV
CLASS="informalexample"
><P
></P
><A
NAME="AEN6309"
></A
><PRE
CLASS="programlisting"
>&#13;// least for forward-back, most friction for up-down
llSetVehicleVectorParam( VEHICLE_LINEAR_FRICTION_TIMESCALE, &#60;10, 3, 2&#62; );
        
// uniform angular friction (setting it as a scalar rather than a vector)
llSetVehicleFloatParam( VEHICLE_ANGULAR_FRICTION_TIMESCALE, 10 );

// linear motor wins after about five seconds, decays after about a minute
llSetVehicleVectorParam( VEHICLE_LINEAR_MOTOR_DIRECTION, &#60;0, 0, 0&#62; );
llSetVehicleFloatParam( VEHICLE_LINEAR_MOTOR_TIMESCALE, 5 );
llSetVehicleFloatParam( VEHICLE_LINEAR_MOTOR_DECAY_TIMESCALE, 60 );

// angular motor wins after four seconds, decays in same amount of time
llSetVehicleVectorParam( VEHICLE_ANGULAR_MOTOR_DIRECTION, &#60;0, 0, 0&#62; );
llSetVehicleFloatParam( VEHICLE_ANGULAR_MOTOR_TIMESCALE, 4 );
llSetVehicleFloatParam( VEHICLE_ANGULAR_MOTOR_DECAY_TIMESCALE, 4 );

// hover 
llSetVehicleFloatParam( VEHICLE_HOVER_HEIGHT, 0 );
llSetVehicleFloatParam( VEHICLE_HOVER_EFFICIENCY, 0.5 );
llSetVehicleFloatParam( VEHICLE_HOVER_TIMESCALE, 2.0 );
llSetVehicleFloatParam( VEHICLE_BUOYANCY, 1 );

// halfway linear deflection with timescale of 3 seconds
llSetVehicleFloatParam( VEHICLE_LINEAR_DEFLECTION_EFFICIENCY, 0.5 );
llSetVehicleFloatParam( VEHICLE_LINEAR_DEFLECTION_TIMESCALE, 3 );

// angular deflection 
llSetVehicleFloatParam( VEHICLE_ANGULAR_DEFLECTION_EFFICIENCY, 0.5 );
llSetVehicleFloatParam( VEHICLE_ANGULAR_DEFLECTION_TIMESCALE, 5 );
        
// somewhat bouncy vertical attractor 
llSetVehicleFloatParam( VEHICLE_VERTICAL_ATTRACTION_EFFICIENCY, 0.5 );
llSetVehicleFloatParam( VEHICLE_VERTICAL_ATTRACTION_TIMESCALE, 5 );

// weak negative damped banking
llSetVehicleFloatParam( VEHICLE_BANKING_EFFICIENCY, -0.3 );
llSetVehicleFloatParam( VEHICLE_BANKING_MIX, 0.8 );
llSetVehicleFloatParam( VEHICLE_BANKING_TIMESCALE, 1 );

// default rotation of local frame
llSetVehicleRotationParam( VEHICLE_REFERENCE_FRAME, &#60;0, 0, 0, 1&#62; );

// remove these flags 
llRemoveVehicleFlags( VEHICLE_FLAG_HOVER_TERRAIN_ONLY 
                      | VEHICLE_FLAG_LIMIT_ROLL_ONLY 
                      | VEHICLE_FLAG_HOVER_GLOBAL_HEIGHT);

// set these flags 
llSetVehicleFlags( VEHICLE_FLAG_NO_DEFLECTION_UP 
                   | VEHICLE_FLAG_HOVER_WATER_ONLY 
                   | VEHICLE_FLAG_HOVER_UP_ONLY 
                   | VEHICLE_FLAG_LIMIT_MOTOR_UP );
        </PRE
><P
></P
></DIV
></DD
><DT
>VEHICLE_TYPE_AIRPLANE</DT
><DD
><P
>Uses linear deflection for lift, no hover, and banking to turn.</P
><DIV
CLASS="informalexample"
><P
></P
><A
NAME="AEN6315"
></A
><PRE
CLASS="programlisting"
>&#13;// very little friction along forward-back axis
llSetVehicleVectorParam( VEHICLE_LINEAR_FRICTION_TIMESCALE, &#60;200, 10, 5&#62; );
        
// uniform angular friction
llSetVehicleFloatParam( VEHICLE_ANGULAR_FRICTION_TIMESCALE, 20 );

// linear motor
llSetVehicleVectorParam( VEHICLE_LINEAR_MOTOR_DIRECTION, &#60;0, 0, 0&#62; );
llSetVehicleFloatParam( VEHICLE_LINEAR_MOTOR_TIMESCALE, 2 );
llSetVehicleFloatParam( VEHICLE_LINEAR_MOTOR_DECAY_TIMESCALE, 60 );

// angular motor
llSetVehicleVectorParam( VEHICLE_ANGULAR_MOTOR_DIRECTION, &#60;0, 0, 0&#62; );
llSetVehicleFloatParam( VEHICLE_ANGULAR_MOTOR_TIMESCALE, 4 );
llSetVehicleFloatParam( VEHICLE_ANGULAR_MOTOR_DECAY_TIMESCALE, 8 );

// no hover 
llSetVehicleFloatParam( VEHICLE_HOVER_HEIGHT, 0 );
llSetVehicleFloatParam( VEHICLE_HOVER_EFFICIENCY, 0.5 );
llSetVehicleFloatParam( VEHICLE_HOVER_TIMESCALE, 1000 );
llSetVehicleFloatParam( VEHICLE_BUOYANCY, 0 );

// linear deflection 
llSetVehicleFloatParam( VEHICLE_LINEAR_DEFLECTION_EFFICIENCY, 0.5 );
llSetVehicleFloatParam( VEHICLE_LINEAR_DEFLECTION_TIMESCALE, 0.5 );

// angular deflection 
llSetVehicleFloatParam( VEHICLE_ANGULAR_DEFLECTION_EFFICIENCY, 1.0 );
llSetVehicleFloatParam( VEHICLE_ANGULAR_DEFLECTION_TIMESCALE, 2.0 );
        
// vertical attractor
llSetVehicleFloatParam( VEHICLE_VERTICAL_ATTRACTION_EFFICIENCY, 0.9 );
llSetVehicleFloatParam( VEHICLE_VERTICAL_ATTRACTION_TIMESCALE, 2 );

// banking
llSetVehicleFloatParam( VEHICLE_BANKING_EFFICIENCY, 1 );
llSetVehicleFloatParam( VEHICLE_BANKING_MIX, 0.7 );
llSetVehicleFloatParam( VEHICLE_BANKING_TIMESCALE, 2 );

// default rotation of local frame
llSetVehicleRotationParam( VEHICLE_REFERENCE_FRAME, &#60;0, 0, 0, 1&#62; );

// remove these flags 
llRemoveVehicleFlags( VEHICLE_FLAG_NO_DEFLECTION_UP 
                      | VEHICLE_FLAG_HOVER_WATER_ONLY 
                      | VEHICLE_FLAG_HOVER_TERRAIN_ONLY 
                      | VEHICLE_FLAG_HOVER_GLOBAL_HEIGHT 
                      | VEHICLE_FLAG_HOVER_UP_ONLY
                      | VEHICLE_FLAG_LIMIT_MOTOR_UP );

// set these flags 
llSetVehicleFlags( VEHICLE_FLAG_LIMIT_ROLL_ONLY );
        </PRE
><P
></P
></DIV
></DD
><DT
>VEHICLE_TYPE_BALLOON</DT
><DD
><P
>Hover, and friction, but no deflection.</P
><DIV
CLASS="informalexample"
><P
></P
><A
NAME="AEN6321"
></A
><PRE
CLASS="programlisting"
>&#13;// uniform linear friction
llSetVehicleFloatParam( VEHICLE_LINEAR_FRICTION_TIMESCALE, 5 );
        
// uniform angular friction
llSetVehicleFloatParam( VEHICLE_ANGULAR_FRICTION_TIMESCALE, 10 );

// linear motor
llSetVehicleVectorParam( VEHICLE_LINEAR_MOTOR_DIRECTION, &#60;0, 0, 0&#62; );
llSetVehicleFloatParam( VEHICLE_LINEAR_MOTOR_TIMESCALE, 5 );
llSetVehicleFloatParam( VEHICLE_LINEAR_MOTOR_DECAY_TIMESCALE, 60 );

// angular motor
llSetVehicleVectorParam( VEHICLE_ANGULAR_MOTOR_DIRECTION, &#60;0, 0, 0&#62; );
llSetVehicleFloatParam( VEHICLE_ANGULAR_MOTOR_TIMESCALE, 6 );
llSetVehicleFloatParam( VEHICLE_ANGULAR_MOTOR_DECAY_TIMESCALE, 10 );

// hover 
llSetVehicleFloatParam( VEHICLE_HOVER_HEIGHT, 5 );
llSetVehicleFloatParam( VEHICLE_HOVER_EFFICIENCY, 0.8 );
llSetVehicleFloatParam( VEHICLE_HOVER_TIMESCALE, 10 );
llSetVehicleFloatParam( VEHICLE_BUOYANCY, 1 );

// no linear deflection 
llSetVehicleFloatParam( VEHICLE_LINEAR_DEFLECTION_EFFICIENCY, 0 );
llSetVehicleFloatParam( VEHICLE_LINEAR_DEFLECTION_TIMESCALE, 5 );

// no angular deflection 
llSetVehicleFloatParam( VEHICLE_ANGULAR_DEFLECTION_EFFICIENCY, 0 );
llSetVehicleFloatParam( VEHICLE_ANGULAR_DEFLECTION_TIMESCALE, 5 );
        
// no vertical attractor 
llSetVehicleFloatParam( VEHICLE_VERTICAL_ATTRACTION_EFFICIENCY, 1 );
llSetVehicleFloatParam( VEHICLE_VERTICAL_ATTRACTION_TIMESCALE, 1000 );

// no banking
llSetVehicleFloatParam( VEHICLE_BANKING_EFFICIENCY, 0 );
llSetVehicleFloatParam( VEHICLE_BANKING_MIX, 0.7 );
llSetVehicleFloatParam( VEHICLE_BANKING_TIMESCALE, 5 );

// default rotation of local frame
llSetVehicleRotationParam( VEHICLE_REFERENCE_FRAME, &#60;0, 0, 0, 1&#62; );

// remove all flags 
llRemoveVehicleFlags( VEHICLE_FLAG_NO_DEFLECTION_UP 
                      | VEHICLE_FLAG_HOVER_WATER_ONLY 
                      | VEHICLE_FLAG_LIMIT_ROLL_ONLY 
                      | VEHICLE_FLAG_HOVER_TERRAIN_ONLY 
                      | VEHICLE_FLAG_HOVER_GLOBAL_HEIGHT 
                      | VEHICLE_FLAG_HOVER_UP_ONLY 
                      | VEHICLE_FLAG_LIMIT_MOTOR_UP );
        </PRE
><P
></P
></DIV
></DD
></DL
></DIV
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN6323"
>C.27. Primitive Constants</A
></H2
><P
>These constants are used in calls to the <A
HREF="#AEN4020"
>llSetPrimitiveParams</A
> and <A
HREF="#AEN2075"
>llGetPrimitiveParams</A
> api to
    specify parameters.</P
><P
></P
><DIV
CLASS="variablelist"
><P
><B
>Primitive Parameters</B
></P
><DL
><DT
>PRIM_TYPE</DT
><DD
><P
>This allows the various primitive shape parameters to be controlled.  PRIM_TYPE must be followed by
	  appropriate arguments based on which type is selected.</P
><P
></P
><DIV
CLASS="variablelist"
><P
><B
>PRIM_TYPE Values</B
></P
><DL
><DT
>PRIM_TYPE_BOX</DT
><DD
><P
>Sets the primitive to a box, followed by integer hole shape, vector cut, float hollow, vector twist, vector top size, and vector top shear.</P
></DD
><DT
>PRIM_TYPE_CYLINDER</DT
><DD
><P
>Sets the primitive to a cylinder, followed by integer hole shape, vector cut, float hollow, vector twist, vector top size, and vector top shear.</P
></DD
><DT
>PRIM_TYPE_PRISM</DT
><DD
><P
>Sets the primitive to a prism, followed by integer hole shape, vector cut, float hollow, vector twist, vector top size, and vector top shear.</P
></DD
><DT
>PRIM_TYPE_SPHERE</DT
><DD
><P
>Sets the primitive to a sphere, followed by integer hole shape, vector cut, float hollow, vector twist, and vector dimple.</P
></DD
><DT
>PRIM_TYPE_TORUS</DT
><DD
><P
>Sets the primitive to a torus, followed by integer hole shape, vector cut, float hollow, vector twist, vector hole size, vector top shear, vector advanced cut, vector taper, float revolutions, float radius offset, and float skew.</P
></DD
><DT
>PRIM_TYPE_TUBE</DT
><DD
><P
>Sets the primitive to a tube, followed by integer hole shape, vector cut, float hollow, vector twist, vector hole size, vector top shear, vector advanced cut, vector taper, float revolutions, float radius offset, and float skew.</P
></DD
><DT
>PRIM_TYPE_RING</DT
><DD
><P
>Sets the primitive to a ring, followed by integer hole shape, vector cut, float hollow, vector twist, vector hole size, vector top shear, vector advanced cut, vector taper, float revolutions, float radius offset, and float skew.</P
></DD
></DL
></DIV
><P
>Choose hole shape from one of PRIM_HOLE_DEFAULT, PRIM_HOLE_CIRCLE, PRIM_HOLE_SQUARE, or PRIM_HOLE_TRIANGLE.</P
></DD
><DT
>PRIM_MATERIAL</DT
><DD
><P
>Choose material from one of PRIM_MATERIAL_STONE, PRIM_MATERIAL_METAL, PRIM_MATERIAL_GLASS,
	PRIM_MATERIAL_WOOD, PRIM_MATERIAL_FLESH, PRIM_MATERIAL_PLASTIC, PRIM_MATERIAL_RUBBER, or PRIM_MATERIAL_LIGHT.</P
></DD
><DT
>PRIM_PHYSICS</DT
><DD
><P
>Set physics to TRUE or FALSE.</P
></DD
><DT
>PRIM_TEMP_ON_REZ</DT
><DD
><P
>Set temporary on rez to TRUE or FALSE.</P
></DD
><DT
>PRIM_PHANTOM</DT
><DD
><P
>Set phantom to TRUE or FALSE.</P
></DD
><DT
>PRIM_POSITION</DT
><DD
><P
>Sets the position with a vector.</P
></DD
><DT
>PRIM_SIZE</DT
><DD
><P
>Sets the size with a vector.</P
></DD
><DT
>PRIM_ROTATION</DT
><DD
><P
>Sets the rotation with a rotation.</P
></DD
><DT
>PRIM_TEXTURE</DT
><DD
><P
>Followed by an integer face, key id, vector repeats, vector offsets, and float rotation in radians.</P
></DD
><DT
>PRIM_COLOR</DT
><DD
><P
>Followed by an integer face, vector color, and float alpha.</P
></DD
><DT
>PRIM_BUMP_SHINY</DT
><DD
><P
>Followed by an integer face, one of PRIM_SHINY_NONE, PRIM_SHINY_LOW, PRIM_SHINY_MEDIUM, or PRIM_SHINY_HIGH,
	and one of PRIM_BUMP_NONE, PRIM_BUMP_BRIGHT, PRIM_BUMP_DARK, PRIM_BUMP_WOOD, PRIM_BUMP_BARK,
	PRIM_BUMP_BRICKS, PRIM_BUMP_CHECKER, PRIM_BUMP_CONCRETE, PRIM_BUMP_TILE, PRIM_BUMP_STONE, PRIM_BUMP_DISKS,
	PRIM_BUMP_GRAVEL, PRIM_BUMP_BLOBS, PRIM_BUMP_SIDING, PRIM_BUMP_LARGETILE, PRIM_BUMP_STUCCO, PRIM_BUMP_SUCTION,
	or PRIM_BUMP_WEAVE.</P
></DD
><DT
>PRIM_GLOW</DT
><DD
><P
>Followed by an integer face and a float glow value (in range 0.0 to 1.0).</P
></DD
></DL
></DIV
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN6409"
>C.28. XML-RPC Constants</A
></H2
><P
>These constants are passed to the remote_data event: REMOTE_DATA_CHANNEL, REMOTE_DATA_REQUEST, and REMOTE_DATA_REPLY.</P
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN6412"
>C.29. Permission Mask Constants</A
></H2
><P
>These MASK_* constants are used as arguments to <A
HREF="#AEN2009"
>llGetObjectPermMask</A
> and <A
HREF="#AEN1801"
>llGetInventoryPermMask</A
>.  These functions return combinations of PERM_* constants.</P
><P
></P
><DIV
CLASS="variablelist"
><P
><B
>Mask and Permission Constants</B
></P
><DL
><DT
>MASK_BASE</DT
><DD
><P
>Specifies base permissions.  These permissions are identical to owner permissions except in the case that the object is locked.  When an object is locked, owner permissions are stripped of move/modify rights (thus, the 'locking').  On unlock, owner permissions revert back to base permissions.</P
></DD
><DT
>MASK_OWNER</DT
><DD
><P
>Specifies owner permissions.  These are never more permissive than base permissions.</P
></DD
><DT
>MASK_GROUP</DT
><DD
><P
>Specifies group permissions.  These are never more permissive than owner permissions.</P
></DD
><DT
>MASK_EVERYONE</DT
><DD
><P
>Specifies everyone permissions.  These are never more permissive than owner permissions.</P
></DD
><DT
>MASK_NEXT</DT
><DD
><P
>Specifies next owner permissions.  These are never more permissive than base permissions.</P
></DD
><DT
>PERM_MOVE</DT
><DD
><P
>Set if movement is allowed.</P
></DD
><DT
>PERM_MODIFY</DT
><DD
><P
>Set if modification is allowed.</P
></DD
><DT
>PERM_COPY</DT
><DD
><P
>Set if copying is allowed.</P
></DD
><DT
>PERM_TRANSFER</DT
><DD
><P
>Set if transfers are allowed.</P
></DD
><DT
>PERM_ALL</DT
><DD
><P
>This is returned if all other PERM_* are set.</P
></DD
></DL
></DIV
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN6459"
>C.30. Parcel Media Constants</A
></H2
><P
>These constants are passed to the <A
HREF="#AEN3031"
>llParcelMediaCommand</A
> to control playback of movies and other multimedia within a land parcel.</P
><P
></P
><DIV
CLASS="variablelist"
><P
><B
>Parcel Media Constants</B
></P
><DL
><DT
>PARCEL_MEDIA_COMMAND_STOP</DT
><DD
><P
>Stop the media stream and go back to the first frame.</P
></DD
><DT
>PARCEL_MEDIA_COMMAND_PAUSE</DT
><DD
><P
>Pause the media stream (stop playing but stay on current frame).</P
></DD
><DT
>PARCEL_MEDIA_COMMAND_PLAY</DT
><DD
><P
>Start the media stream playing from the current frame and stop when the end is reached.</P
></DD
><DT
>PARCEL_MEDIA_COMMAND_LOOP_SET</DT
><DD
><P
>Used to get or set the parcel's media looping variable.
        </P
></DD
><DT
>PARCEL_MEDIA_COMMAND_TEXTURE</DT
><DD
><P
>Use this to get or set the parcel's media texture.
        </P
></DD
><DT
>PARCEL_MEDIA_COMMAND_URL</DT
><DD
><P
>Used to get or set the parcel's media url.
        </P
></DD
><DT
>PARCEL_MEDIA_COMMAND_TYPE</DT
><DD
><P
>Used to get or set the parcel's media mimetype.
        </P
></DD
><DT
>PARCEL_MEDIA_COMMAND_DESC</DT
><DD
><P
>Used to get or set the parcel's media description.
        </P
></DD
><DT
>PARCEL_MEDIA_COMMAND_SIZE</DT
><DD
><P
>Used to get or set the parcel's media pixel size.
        </P
></DD
><DT
>PARCEL_MEDIA_COMMAND_TIME</DT
><DD
><P
>Move a media stream to a specific time.
        </P
></DD
><DT
>PARCEL_MEDIA_COMMAND_AGENT</DT
><DD
><P
>Applies the media command to the specified agent only.
        </P
></DD
><DT
>PARCEL_MEDIA_COMMAND_UNLOAD</DT
><DD
><P
>Completely unloads the movie and restores the original texture.
        </P
></DD
><DT
>PARCEL_MEDIA_COMMAND_AUTO_ALIGN</DT
><DD
><P
>Sets the parcel option 'Auto scale content'.
        </P
></DD
><DT
>PARCEL_MEDIA_COMMAND_LOOP</DT
><DD
><P
>This command has been depricated in favor of the PARCEL_MEDIA_COMMAND_LOOP_SET above.
        </P
></DD
></DL
></DIV
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN6521"
>C.31. Click Action Constants</A
></H2
><P
>These constants are passed to <A
HREF="#AEN3791"
>llSetClickAction</A
> to define default behavior when a resident clicks upon a prim.</P
><P
></P
><DIV
CLASS="variablelist"
><P
><B
>Click Action Constants</B
></P
><DL
><DT
>CLICK_ACTION_NONE</DT
><DD
><P
>Disables the click action for this prim.</P
></DD
><DT
>CLICK_ACTION_TOUCH</DT
><DD
><P
>Sets the click-action behavior of this prim to touch.</P
></DD
><DT
>CLICK_ACTION_SIT</DT
><DD
><P
>Sets the click-action behavior of this prim to sit.</P
></DD
><DT
>CLICK_ACTION_BUY</DT
><DD
><P
>Sets the click-action behavior of this prim to buy.</P
></DD
><DT
>CLICK_ACTION_PAY</DT
><DD
><P
>Sets the click-action behavior of this prim to pay.</P
></DD
><DT
>CLICK_ACTION_OPEN</DT
><DD
><P
>Sets the click-action behavior of this prim to open.</P
></DD
><DT
>CLICK_ACTION_PLAY</DT
><DD
><P
>Sets the click-action behavior of this prim to play.</P
></DD
><DT
>CLICK_ACTION_OPEN_MEDIA</DT
><DD
><P
>Sets the click-action behavior of this prim to open-media.</P
></DD
><DT
>CLICK_ACTION_SIT</DT
><DD
><P
>Sets the click-action behavior of this prim to sit.</P
></DD
><DT
>CLICK_ACTION_SIT</DT
><DD
><P
>Sets the click-action behavior of this prim to sit.</P
></DD
></DL
></DIV
></DIV
></DIV
></DIV
></BODY
></HTML
>