https://wiki.secondlife.com/w/api.php?action=feedcontributions&user=Draconis+Neurocam&feedformat=atomSecond Life Wiki - User contributions [en]2024-03-28T20:54:15ZUser contributionsMediaWiki 1.36.1https://wiki.secondlife.com/w/index.php?title=User:Draconis_Neurocam&diff=1213223User:Draconis Neurocam2023-02-03T10:30:02Z<p>Draconis Neurocam: Removed Twitter anything and replaced with Mastodon.</p>
<hr />
<div>Salutations, I am Draconis Neurocam.<br />
<br />
My goal is to make things better to the best of my ability.<br />
<br />
This place is something I dreamed would exist as a child, and now since it does, I love being a part of it.<br />
<br />
What most people never actually realize is how powerful what we have at our fingertips is.<br />
<br />
I take this as an extension of real life, and not something separate.<br />
----<br />
[https://mastodon.social/@Neurocam @Neurocam@mastodon.social]<br />
<source lang="lsl2"><br />
//Written by Nomad Padar one of the most genius people I have ever known<br />
vector int2vec(integer n) {<br />
//0zyx ZZZZ ZZZZ ZZZZ YYYY YYYY XXXX XXXX<br />
return <n&0xFF, (n>>8)&0xFF, ((n>>16)&0xFF)> + <((n&0x10000000)!=0)*.5,((n&0x20000000)!=0)*.5,((n&0x40000000)!=0)*.5>;<br />
}<br />
integer vec2int(vector v) {<br />
integer x = (integer)(v.x);<br />
integer y = (integer)(v.y);<br />
integer z = (integer)(v.z);<br />
integer out;<br />
<br />
//Rounds to 0, .5, or 1.0<br />
float delta = v.x-x;<br />
if((delta>.25) && (delta<.75)) out += 0x10000000;<br />
else if(delta>.75) out += 0x1;<br />
delta = v.y-y;<br />
if((delta>.25) && (delta<.75)) out += 0x20000000;<br />
else if(delta>.75) out += 0x100;<br />
delta = v.z-z;<br />
if((delta>.25) && (delta<.75)) out += 0x40000000;<br />
else if(delta>.75) out += 0x10000;<br />
out += x+(y<<8)+(z<<16);<br />
return out;<br />
}<br />
default<br />
{<br />
touch_start(integer total_number)<br />
{<br />
integer param = vec2int(llGetPos());<br />
llSay(0, (string)param);<br />
llSay(0, (string)int2vec(param));<br />
}<br />
}<br />
<br />
</source><br />
<br />
<source lang="lsl2"><br />
SetLinkPosLocal2Root(integer linknum,vector offset)<br />
{<br />
llSetLinkPrimitiveParamsFast(linknum, [PRIM_POSITION, (llList2Vector(llGetLinkPrimitiveParams(linknum, [PRIM_POS_LOCAL]),0))+offset]);<br />
}<br />
</source><br />
<br />
<source lang="lsl2"><br />
<value,maxvalue - value,0> / maxvalue<br />
<br />
<1.0-health,health*health,0.0><br />
</source><br />
<br />
<source lang="lsl2"><br />
llGetPos() + <1,0,0>*llGetRot()<br />
</source><br />
<br />
<source lang="lsl2"><br />
list ray(vector s, vector e)<br />
{<br />
return llCastRay(s,e,<br />
[<br />
RC_REJECT_TYPES,<br />
0<br />
//RC_REJECT_AGENTS<br />
//|RC_REJECT_PHYSICAL<br />
//|RC_REJECT_NONPHYSICAL<br />
//|RC_REJECT_LAND<br />
,<br />
RC_DATA_FLAGS,<br />
0<br />
//RC_GET_NORMAL<br />
//|RC_GET_ROOT_KEY<br />
//|RC_GET_LINK_NUM<br />
,<br />
RC_MAX_HITS, 1,<br />
RC_DETECT_PHANTOM,FALSE <br />
]);<br />
}<br />
</source><br />
<source lang="lsl2"><br />
//forwards loop through n<br />
(i=(i+1)%n)<br />
//backwards loop through n<br />
(i=(n+i-1)%n)<br />
</source><br />
{{skills<br />
|Architect=*<br />
|Builder=*<br />
|Machinima=<br />
|Scenographer=<br />
|Scripter=*<br />
|SLogistician=*<br />
|Terraformer=<br />
|}}<br />
{{ISO 639-3/cat-speaking|eng}}</div>Draconis Neurocamhttps://wiki.secondlife.com/w/index.php?title=Template:LSL_All_Functions/Name&diff=1213222Template:LSL All Functions/Name2023-02-03T10:13:40Z<p>Draconis Neurocam: Added llHMAC, llReplaceSubString, llSignRSA, and llVerifyRSA</p>
<hr />
<div><!-- If you are going to edit this, please edit Template:LSL_All_Functions/Generate instead. This was last updated on 2016-04-03--><br />
<ul style="{{NewStyle|column-width|20.5em|moz=*|webkit=*}}"><br />
<li> [[llAbs{{#var:lang}}|llAbs]]<br />
<li> [[llAcos{{#var:lang}}|llAcos]]<br />
<li> [[llAddToLandBanList{{#var:lang}}|llAddToLandBanList]]<br />
<li> [[llAddToLandPassList{{#var:lang}}|llAddToLandPassList]]<br />
<li> [[llAdjustSoundVolume{{#var:lang}}|llAdjustSoundVolume]]<br />
<li> [[llAgentInExperience{{#var:lang}}|llAgentInExperience]] {{LSL EXP}} {{LSL I}}<br />
<li> [[llAllowInventoryDrop{{#var:lang}}|llAllowInventoryDrop]]<br />
<li> [[llAngleBetween{{#var:lang}}|llAngleBetween]]<br />
<li> [[llApplyImpulse{{#var:lang}}|llApplyImpulse]]<br />
<li> [[llApplyRotationalImpulse{{#var:lang}}|llApplyRotationalImpulse]]<br />
<li> [[llAsin{{#var:lang}}|llAsin]]<br />
<li> [[llAtan2{{#var:lang}}|llAtan2]]<br />
<li> [[llAttachToAvatar{{#var:lang}}|llAttachToAvatar]]<br />
<li> [[llAttachToAvatarTemp{{#var:lang}}|llAttachToAvatarTemp]] {{LSL I}}<br />
<li> [[llAvatarOnLinkSitTarget{{#var:lang}}|llAvatarOnLinkSitTarget]] {{LSL I}}<br />
<li> [[llAvatarOnSitTarget{{#var:lang}}|llAvatarOnSitTarget]]<br />
<li> [[llAxes2Rot{{#var:lang}}|llAxes2Rot]]<br />
<li> [[llAxisAngle2Rot{{#var:lang}}|llAxisAngle2Rot]]<br />
<li> [[llBase64ToInteger{{#var:lang}}|llBase64ToInteger]]<br />
<li> [[llBase64ToString{{#var:lang}}|llBase64ToString]]<br />
<li> [[llBreakAllLinks{{#var:lang}}|llBreakAllLinks]]<br />
<li> [[llBreakLink{{#var:lang}}|llBreakLink]]<br />
<li> [[llCastRay{{#var:lang}}|llCastRay]] {{LSL I}}<br />
<li> [[llCeil{{#var:lang}}|llCeil]]<br />
<li> [[llChar{{#var:lang}}|llChar]] {{LSL I}}<br />
<li> [[llClearCameraParams{{#var:lang}}|llClearCameraParams]]<br />
<li> [[llClearLinkMedia{{#var:lang}}|llClearLinkMedia]] {{LSL I}}<br />
<li> [[llClearPrimMedia{{#var:lang}}|llClearPrimMedia]]<br />
<li> [[llCloseRemoteDataChannel{{#var:lang}}|llCloseRemoteDataChannel]]<br />
<li> <s>[[llCloud{{#var:lang}}|llCloud]]</s> {{LSL_D}}<br />
<li> [[llCollisionFilter{{#var:lang}}|llCollisionFilter]]<br />
<li> [[llCollisionSound{{#var:lang}}|llCollisionSound]]<br />
<li> [[llCollisionSprite{{#var:lang}}|llCollisionSprite]] {{LSL BR}}<br />
<li> [[llCos{{#var:lang}}|llCos]]<br />
<li> [[llCreateCharacter{{#var:lang}}|llCreateCharacter]] {{LSL I}}<br />
<li> [[llCreateKeyValue{{#var:lang}}|llCreateKeyValue]] {{LSL EXP}} {{LSL I}}<br />
<li> [[llCreateLink{{#var:lang}}|llCreateLink]]<br />
<li> [[llCSV2List{{#var:lang}}|llCSV2List]]<br />
<li> [[llDataSizeKeyValue{{#var:lang}}|llDataSizeKeyValue]] {{LSL EXP}} {{LSL I}}<br />
<li> [[llDeleteCharacter{{#var:lang}}|llDeleteCharacter]] {{LSL I}}<br />
<li> [[llDeleteKeyValue{{#var:lang}}|llDeleteKeyValue]] {{LSL EXP}} {{LSL I}}<br />
<li> [[llDeleteSubList{{#var:lang}}|llDeleteSubList]]<br />
<li> [[llDeleteSubString{{#var:lang}}|llDeleteSubString]]<br />
<li> [[llDetachFromAvatar{{#var:lang}}|llDetachFromAvatar]]<br />
<li> [[llDetectedGrab{{#var:lang}}|llDetectedGrab]]<br />
<li> [[llDetectedGroup{{#var:lang}}|llDetectedGroup]]<br />
<li> [[llDetectedKey{{#var:lang}}|llDetectedKey]]<br />
<li> [[llDetectedLinkNumber{{#var:lang}}|llDetectedLinkNumber]]<br />
<li> [[llDetectedName{{#var:lang}}|llDetectedName]]<br />
<li> [[llDetectedOwner{{#var:lang}}|llDetectedOwner]]<br />
<li> [[llDetectedPos{{#var:lang}}|llDetectedPos]]<br />
<li> [[llDetectedRot{{#var:lang}}|llDetectedRot]]<br />
<li> [[llDetectedTouchBinormal{{#var:lang}}|llDetectedTouchBinormal]]<br />
<li> [[llDetectedTouchFace{{#var:lang}}|llDetectedTouchFace]]<br />
<li> [[llDetectedTouchNormal{{#var:lang}}|llDetectedTouchNormal]]<br />
<li> [[llDetectedTouchPos{{#var:lang}}|llDetectedTouchPos]]<br />
<li> [[llDetectedTouchST{{#var:lang}}|llDetectedTouchST]]<br />
<li> [[llDetectedTouchUV{{#var:lang}}|llDetectedTouchUV]]<br />
<li> [[llDetectedType{{#var:lang}}|llDetectedType]]<br />
<li> [[llDetectedVel{{#var:lang}}|llDetectedVel]]<br />
<li> [[llDialog{{#var:lang}}|llDialog]]<br />
<li> [[llDie{{#var:lang}}|llDie]]<br />
<li> [[llDumpList2String{{#var:lang}}|llDumpList2String]]<br />
<li> [[llEdgeOfWorld{{#var:lang}}|llEdgeOfWorld]]<br />
<li> [[llEjectFromLand{{#var:lang}}|llEjectFromLand]]<br />
<li> [[llEmail{{#var:lang}}|llEmail]]<br />
<li> [[llEscapeURL{{#var:lang}}|llEscapeURL]]<br />
<li> [[llEuler2Rot{{#var:lang}}|llEuler2Rot]]<br />
<li> [[llEvade{{#var:lang}}|llEvade]] {{LSL I}}<br />
<li> [[llExecCharacterCmd{{#var:lang}}|llExecCharacterCmd]] {{LSL I}}<br />
<li> [[llFabs{{#var:lang}}|llFabs]]<br />
<li> [[llFleeFrom{{#var:lang}}|llFleeFrom]] {{LSL I}}<br />
<li> [[llFloor{{#var:lang}}|llFloor]]<br />
<li> [[llForceMouselook{{#var:lang}}|llForceMouselook]]<br />
<li> [[llFrand{{#var:lang}}|llFrand]]<br />
<li> [[llGenerateKey{{#var:lang}}|llGenerateKey]] {{LSL I}}<br />
<li> [[llGetAccel{{#var:lang}}|llGetAccel]]<br />
<li> [[llGetAgentInfo{{#var:lang}}|llGetAgentInfo]]<br />
<li> [[llGetAgentLanguage{{#var:lang}}|llGetAgentLanguage]]<br />
<li> [[llGetAgentList{{#var:lang}}|llGetAgentList]] {{LSL I}}<br />
<li> [[llGetAgentSize{{#var:lang}}|llGetAgentSize]]<br />
<li> [[llGetAlpha{{#var:lang}}|llGetAlpha]]<br />
<li> [[llGetAndResetTime{{#var:lang}}|llGetAndResetTime]]<br />
<li> [[llGetAnimation{{#var:lang}}|llGetAnimation]]<br />
<li> [[llGetAnimationList{{#var:lang}}|llGetAnimationList]]<br />
<li> [[llGetAnimationOverride{{#var:lang}}|llGetAnimationOverride]] {{LSL I}}<br />
<li> [[llGetAttached{{#var:lang}}|llGetAttached]]<br />
<li> [[llGetAttachedList{{#var:lang}}|llGetAttachedList]] {{LSL I}}<br />
<li> [[llGetBoundingBox{{#var:lang}}|llGetBoundingBox]]<br />
<li> [[llGetCameraPos{{#var:lang}}|llGetCameraPos]]<br />
<li> [[llGetCameraRot{{#var:lang}}|llGetCameraRot]]<br />
<li> [[llGetCenterOfMass{{#var:lang}}|llGetCenterOfMass]]<br />
<li> [[llGetClosestNavPoint{{#var:lang}}|llGetClosestNavPoint]] {{LSL I}}<br />
<li> [[llGetColor{{#var:lang}}|llGetColor]]<br />
<li> [[llGetCreator{{#var:lang}}|llGetCreator]]<br />
<li> [[llGetDate{{#var:lang}}|llGetDate]]<br />
<li> [[llGetDayLength{{#var:lang}}|llGetDayLength]] {{LSL I}}<br />
<li> [[llGetDayOffset{{#var:lang}}|llGetDayOffset]] {{LSL I}}<br />
<li> [[llGetDisplayName{{#var:lang}}|llGetDisplayName]]<br />
<li> [[llGetEnergy{{#var:lang}}|llGetEnergy]]<br />
<li> [[llGetEnv{{#var:lang}}|llGetEnv]] {{LSL UPD}}<br />
<li> [[llGetEnvironment{{#var:lang}}|llGetEnvironment]] {{LSL I}}<br />
<li> [[llGetExperienceDetails{{#var:lang}}|llGetExperienceDetails]] {{LSL EXP}} {{LSL I}}<br />
<li> [[llGetExperienceErrorMessage{{#var:lang}}|llGetExperienceErrorMessage]] {{LSL EXP}} {{LSL I}}<br />
<li> [[llGetForce{{#var:lang}}|llGetForce]]<br />
<li> [[llGetFreeMemory{{#var:lang}}|llGetFreeMemory]]<br />
<li> [[llGetFreeURLs{{#var:lang}}|llGetFreeURLs]]<br />
<li> [[llGetGeometricCenter{{#var:lang}}|llGetGeometricCenter]]<br />
<li> [[llGetGMTclock{{#var:lang}}|llGetGMTclock]]<br />
<li> [[llGetHTTPHeader{{#var:lang}}|llGetHTTPHeader]]<br />
<li> [[llGetInventoryAcquireTime{{#var:lang}}|llGetInventoryAcquireTime]] {{LSL I}}<br />
<li> [[llGetInventoryCreator{{#var:lang}}|llGetInventoryCreator]]<br />
<li> [[llGetInventoryKey{{#var:lang}}|llGetInventoryKey]]<br />
<li> [[llGetInventoryName{{#var:lang}}|llGetInventoryName]]<br />
<li> [[llGetInventoryNumber{{#var:lang}}|llGetInventoryNumber]]<br />
<li> [[llGetInventoryPermMask{{#var:lang}}|llGetInventoryPermMask]]<br />
<li> [[llGetInventoryType{{#var:lang}}|llGetInventoryType]]<br />
<li> [[llGetKey{{#var:lang}}|llGetKey]]<br />
<li> [[llGetLandOwnerAt{{#var:lang}}|llGetLandOwnerAt]]<br />
<li> [[llGetLinkKey{{#var:lang}}|llGetLinkKey]]<br />
<li> [[llGetLinkMedia{{#var:lang}}|llGetLinkMedia]] {{LSL I}}<br />
<li> [[llGetLinkName{{#var:lang}}|llGetLinkName]]<br />
<li> [[llGetLinkNumber{{#var:lang}}|llGetLinkNumber]]<br />
<li> [[llGetLinkNumberOfSides{{#var:lang}}|llGetLinkNumberOfSides]]<br />
<li> [[llGetLinkPrimitiveParams{{#var:lang}}|llGetLinkPrimitiveParams]]<br />
<li> [[llGetListEntryType{{#var:lang}}|llGetListEntryType]]<br />
<li> [[llGetListLength{{#var:lang}}|llGetListLength]]<br />
<li> [[llGetLocalPos{{#var:lang}}|llGetLocalPos]]<br />
<li> [[llGetLocalRot{{#var:lang}}|llGetLocalRot]]<br />
<li> [[llGetMass{{#var:lang}}|llGetMass]]<br />
<li> [[llGetMassMKS{{#var:lang}}|llGetMassMKS]] {{LSL I}}<br />
<li> [[llGetMaxScaleFactor{{#var:lang}}|llGetMaxScaleFactor]] {{LSL I}}<br />
<li> [[llGetMemoryLimit{{#var:lang}}|llGetMemoryLimit]] {{LSL I}}<br />
<li> [[llGetMinScaleFactor{{#var:lang}}|llGetMinScaleFactor]] {{LSL I}}<br />
<li> [[llGetMoonDirection{{#var:lang}}|llGetMoonDirection]] {{LSL I}}<br />
<li> [[llGetMoonRotation{{#var:lang}}|llGetMoonRotation]] {{LSL I}}<br />
<li> [[llGetNextEmail{{#var:lang}}|llGetNextEmail]]<br />
<li> [[llGetNotecardLine{{#var:lang}}|llGetNotecardLine]]<br />
<li> [[llGetNumberOfNotecardLines{{#var:lang}}|llGetNumberOfNotecardLines]]<br />
<li> [[llGetNumberOfPrims{{#var:lang}}|llGetNumberOfPrims]]<br />
<li> [[llGetNumberOfSides{{#var:lang}}|llGetNumberOfSides]]<br />
<li> [[llGetObjectAnimationNames{{#var:lang}}|llGetObjectAnimationNames]]<br />
<li> [[llGetObjectDesc{{#var:lang}}|llGetObjectDesc]]<br />
<li> [[llGetObjectDetails{{#var:lang}}|llGetObjectDetails]] {{LSL UPD}}<br />
<li> [[llGetLinkKey#llGetObjectLinkKey{{#var:lang}}|llGetObjectLinkKey]] {{LSL New}}<br />
<li> [[llGetObjectMass{{#var:lang}}|llGetObjectMass]]<br />
<li> [[llGetObjectName{{#var:lang}}|llGetObjectName]]<br />
<li> [[llGetObjectPermMask{{#var:lang}}|llGetObjectPermMask]]<br />
<li> [[llGetObjectPrimCount{{#var:lang}}|llGetObjectPrimCount]]<br />
<li> [[llGetOmega{{#var:lang}}|llGetOmega]]<br />
<li> [[llGetOwner{{#var:lang}}|llGetOwner]]<br />
<li> [[llGetOwnerKey{{#var:lang}}|llGetOwnerKey]]<br />
<li> [[llGetParcelDetails{{#var:lang}}|llGetParcelDetails]]<br />
<li> [[llGetParcelFlags{{#var:lang}}|llGetParcelFlags]]<br />
<li> [[llGetParcelMaxPrims{{#var:lang}}|llGetParcelMaxPrims]]<br />
<li> [[llGetParcelMusicURL{{#var:lang}}|llGetParcelMusicURL]] {{LSL I}}<br />
<li> [[llGetParcelPrimCount{{#var:lang}}|llGetParcelPrimCount]]<br />
<li> [[llGetParcelPrimOwners{{#var:lang}}|llGetParcelPrimOwners]]<br />
<li> [[llGetPermissions{{#var:lang}}|llGetPermissions]]<br />
<li> [[llGetPermissionsKey{{#var:lang}}|llGetPermissionsKey]]<br />
<li> [[llGetPhysicsMaterial{{#var:lang}}|llGetPhysicsMaterial]] {{LSL I}}<br />
<li> [[llGetPos{{#var:lang}}|llGetPos]]<br />
<li> [[llGetPrimitiveParams{{#var:lang}}|llGetPrimitiveParams]] <br />
<li> [[llGetPrimMediaParams{{#var:lang}}|llGetPrimMediaParams]]<br />
<li> [[llGetRegionAgentCount{{#var:lang}}|llGetRegionAgentCount]]<br />
<li> [[llGetRegionCorner{{#var:lang}}|llGetRegionCorner]]<br />
<li> [[llGetRegionDayLength{{#var:lang}}|llGetRegionDayLength]] {{LSL I}}<br />
<li> [[llGetRegionDayOffset{{#var:lang}}|llGetRegionDayOffset]] {{LSL I}}<br />
<li> [[llGetRegionFlags{{#var:lang}}|llGetRegionFlags]]<br />
<li> [[llGetRegionFPS{{#var:lang}}|llGetRegionFPS]]<br />
<li> [[llGetRegionMoonDirection{{#var:lang}}|llGetRegionMoonDirection]] {{LSL I}}<br />
<li> [[llGetRegionMoonRotation{{#var:lang}}|llGetRegionMoonRotation]] {{LSL I}}<br />
<li> [[llGetRegionName{{#var:lang}}|llGetRegionName]]<br />
<li> [[llGetRegionSunDirection{{#var:lang}}|llGetRegionSunDirection]] {{LSL I}}<br />
<li> [[llGetRegionSunRotation{{#var:lang}}|llGetRegionSunRotation]] {{LSL I}}<br />
<li> [[llGetRegionTimeDilation{{#var:lang}}|llGetRegionTimeDilation]]<br />
<li> [[llGetRootPosition{{#var:lang}}|llGetRootPosition]]<br />
<li> [[llGetRootRotation{{#var:lang}}|llGetRootRotation]]<br />
<li> [[llGetRot{{#var:lang}}|llGetRot]]<br />
<li> [[llGetScale{{#var:lang}}|llGetScale]]<br />
<li> [[llGetScriptName{{#var:lang}}|llGetScriptName]]<br />
<li> [[llGetScriptState{{#var:lang}}|llGetScriptState]]<br />
<li> [[llGetSimStats{{#var:lang}}|llGetSimStats]] {{LSL I}}<br />
<li> [[llGetSimulatorHostname{{#var:lang}}|llGetSimulatorHostname]]<br />
<li> [[llGetSPMaxMemory{{#var:lang}}|llGetSPMaxMemory]] {{LSL I}}<br />
<li> [[llGetStartParameter{{#var:lang}}|llGetStartParameter]]<br />
<li> [[llGetStaticPath{{#var:lang}}|llGetStaticPath]] {{LSL I}}<br />
<li> [[llGetStatus{{#var:lang}}|llGetStatus]]<br />
<li> [[llGetSubString{{#var:lang}}|llGetSubString]]<br />
<li> [[llGetSunDirection{{#var:lang}}|llGetSunDirection]] {{LSL I}}<br />
<li> [[llGetSunRotation{{#var:lang}}|llGetSunRotation]] {{LSL I}}<br />
<li> [[llGetTexture{{#var:lang}}|llGetTexture]]<br />
<li> [[llGetTextureOffset{{#var:lang}}|llGetTextureOffset]]<br />
<li> [[llGetTextureRot{{#var:lang}}|llGetTextureRot]]<br />
<li> [[llGetTextureScale{{#var:lang}}|llGetTextureScale]]<br />
<li> [[llGetTime{{#var:lang}}|llGetTime]]<br />
<li> [[llGetTimeOfDay{{#var:lang}}|llGetTimeOfDay]]<br />
<li> [[llGetTimestamp{{#var:lang}}|llGetTimestamp]]<br />
<li> [[llGetTorque{{#var:lang}}|llGetTorque]]<br />
<li> [[llGetUnixTime{{#var:lang}}|llGetUnixTime]]<br />
<li> [[llGetUsedMemory{{#var:lang}}|llGetUsedMemory]] {{LSL I}}<br />
<li> [[llGetUsername{{#var:lang}}|llGetUsername]]<br />
<li> [[llGetVel{{#var:lang}}|llGetVel]]<br />
<li> [[LlGetVisualParams{{#var:lang}}||LlGetVisualParams]] {{LSL I}}<br />
<li> [[llGetWallclock{{#var:lang}}|llGetWallclock]]<br />
<li> [[llGiveInventory{{#var:lang}}|llGiveInventory]]<br />
<li> [[llGiveInventoryList{{#var:lang}}|llGiveInventoryList]]<br />
<li> [[llGiveMoney{{#var:lang}}|llGiveMoney]]<br />
<li> <s>[[llGodLikeRezObject{{#var:lang}}|llGodLikeRezObject]]</s> {{LSL_GM}}<br />
<li> [[llGround{{#var:lang}}|llGround]]<br />
<li> [[llGroundContour{{#var:lang}}|llGroundContour]]<br />
<li> [[llGroundNormal{{#var:lang}}|llGroundNormal]]<br />
<li> [[llGroundRepel{{#var:lang}}|llGroundRepel]]<br />
<li> [[llGroundSlope{{#var:lang}}|llGroundSlope]]<br />
<li> [[llHash{{#var:lang}}|llHash]] {{LSL I}}<br />
<li> [[llHMAC{{#var:lang}}|llHMAC]] {{LSL I}} {{LSL New}}<br />
<li> [[llHTTPRequest{{#var:lang}}|llHTTPRequest]]<br />
<li> [[llHTTPResponse{{#var:lang}}|llHTTPResponse]]<br />
<li> [[llInsertString{{#var:lang}}|llInsertString]]<br />
<li> [[llInstantMessage{{#var:lang}}|llInstantMessage]]<br />
<li> [[llIntegerToBase64{{#var:lang}}|llIntegerToBase64]]<br />
<li> [[llJson2List{{#var:lang}}|llJson2List]] {{LSL I}}<br />
<li> [[llJsonGetValue{{#var:lang}}|llJsonGetValue]] {{LSL I}}<br />
<li> [[llJsonSetValue{{#var:lang}}|llJsonSetValue]] {{LSL I}}<br />
<li> [[llJsonValueType{{#var:lang}}|llJsonValueType]] {{LSL I}}<br />
<li> [[llKey2Name{{#var:lang}}|llKey2Name]] {{LSL I}}<br />
<li> [[llKeyCountKeyValue{{#var:lang}}|llKeyCountKeyValue]] {{LSL EXP}} {{LSL I}}<br />
<li> [[llKeysKeyValue{{#var:lang}}|llKeysKeyValue]] {{LSL EXP}} {{LSL I}}<br />
<li> [[llLinear2sRGB{{#var:lang}}|llLinear2sRGB]] {{LSL I}}<br />
<li> [[llLinkAdjustSoundVolume{{#var:lang}}|llLinkAdjustSoundVolume]] {{LSL I}} {{LSL New}}<br />
<li> [[llLinkParticleSystem{{#var:lang}}|llLinkParticleSystem]]<br />
<li> [[llLinkPlaySound{{#var:lang}}|llLinkPlaySound]] {{LSL I}} {{LSL New}}<br />
<li> [[LlLinksetDataAvailable{{#var:lang}}|LlLinksetDataAvailable]] {{LSL I}} {{LSL New}}<br />
<li> [[LlLinksetDataCountKeys{{#var:lang}}|LlLinksetDataCountKeys]] {{LSL I}} {{LSL New}}<br />
<li> [[LlLinksetDataDelete{{#var:lang}}|LlLinksetDataDelete]] {{LSL I}} {{LSL New}}<br />
<li> [[LlLinksetDataDeleteProtected{{#var:lang}}|LlLinksetDataDeleteProtected]] {{LSL I}} {{LSL New}}<br />
<li> [[LlLinksetDataFindKeys{{#var:lang}}|LlLinksetDataFindKeys]] {{LSL I}} {{LSL New}}<br />
<li> [[LlLinksetDataListKeys{{#var:lang}}|LlLinksetDataListKeys]] {{LSL I}} {{LSL New}}<br />
<li> [[LlLinksetDataRead{{#var:lang}}|LlLinksetDataRead]] {{LSL I}} {{LSL New}}<br />
<li> [[LlLinksetDataReadProtected{{#var:lang}}|LlLinksetDataReadProtected]] {{LSL I}} {{LSL New}}<br />
<li> [[LlLinksetDataReset{{#var:lang}}|LlLinksetDataReset]] {{LSL I}} {{LSL New}}<br />
<li> [[LlLinksetDataWrite{{#var:lang}}|LlLinksetDataWrite]] {{LSL I}} {{LSL New}}<br />
<li> [[LlLinksetDataWriteProtected{{#var:lang}}|LlLinksetDataWriteProtected]] {{LSL I}} {{LSL New}}<br />
<br />
<li> [[llLinkSetSoundQueueing{{#var:lang}}|llLinkSetSoundQueueing]] {{LSL I}} {{LSL New}}<br />
<li> [[llLinkSetSoundRadius{{#var:lang}}|llLinkSetSoundRadius]] {{LSL I}} {{LSL New}}<br />
<br />
<li> [[llLinkSitTarget{{#var:lang}}|llLinkSitTarget]] {{LSL I}}<br />
<li> [[llLinkStopSound{{#var:lang}}|llLinkStopSound]] {{LSL I}} {{LSL New}}<br />
<br />
<li> [[llList2CSV{{#var:lang}}|llList2CSV]]<br />
<li> [[llList2Float{{#var:lang}}|llList2Float]]<br />
<li> [[llList2Integer{{#var:lang}}|llList2Integer]]<br />
<li> [[llList2Json{{#var:lang}}|llList2Json]] {{LSL I}}<br />
<li> [[llList2Key{{#var:lang}}|llList2Key]]<br />
<li> [[llList2List{{#var:lang}}|llList2List]]<br />
<li> [[llList2ListStrided{{#var:lang}}|llList2ListStrided]]<br />
<li> [[llList2Rot{{#var:lang}}|llList2Rot]]<br />
<li> [[llList2String{{#var:lang}}|llList2String]]<br />
<li> [[llList2Vector{{#var:lang}}|llList2Vector]]<br />
<li> [[llListen{{#var:lang}}|llListen]]<br />
<li> [[llListenControl{{#var:lang}}|llListenControl]]<br />
<li> [[llListenRemove{{#var:lang}}|llListenRemove]]<br />
<li> [[llListFindList{{#var:lang}}|llListFindList]]<br />
<li> [[llListInsertList{{#var:lang}}|llListInsertList]]<br />
<li> [[llListRandomize{{#var:lang}}|llListRandomize]]<br />
<li> [[llListReplaceList{{#var:lang}}|llListReplaceList]]<br />
<li> [[llListSort{{#var:lang}}|llListSort]]<br />
<li> [[llListStatistics{{#var:lang}}|llListStatistics]]<br />
<li> [[llLoadURL{{#var:lang}}|llLoadURL]]<br />
<li> [[llLog{{#var:lang}}|llLog]]<br />
<li> [[llLog10{{#var:lang}}|llLog10]]<br />
<li> [[llLookAt{{#var:lang}}|llLookAt]]<br />
<li> [[llLoopSound{{#var:lang}}|llLoopSound]]<br />
<li> [[llLoopSoundMaster{{#var:lang}}|llLoopSoundMaster]]<br />
<li> [[llLoopSoundSlave{{#var:lang}}|llLoopSoundSlave]]<br />
<li> <s>[[llMakeExplosion{{#var:lang}}|llMakeExplosion]]</s> {{LSL_D}}<br />
<li> <s>[[llMakeFire{{#var:lang}}|llMakeFire]]</s> {{LSL_D}}<br />
<li> <s>[[llMakeFountain{{#var:lang}}|llMakeFountain]]</s> {{LSL_D}}<br />
<li> <s>[[llMakeSmoke{{#var:lang}}|llMakeSmoke]]</s> {{LSL_D}}<br />
<li> [[llManageEstateAccess{{#var:lang}}|llManageEstateAccess]] {{LSL I}}<br />
<li> [[llMapDestination{{#var:lang}}|llMapDestination]]<br />
<li> [[llMD5String{{#var:lang}}|llMD5String]]<br />
<li> [[llMessageLinked{{#var:lang}}|llMessageLinked]]<br />
<li> [[llMinEventDelay{{#var:lang}}|llMinEventDelay]]<br />
<li> [[llModifyLand{{#var:lang}}|llModifyLand]]<br />
<li> [[llModPow{{#var:lang}}|llModPow]]<br />
<li> [[llMoveToTarget{{#var:lang}}|llMoveToTarget]]<br />
<li> [[llName2Key{{#var:lang}}|llName2Key]] {{LSL I}}<br />
<li> [[llNavigateTo{{#var:lang}}|llNavigateTo]] <br />
<li> [[llOffsetTexture{{#var:lang}}|llOffsetTexture]]<br />
<li> <s>[[llOpenFloater{{#var:lang}}|llOpenFloater]]</s> {{LSL PXP}} {{LSL I}}<br />
<li> [[llOpenRemoteDataChannel{{#var:lang}}|llOpenRemoteDataChannel]]<br />
<li> [[llOrd{{#var:lang}}|llOrd]] {{LSL I}}<br />
<li> [[llOverMyLand{{#var:lang}}|llOverMyLand]]<br />
<li> [[llOwnerSay{{#var:lang}}|llOwnerSay]]<br />
<li> [[llParcelMediaCommandList{{#var:lang}}|llParcelMediaCommandList]]<br />
<li> [[llParcelMediaQuery{{#var:lang}}|llParcelMediaQuery]]<br />
<li> [[llParseString2List{{#var:lang}}|llParseString2List]]<br />
<li> [[llParseStringKeepNulls{{#var:lang}}|llParseStringKeepNulls]]<br />
<li> [[llParticleSystem{{#var:lang}}|llParticleSystem]]<br />
<li> [[llPassCollisions{{#var:lang}}|llPassCollisions]]<br />
<li> [[llPassTouches{{#var:lang}}|llPassTouches]]<br />
<li> [[llPatrolPoints{{#var:lang}}|llPatrolPoints]] {{LSL I}}<br />
<li> [[llPlaySound{{#var:lang}}|llPlaySound]]<br />
<li> [[llPlaySoundSlave{{#var:lang}}|llPlaySoundSlave]]<br />
<li> <s>[[llPointAt{{#var:lang}}|llPointAt]]</s> {{LSL_D}}<br />
<li> [[llPow{{#var:lang}}|llPow]]<br />
<li> [[llPreloadSound{{#var:lang}}|llPreloadSound]]<br />
<li> [[llPursue{{#var:lang}}|llPursue]] {{LSL I}}<br />
<li> [[llPushObject{{#var:lang}}|llPushObject]]<br />
<li> [[llReadKeyValue{{#var:lang}}|llReadKeyValue]] {{LSL EXP}} {{LSL I}}<br />
<li> <s>[[llRefreshPrimURL{{#var:lang}}|llRefreshPrimURL]]</s> {{LSL_D}}<br />
<li> [[llRegionSay{{#var:lang}}|llRegionSay]]<br />
<li> [[llRegionSayTo{{#var:lang}}|llRegionSayTo]]<br />
<li> <s>[[llReleaseCamera{{#var:lang}}|llReleaseCamera]]</s> {{LSL_D}}<br />
<li> [[llReleaseControls{{#var:lang}}|llReleaseControls]]<br />
<li> [[llReleaseURL{{#var:lang}}|llReleaseURL]]<br />
<li> [[llRemoteDataReply{{#var:lang}}|llRemoteDataReply]]<br />
<li> <s>[[llRemoteDataSetRegion{{#var:lang}}|llRemoteDataSetRegion]]</s> {{LSL_D}}<br />
<li> <s>[[llRemoteLoadScript{{#var:lang}}|llRemoteLoadScript]]</s> {{LSL_D}}<br />
<li> [[llRemoteLoadScriptPin{{#var:lang}}|llRemoteLoadScriptPin]]<br />
<li> [[llRemoveFromLandBanList{{#var:lang}}|llRemoveFromLandBanList]]<br />
<li> [[llRemoveFromLandPassList{{#var:lang}}|llRemoveFromLandPassList]]<br />
<li> [[llRemoveInventory{{#var:lang}}|llRemoveInventory]]<br />
<li> [[llRemoveVehicleFlags{{#var:lang}}|llRemoveVehicleFlags]]<br />
<li> [[llReplaceAgentEnvironment{{#var:lang}}|llReplaceAgentEnvironment]] {{LSL I}}<br />
<li> [[llReplaceEnvironment{{#var:lang}}|llReplaceEnvironment]] {{LSL New}} {{LSL I}}<br />
<li> [[llReplaceSubString{{#var:lang}}|llReplaceSubString]] {{LSL New}} {{LSL I}}<br />
<li> [[llRequestAgentData{{#var:lang}}|llRequestAgentData]]<br />
<li> [[llRequestDisplayName{{#var:lang}}|llRequestDisplayName]]<br />
<li> [[llRequestExperiencePermissions{{#var:lang}}|llRequestExperiencePermissions]] {{LSL EXP}} {{LSL I}}<br />
<li> [[llRequestInventoryData{{#var:lang}}|llRequestInventoryData]]<br />
<li> [[llRequestPermissions{{#var:lang}}|llRequestPermissions]]<br />
<li> [[llRequestSecureURL{{#var:lang}}|llRequestSecureURL]]<br />
<li> [[llRequestSimulatorData{{#var:lang}}|llRequestSimulatorData]]<br />
<li> [[llRequestURL{{#var:lang}}|llRequestURL]]<br />
<li> [[llRequestUserKey{{#var:lang}}|llRequestUserKey]] {{LSL I}}<br />
<li> [[llRequestUsername{{#var:lang}}|llRequestUsername]]<br />
<li> [[llResetAnimationOverride{{#var:lang}}|llResetAnimationOverride]] {{LSL I}}<br />
<li> [[llResetLandBanList{{#var:lang}}|llResetLandBanList]]<br />
<li> [[llResetLandPassList{{#var:lang}}|llResetLandPassList]]<br />
<li> [[llResetOtherScript{{#var:lang}}|llResetOtherScript]]<br />
<li> [[llResetScript{{#var:lang}}|llResetScript]]<br />
<li> [[llResetTime{{#var:lang}}|llResetTime]]<br />
<li> [[llReturnObjectsByID{{#var:lang}}|llReturnObjectsByID]] {{LSL I}}<br />
<li> [[llReturnObjectsByOwner{{#var:lang}}|llReturnObjectsByOwner]] {{LSL I}}<br />
<li> [[llRezAtRoot{{#var:lang}}|llRezAtRoot]]<br />
<li> [[llRezObject{{#var:lang}}|llRezObject]]<br />
<li> [[llRot2Angle{{#var:lang}}|llRot2Angle]]<br />
<li> [[llRot2Axis{{#var:lang}}|llRot2Axis]]<br />
<li> [[llRot2Euler{{#var:lang}}|llRot2Euler]]<br />
<li> [[llRot2Fwd{{#var:lang}}|llRot2Fwd]]<br />
<li> [[llRot2Left{{#var:lang}}|llRot2Left]]<br />
<li> [[llRot2Up{{#var:lang}}|llRot2Up]]<br />
<li> [[llRotateTexture{{#var:lang}}|llRotateTexture]]<br />
<li> [[llRotBetween{{#var:lang}}|llRotBetween]]<br />
<li> [[llRotLookAt{{#var:lang}}|llRotLookAt]]<br />
<li> [[llRotTarget{{#var:lang}}|llRotTarget]]<br />
<li> [[llRotTargetRemove{{#var:lang}}|llRotTargetRemove]]<br />
<li> [[llRound{{#var:lang}}|llRound]]<br />
<li> [[llSameGroup{{#var:lang}}|llSameGroup]]<br />
<li> [[llSay{{#var:lang}}|llSay]]<br />
<li> [[llScaleByFactor{{#var:lang}}|llScaleByFactor]] {{LSL I}}<br />
<li> [[llScaleTexture{{#var:lang}}|llScaleTexture]]<br />
<li> [[llScriptDanger{{#var:lang}}|llScriptDanger]]<br />
<li> [[llScriptProfiler{{#var:lang}}|llScriptProfiler]] {{LSL I}}<br />
<li> [[llSendRemoteData{{#var:lang}}|llSendRemoteData]]<br />
<li> [[llSensor{{#var:lang}}|llSensor]]<br />
<li> [[llSensorRemove{{#var:lang}}|llSensorRemove]]<br />
<li> [[llSensorRepeat{{#var:lang}}|llSensorRepeat]]<br />
<li> [[llSetAgentEnvironment{{#var:lang}}|llSetAgentEnvironment]] {{LSL I}}<br />
<li> [[llSetAlpha{{#var:lang}}|llSetAlpha]]<br />
<li> [[llSetAngularVelocity{{#var:lang}}|llSetAngularVelocity]] {{LSL I}}<br />
<li> [[llSetAnimationOverride{{#var:lang}}|llSetAnimationOverride]] {{LSL I}}<br />
<li> [[llSetBuoyancy{{#var:lang}}|llSetBuoyancy]]<br />
<li> [[llSetCameraAtOffset{{#var:lang}}|llSetCameraAtOffset]]<br />
<li> [[llSetCameraEyeOffset{{#var:lang}}|llSetCameraEyeOffset]]<br />
<li> [[llSetCameraParams{{#var:lang}}|llSetCameraParams]]<br />
<li> [[llSetClickAction{{#var:lang}}|llSetClickAction]]<br />
<li> [[llSetColor{{#var:lang}}|llSetColor]]<br />
<li> [[llSetContentType{{#var:lang}}|llSetContentType]] {{LSL I}}<br />
<li> [[llSetDamage{{#var:lang}}|llSetDamage]]<br />
<li> [[llSetEnvironment{{#var:lang}}|llSetEnvironment]] {{LSL New}} {{LSL I}}<br />
<li> [[llSetForce{{#var:lang}}|llSetForce]]<br />
<li> [[llSetForceAndTorque{{#var:lang}}|llSetForceAndTorque]]<br />
<li> [[llSetHoverHeight{{#var:lang}}|llSetHoverHeight]]<br />
<li> <s>[[llSetInventoryPermMask{{#var:lang}}|llSetInventoryPermMask]]</s> {{LSL_GM}}<br />
<li> [[llSetKeyframedMotion{{#var:lang}}|llSetKeyframedMotion]] {{LSL I}}<br />
<li> [[llSetLinkAlpha{{#var:lang}}|llSetLinkAlpha]]<br />
<li> [[llSetLinkCamera{{#var:lang}}|llSetLinkCamera]] {{LSL I}}<br />
<li> [[llSetLinkColor{{#var:lang}}|llSetLinkColor]]<br />
<li> [[llSetLinkMedia{{#var:lang}}|llSetLinkMedia]] {{LSL I}}<br />
<li> [[llSetLinkPrimitiveParams{{#var:lang}}|llSetLinkPrimitiveParams]] <br />
<li> [[llSetLinkPrimitiveParamsFast{{#var:lang}}|llSetLinkPrimitiveParamsFast]] <br />
<li> [[llSetLinkTexture{{#var:lang}}|llSetLinkTexture]]<br />
<li> [[llSetLinkTextureAnim{{#var:lang}}|llSetLinkTextureAnim]]<br />
<li> [[llSetLocalRot{{#var:lang}}|llSetLocalRot]]<br />
<li> [[llSetMemoryLimit{{#var:lang}}|llSetMemoryLimit]] {{LSL I}}<br />
<li> [[llSetObjectDesc{{#var:lang}}|llSetObjectDesc]]<br />
<li> [[llSetObjectName{{#var:lang}}|llSetObjectName]]<br />
<li> <s>[[llSetObjectPermMask{{#var:lang}}|llSetObjectPermMask]]</s> {{LSL_GM}}<br />
<li> [[llSetParcelMusicURL{{#var:lang}}|llSetParcelMusicURL]]<br />
<li> [[llSetPayPrice{{#var:lang}}|llSetPayPrice]]<br />
<li> [[llSetPhysicsMaterial{{#var:lang}}|llSetPhysicsMaterial]] {{LSL I}}<br />
<li> [[llSetPos{{#var:lang}}|llSetPos]]<br />
<li> [[llSetPrimitiveParams{{#var:lang}}|llSetPrimitiveParams]] <br />
<li> [[llSetPrimMediaParams{{#var:lang}}|llSetPrimMediaParams]]<br />
<li> <s>[[llSetPrimURL{{#var:lang}}|llSetPrimURL]]</s> {{LSL_D}}<br />
<li> [[llSetRegionPos{{#var:lang}}|llSetRegionPos]] {{LSL I}}<br />
<li> [[llSetRemoteScriptAccessPin{{#var:lang}}|llSetRemoteScriptAccessPin]]<br />
<li> [[llSetRot{{#var:lang}}|llSetRot]]<br />
<li> [[llSetScale{{#var:lang}}|llSetScale]]<br />
<li> [[llSetScriptState{{#var:lang}}|llSetScriptState]]<br />
<li> [[llSetSitText{{#var:lang}}|llSetSitText]]<br />
<li> [[llSetSoundQueueing{{#var:lang}}|llSetSoundQueueing]]<br />
<li> [[llSetSoundRadius{{#var:lang}}|llSetSoundRadius]]<br />
<li> [[llSetStatus{{#var:lang}}|llSetStatus]]<br />
<li> [[llSetText{{#var:lang}}|llSetText]]<br />
<li> [[llSetTexture{{#var:lang}}|llSetTexture]]<br />
<li> [[llSetTextureAnim{{#var:lang}}|llSetTextureAnim]]<br />
<li> [[llSetTimerEvent{{#var:lang}}|llSetTimerEvent]]<br />
<li> [[llSetTorque{{#var:lang}}|llSetTorque]]<br />
<li> [[llSetTouchText{{#var:lang}}|llSetTouchText]]<br />
<li> [[llSetVehicleFlags{{#var:lang}}|llSetVehicleFlags]]<br />
<li> [[llSetVehicleFloatParam{{#var:lang}}|llSetVehicleFloatParam]]<br />
<li> [[llSetVehicleRotationParam{{#var:lang}}|llSetVehicleRotationParam]]<br />
<li> [[llSetVehicleType{{#var:lang}}|llSetVehicleType]]<br />
<li> [[llSetVehicleVectorParam{{#var:lang}}|llSetVehicleVectorParam]]<br />
<li> [[llSetVelocity{{#var:lang}}|llSetVelocity]] {{LSL I}}<br />
<li> [[llSHA1String{{#var:lang}}|llSHA1String]]<br />
<li> [[llSHA256String{{#var:lang}}|llSHA256String]] {{LSL I}} {{LSL New}}<br />
<li> [[llShout{{#var:lang}}|llShout]]<br />
<li> [[llSignRSA{{#var:lang}}|llSignRSA]] {{LSL I}} {{LSL New}}<br />
<li> [[llSin{{#var:lang}}|llSin]]<br />
<li> [[llSitOnLink{{#var:lang}}|llSitOnLink]]<br />
<li> [[llSitTarget{{#var:lang}}|llSitTarget]]<br />
<li> [[llSleep{{#var:lang}}|llSleep]]<br />
<li> <s>[[llSound{{#var:lang}}|llSound]]</s> {{LSL_D}}<br />
<li> <s>[[llSoundPreload{{#var:lang}}|llSoundPreload]]</s> {{LSL_D}}<br />
<li> [[llSqrt{{#var:lang}}|llSqrt]]<br />
<li> [[llsRGB2Linear{{#var:lang}}|llsRGB2Linear]] {{LSL I}}<br />
<li> [[llStartAnimation{{#var:lang}}|llStartAnimation]]<br />
<li> [[llStartObjectAnimation{{#var:lang}}|llStartObjectAnimation]]<br />
<li> [[llStopAnimation{{#var:lang}}|llStopAnimation]]<br />
<li> [[llStopObjectAnimation{{#var:lang}}|llStopObjectAnimation]]<br />
<li> [[llStopHover{{#var:lang}}|llStopHover]]<br />
<li> [[llStopLookAt{{#var:lang}}|llStopLookAt]]<br />
<li> [[llStopMoveToTarget{{#var:lang}}|llStopMoveToTarget]]<br />
<li> <s>[[llStopPointAt{{#var:lang}}|llStopPointAt]]</s> {{LSL_D}}<br />
<li> [[llStopSound{{#var:lang}}|llStopSound]]<br />
<li> [[llStringLength{{#var:lang}}|llStringLength]]<br />
<li> [[llStringToBase64{{#var:lang}}|llStringToBase64]]<br />
<li> [[llStringTrim{{#var:lang}}|llStringTrim]]<br />
<li> [[llSubStringIndex{{#var:lang}}|llSubStringIndex]]<br />
<li> <s>[[llTakeCamera{{#var:lang}}|llTakeCamera]]</s> {{LSL_D}}<br />
<li> [[llTakeControls{{#var:lang}}|llTakeControls]]<br />
<li> [[llTan{{#var:lang}}|llTan]]<br />
<li> [[llTarget{{#var:lang}}|llTarget]]<br />
<li> [[llTargetedEmail{{#var:lang}}|llTargetedEmail]] {{LSL I}}<br />
<li> [[llTargetOmega{{#var:lang}}|llTargetOmega]]<br />
<li> [[llTargetRemove{{#var:lang}}|llTargetRemove]]<br />
<li> [[llTeleportAgent{{#var:lang}}|llTeleportAgent]] {{LSL I}}<br />
<li> [[llTeleportAgentGlobalCoords{{#var:lang}}|llTeleportAgentGlobalCoords]] {{LSL I}}<br />
<li> [[llTeleportAgentHome{{#var:lang}}|llTeleportAgentHome]]<br />
<li> [[llTextBox{{#var:lang}}|llTextBox]]<br />
<li> [[llToLower{{#var:lang}}|llToLower]]<br />
<li> [[llToUpper{{#var:lang}}|llToUpper]]<br />
<li> [[llTransferLindenDollars{{#var:lang}}|llTransferLindenDollars]] {{LSL I}}<br />
<li> [[llTriggerSound{{#var:lang}}|llTriggerSound]]<br />
<li> [[llTriggerSoundLimited{{#var:lang}}|llTriggerSoundLimited]]<br />
<li> [[llUnescapeURL{{#var:lang}}|llUnescapeURL]]<br />
<li> [[llUnSit{{#var:lang}}|llUnSit]]<br />
<li> [[llUpdateCharacter{{#var:lang}}|llUpdateCharacter]] {{LSL I}}<br />
<li> [[llUpdateKeyValue{{#var:lang}}|llUpdateKeyValue]] {{LSL EXP}} {{LSL I}}<br />
<li> [[llVecDist{{#var:lang}}|llVecDist]]<br />
<li> [[llVecMag{{#var:lang}}|llVecMag]]<br />
<li> [[llVecNorm{{#var:lang}}|llVecNorm]]<br />
<li> [[llVerifyRSA{{#var:lang}}|llVerifyRSA]] {{LSL I}} {{LSL New}}<br />
<li> [[llVolumeDetect{{#var:lang}}|llVolumeDetect]]<br />
<li> [[llWanderWithin{{#var:lang}}|llWanderWithin]] {{LSL I}}<br />
<li> [[llWater{{#var:lang}}|llWater]]<br />
<li> [[llWhisper{{#var:lang}}|llWhisper]]<br />
<li> [[llWind{{#var:lang}}|llWind]]<br />
<li> [[llXorBase64{{#var:lang}}|llXorBase64]] {{LSL I}}<br />
<li> <s>[[llXorBase64Strings{{#var:lang}}|llXorBase64Strings]]</s> {{LSL_D}}<br />
<li> <s>[[llXorBase64StringsCorrect{{#var:lang}}|llXorBase64StringsCorrect]]</s> {{LSL_D}}<br />
<br />
</ul> {{LSL_All_Functions/Generate}}</div>Draconis Neurocamhttps://wiki.secondlife.com/w/index.php?title=LlVecDist&diff=1210534LlVecDist2022-03-23T03:41:57Z<p>Draconis Neurocam: Updated a link to a video to actually provide the link rather than formatting that is broken.</p>
<hr />
<div>{{LSL_Function<br />
|func=llVecDist|sort=VecDist<br />
|func_id=14|func_sleep=0.0|func_energy=10.0<br />
|func_footnote<br />
|p1_type=vector|p1_name=vec_a|p1_desc=Any valid vector<br />
|p2_type=vector|p2_name=vec_b|p2_desc=Any valid vector<br />
|return_type=float<br />
|return_text=that is the undirected nonnegative distance between {{LSLP|vec_a}} and {{LSLP|vec_b}}.<br />
|spec<br />
|caveats<br />
|constants<br />
|examples=<br />
<source lang="lsl2"><br />
default {<br />
state_entry()<br />
{<br />
vector input_1 = <1.0,2.0,3.0>;<br />
vector input_2 = <3.0,2.0,1.0>;<br />
llOwnerSay("The distance between " + (string) input_1 +<br />
" and " + (string) input_2 + " is: "+(string)llVecDist(input_1, input_2) );<br />
}<br />
}<br />
</source><br />
<source lang="lsl2"><br />
//To reset script on touch if the object has been rotated since the last script reset<br />
float gTolerance = 0.05; //This corresponds to about a 3 degree rotation<br />
default<br />
{<br />
state_entry()<br />
{<br />
llSetObjectDesc((string)llRot2Euler(llGetRot()));<br />
}<br />
<br />
touch_start(integer total_number)<br />
{<br />
if (llVecDist(llRot2Euler(llGetRot()), (vector)llGetObjectDesc()) > gTolerance)<br />
{<br />
llSay(0,"This object has rotated. Automatic reset engaged.");<br />
llResetScript();<br />
}<br />
}<br />
}</source><br />
===Video Tutorial===<br />
https://www.youtube.com/watch?v=D0WvH58IWEo<br />
|helpers<br />
|also_functions={{LSL DefineRow||[[llVecMag]]|}}<br />
{{LSL DefineRow||[[llVecNorm]]|}}<br />
|also_events<br />
|also_tests<br />
|also_articles<br />
|notes=<br />
* Mathematically equivalent to:<br />
** [[llVecMag]]( vec_a - vec_b )<br />
** [[llSqrt]]( (vec_b.x - vec_a.x) * (vec_b.x - vec_a.x) + (vec_b.y - vec_a.y) * (vec_b.y - vec_a.y) + (vec_b.z - vec_a.z) * (vec_b.z - vec_a.z) )<br />
* Knowing this, there are ways to circumvent llVecDist for more efficient code.<br />
** For example, vector v3 = (v1-v2); v3*v3 < (f*f); is over twice as fast as llVecDist(v1,v2) < f;<br />
|cat1=Math/3D<br />
|cat2=Vector<br />
|haiku={{Haiku|Squirrel on a wire,|Skips from pole to distant pole.|One leap at a time.}}<br />
|cat3<br />
|cat4<br />
}}</div>Draconis Neurocamhttps://wiki.secondlife.com/w/index.php?title=LlRot2Angle&diff=1210533LlRot2Angle2022-03-22T22:44:18Z<p>Draconis Neurocam: Updated Table width so the reference implementation is readable.</p>
<hr />
<div>{{LSL_Function<br />
|func_id=171|func_sleep=0.0|func_energy=10.0<br />
|func=llRot2Angle|sort=Rot2Angle<br />
|return_type=float|p1_type=rotation|p1_name=rot<br />
|func_footnote=Use in conjunction with [[llRot2Axis]].<br/>To undo use [[llAxisAngle2Rot]].<br />
|func_desc<br />
|return_text=that is the rotation angle represented by '''rot'''<br />
|spec<br />
|caveats=This always returns a positive angle <= PI radians, that is, it is the unsigned minimum angle. A rotation of 3/2 PI radians (270 degrees) will return an angle of PI / 2 radians, not -PI / 2.<br />
|constants<br />
|examples<br />
|helpers<br />
|also_functions=<br />
{{LSL DefineRow||[[llAxisAngle2Rot]]}}<br />
{{LSL DefineRow||[[llRot2Axis]]}}<br />
{{LSL DefineRow||[[llRot2Up]]}}<br />
{{LSL DefineRow||[[llRot2Fwd]]}}<br />
{{LSL DefineRow||[[llRot2Left]]}}<br />
{{LSL DefineRow||[[llAngleBetween]]|Similar functionality.}}<br />
|also_tests<br />
|also_events<br />
|also_articles<br />
|notes<br />
|cat1=Rotation<br />
|cat2<br />
|cat3<br />
|cat4<br />
|deepnotes= ===Reference Implementation===<br />
<table width=800><tr><td><br />
<source lang="lsl2">float Rot2Angle(rotation a)//simple but turns out to not be very accurate.<br />
{ <br />
return 2.0 * llAcos(llSqrt((a.s * a.s) / (a.x * a.x + a.y * a.y + a.z * a.z + a.s * a.s));<br />
}</source><br />
<br />
<source lang="lsl2">float Rot2Angle(rotation r)//more complex implementation but more accurate, and reasonably fast.<br />
{<br />
float s2 = r.s * r.s; // square of the s-element<br />
float v2 = r.x * r.x + r.y * r.y + r.z * r.z; // sum of the squares of the v-elements<br />
<br />
if (s2 < v2) // compare the s-component to the v-component<br />
return 2.0 * llAcos(llSqrt(s2 / (s2 + v2))); // use arccos if the v-component is dominant<br />
if (v2) // make sure the v-component is non-zero<br />
return 2.0 * llAsin(llSqrt(v2 / (s2 + v2))); // use arcsin if the s-component is dominant<br />
<br />
return 0.0; // argument is scaled too small to be meaningful, or it is a zero rotation, so return zero<br />
}//Written by Moon Metty & Miranda Umino. Minor optimizations by Strife Onizuka</source><br />
</td></tr></table><br />
}}</div>Draconis Neurocamhttps://wiki.secondlife.com/w/index.php?title=LlAtan2/Compass_QA&diff=1210532LlAtan2/Compass QA2022-03-22T20:56:01Z<p>Draconis Neurocam: Updating the syntax highlighting for this page.</p>
<hr />
<div><source lang="lsl2"><br />
default<br />
{<br />
state_entry()<br />
{<br />
vector p = llGetPos();<br />
integer a = 0;<br />
integer b = 72;<br />
float c = -TWO_PI / b;<br />
float d = 360.0 / b;<br />
while(a <= b)<br />
{<br />
vector target = (<0,1,0> * llEuler2Rot(<0, 0, c * a>));<br />
llOwnerSay(llDumpList2String([((integer)(d * a))] + compass(p + target), " "));<br />
a++;<br />
}<br />
}<br />
}<br />
</source></div>Draconis Neurocamhttps://wiki.secondlife.com/w/index.php?title=User:Draconis_Neurocam&diff=1210531User:Draconis Neurocam2022-03-22T16:38:35Z<p>Draconis Neurocam: </p>
<hr />
<div>Salutations, I am Draconis Neurocam.<br />
<br />
My goal is to make things better to the best of my ability.<br />
<br />
This place is something I dreamed would exist as a child, and now since it does, I love being a part of it.<br />
<br />
What most people never actually realize is how powerful what we have at our fingertips is.<br />
<br />
I take this as an extension of real life, and not something separate.<br />
----<br />
[http://twitter.com/drac_neurocam @drac_neurocam]<br />
<source lang="lsl2"><br />
//Written by Nomad Padar one of the most genius people I have ever known<br />
vector int2vec(integer n) {<br />
//0zyx ZZZZ ZZZZ ZZZZ YYYY YYYY XXXX XXXX<br />
return <n&0xFF, (n>>8)&0xFF, ((n>>16)&0xFF)> + <((n&0x10000000)!=0)*.5,((n&0x20000000)!=0)*.5,((n&0x40000000)!=0)*.5>;<br />
}<br />
integer vec2int(vector v) {<br />
integer x = (integer)(v.x);<br />
integer y = (integer)(v.y);<br />
integer z = (integer)(v.z);<br />
integer out;<br />
<br />
//Rounds to 0, .5, or 1.0<br />
float delta = v.x-x;<br />
if((delta>.25) && (delta<.75)) out += 0x10000000;<br />
else if(delta>.75) out += 0x1;<br />
delta = v.y-y;<br />
if((delta>.25) && (delta<.75)) out += 0x20000000;<br />
else if(delta>.75) out += 0x100;<br />
delta = v.z-z;<br />
if((delta>.25) && (delta<.75)) out += 0x40000000;<br />
else if(delta>.75) out += 0x10000;<br />
out += x+(y<<8)+(z<<16);<br />
return out;<br />
}<br />
default<br />
{<br />
touch_start(integer total_number)<br />
{<br />
integer param = vec2int(llGetPos());<br />
llSay(0, (string)param);<br />
llSay(0, (string)int2vec(param));<br />
}<br />
}<br />
<br />
</source><br />
<br />
<source lang="lsl2"><br />
SetLinkPosLocal2Root(integer linknum,vector offset)<br />
{<br />
llSetLinkPrimitiveParamsFast(linknum, [PRIM_POSITION, (llList2Vector(llGetLinkPrimitiveParams(linknum, [PRIM_POS_LOCAL]),0))+offset]);<br />
}<br />
</source><br />
<br />
<source lang="lsl2"><br />
<value,maxvalue - value,0> / maxvalue<br />
<br />
<1.0-health,health*health,0.0><br />
</source><br />
<br />
<source lang="lsl2"><br />
llGetPos() + <1,0,0>*llGetRot()<br />
</source><br />
<br />
<source lang="lsl2"><br />
list ray(vector s, vector e)<br />
{<br />
return llCastRay(s,e,<br />
[<br />
RC_REJECT_TYPES,<br />
0<br />
//RC_REJECT_AGENTS<br />
//|RC_REJECT_PHYSICAL<br />
//|RC_REJECT_NONPHYSICAL<br />
//|RC_REJECT_LAND<br />
,<br />
RC_DATA_FLAGS,<br />
0<br />
//RC_GET_NORMAL<br />
//|RC_GET_ROOT_KEY<br />
//|RC_GET_LINK_NUM<br />
,<br />
RC_MAX_HITS, 1,<br />
RC_DETECT_PHANTOM,FALSE <br />
]);<br />
}<br />
</source><br />
<source lang="lsl2"><br />
//forwards loop through n<br />
(i=(i+1)%n)<br />
//backwards loop through n<br />
(i=(n+i-1)%n)<br />
</source><br />
{{skills<br />
|Architect=*<br />
|Builder=*<br />
|Machinima=<br />
|Scenographer=<br />
|Scripter=*<br />
|SLogistician=*<br />
|Terraformer=<br />
|}}<br />
{{Tweeter}}<br />
{{ISO 639-3/cat-speaking|eng}}</div>Draconis Neurocamhttps://wiki.secondlife.com/w/index.php?title=Talk:LlSitTarget&diff=1204254Talk:LlSitTarget2016-07-31T08:01:57Z<p>Draconis Neurocam: Fixed all the LSL on the page</p>
<hr />
<div>== Unsitting on wrong side or camera rotation ==<br />
<br />
Hi, i am getting frustrated with this. I create a board and set the sit target with<br />
<code>llSitTarget(<0.4, 0.0, 0.0>, ZERO_ROTATION);</code><br />
and an animation which for "standing". So while the person technical sits, she stands in front of the board. <br />
But I have a problem with that: If the board stand freely, the person unsits right through it towards the other side. I can put the board with the back facing a large wall. In the case the unsitting is correctly in front of it. But on sit down the camera rotates, so that it is behind the avatar again; on the other side of the wall.<br />
<br />
If anyone has an idea how to fix, please tell me (even if it is just an idea where to look for more information). --[[User:Maike Short|Maike Short]] 12:41, 24 February 2008 (PST)<br />
<br />
:You could position the camera with the {{LSLGC|Camera}} functions. -- [[User:Strife Onizuka|Strife Onizuka]] 04:46, 25 February 2008 (PST)<br />
<br />
==GetSitTarget==<br />
<br />
<source lang="lsl2"><br />
list GetSitTarget(integer prim, key av)<br />
{//WARNING: llGetObjectDetails can introduce an error that goes as far as the 5th decimal place.<br />
vector tp = llGetAgentSize(av);<br />
if(tp)<br />
{<br />
if(prim == LINK_THIS)//llGetLinkKey doesn't like LINK_THIS<br />
prim = llGetLinkNumber();<br />
<br />
list details = OBJECT_POS + (list)OBJECT_ROT;<br />
rotation f = llList2Rot(details = (llGetObjectDetails(llGetLinkKey(prim), details) + llGetObjectDetails(av, details)), 1);<br />
<br />
return [(llRot2Up(f = (llList2Rot(details, 3) / f)) * tp.z * 0.02638) +<br />
((llList2Vector(details, 2) - llList2Vector(details, 0)) / f) - <0.0, 0.0, 0.4>, f];<br />
}<br />
return [];<br />
}//Written by Strife Onizuka<br />
</source><br />
Hi Strife! This version of your GetSitTarget, and the other version on the actual LlSitTarget page, both always return <0.000000, 0.000000, 0.707107, 0.707107> for the rotation. --[[User:MartinRJ Fayray|MartinRJ Fayray]] 07:52, 21 January 2013 (PST)<br />
<br />
:I haven't touched this in 5 years but I don't see a reason why it should be doing what you say. Are you sure you are using it properly? The prim parameter specifies what prim the location will be local to. The function was written to aid in determining sit targets when making furniture. You have the avatar sit on one object and then you get it's position local to the furniture so you can program in the sit target.<br />
<br />
:Just to clarify, you are saying that when you sit on an object with the following script in it, you don't get approximately the specified value? -- '''[[User:Strife_Onizuka|Strife]]''' <sup><small>([[User talk:Strife_Onizuka|talk]]|[[Special:Contributions/Strife_Onizuka|contribs]])</small></sup> 20:37, 22 January 2013 (PST)<br />
<br />
:It seems to work now. No idea what I was doing wrong. Thank you strife!--[[User:MartinRJ Fayray|MartinRJ Fayray]] 07:36, 3 February 2013 (PST)<br />
<br />
<source lang="lsl2"><br />
vector vOffset = <0,0,1>;<br />
rotation rOffset = <0,0,0,1>;<br />
<br />
list GetSitTarget(integer prim, key av)<br />
{//WARNING: llGetObjectDetails can introduce an error that goes as far as the 5th decimal place!<br />
//This is highly unlikely to be ever noticed unless compounded over time.<br />
//Do not use while moving (like in a moving vehicle)!!!<br />
vector tp = llGetAgentSize(av);<br />
if(tp)<br />
{<br />
if(prim == LINK_THIS)//llGetLinkKey doesn't like LINK_THIS<br />
prim = llGetLinkNumber();<br />
<br />
list details = [OBJECT_POS, OBJECT_ROT];<br />
rotation f = llList2Rot(details = (llGetObjectDetails(llGetLinkKey(prim), details) + llGetObjectDetails(av, details)), 1);<br />
rotation r = llList2Rot(details, 3) / f;<br />
<br />
return [((llList2Vector(details, 2) - llList2Vector(details, 0)) / f) + (llRot2Up(r) * tp.z * 0.02638) - <0.0, 0.0, 0.4>, r];<br />
}<br />
return [];<br />
}//Written by Strife Onizuka<br />
<br />
default{<br />
state_entry(){<br />
llSitTarget(vOffset, rOffset);<br />
}<br />
changed(integer change){<br />
key id = llAvatarOnSitTarget();<br />
if(id)<br />
llOwnerSay("["+llList2CSV([vOffset, rOffset]) +"] ~ [" + llList2CSV(GetSitTarget(LINK_THIS, id))+"]");<br />
}<br />
}<br />
</source><br />
<br />
<br />
'''Note''': the above two scripts in this paragraph are incorrect. Most notably, the position of an avatar (it's Avatar Center) is NOT dependent on the AgentSize of the seated avatar. I added another script that returns the sit target, below. [[User:Timmy Foxclaw|Timmy Foxclaw]] 10:31, 7 April 2014 (PDT)<br />
<br />
<source lang="lsl2"><br />
// A script to develop and test sbGetLinkSitTarget<br />
//<br />
// Copyright(c) Timmy Songbird @DreamNation<br />
// Timmy Foxclaw @SL,<br />
// 2014<br />
//<br />
// This program is free software; you can redistribute it and/or modify<br />
// it under the terms of the GNU General Public License as published by<br />
// the Free Software Foundation; either version 2 of the License, or<br />
// (at your option) any later version.<br />
//<br />
// This program is distributed in the hope that it will be useful,<br />
// but WITHOUT ANY WARRANTY; without even the implied warranty of<br />
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the<br />
// GNU General Public License for more details.<br />
//<br />
// You should have received a copy of the GNU General Public License<br />
// along with this program; if not, write to the Free Software<br />
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.')<br />
<br />
//----------------------------------------------------------------------------<br />
//#line "/opt/secondlife/scripts/scripts/tests/sbGetLinkSitTarget_Test.m4s:4"<br />
// This script sets a "random"-ish sit target on every prim in an object.<br />
// Recommended for your test is an object existing of two default cubes<br />
// with arbitrary rotations and position. Put this script only in the<br />
// root prim.<br />
//<br />
// The script sets the sit targets on compile or touch. Please touch<br />
// the object after editting one of the prims.<br />
//<br />
// When an avatar (un)sits on one of the prims, the script prints for every<br />
// sit target that has a seated avatar the return value of sbGetLinkSitTarget.<br />
// This value should be (almost) equal to the values passed to llSitTarget.<br />
<br />
// Example output:<br />
<br />
// Object: [<0.200000, 0.300000, 0.500000>, <0.100000, 0.150000, 0.120000, 0.976268>] set with llSitTarget on 2 prims.<br />
// Object: [<0.199999, 0.300001, 0.499999>, <0.100000, 0.150000, 0.120000, 0.976268>] returned by sbGetLinkSitTarget(1).<br />
// Object: [<0.199998, 0.300002, 0.499998>, <0.100000, 0.150000, 0.120000, 0.976268>] returned by sbGetLinkSitTarget(2).<br />
<br />
// GitLocation: tests/sbGetLinkSitTarget_Test.m4s<br />
<br />
//----------------------------------------------------------------------------<br />
//#line "/opt/secondlife/scripts/scripts/tests/sbGetLinkSitTarget_Test.m4s:26"<br />
vector sitTarget_pos_link = <0.2, 0.3, 0.5>;<br />
rotation sitTarget_rot_link = <0.1, 0.15, 0.12, 0.9762684>;<br />
<br />
//----------------------------------------------------------------------------<br />
//#line "/opt/secondlife/scripts/scripts/tests/sbGetLinkSitTarget_Test.m4s:31"<br />
// Returns the correct values to use for llSitTarget to make<br />
// the currently seated avatar sit in the same way when re-seated.<br />
// If no avatar is currently sitting then [ZERO_VECTOR, ZERO_ROTATION] is returned.<br />
//<br />
// [1] http://wiki.secondlife.com/wiki/User:Timmy_Foxclaw/About_Coordinate_Systems_and_Rotations#LSL_functions<br />
// [2] http://wiki.secondlife.com/wiki/User:Timmy_Foxclaw/About_Coordinate_Systems_and_Rotations#Converting_between_coordinate_systems<br />
list sbGetLinkSitTarget(integer link)<br />
{<br />
// Calling llAvatarOnLinkSitTarget(0) always returns NULL_KEY because the link<br />
// number of an unlinked prim changes from 0 to 1 as soon as an avatar sits on<br />
// it. So if 0 was passed then they probably meant 1.<br />
if (link == 0)<br />
{<br />
link = 1;<br />
}<br />
key av = llAvatarOnLinkSitTarget(link);<br />
if (av != NULL_KEY)<br />
{<br />
// Get link_pos_oc and link_rot_oc. See table 2 in [1].<br />
vector link_pos_oc = ZERO_VECTOR;<br />
rotation link_rot_oc = ZERO_ROTATION;<br />
if (link > 1)<br />
{<br />
list params = llGetLinkPrimitiveParams(link, [PRIM_POS_LOCAL, PRIM_ROT_LOCAL]);<br />
link_pos_oc = llList2Vector(params, 0);<br />
link_rot_oc = llList2Rot(params, 1);<br />
}<br />
// Find the link number of the seated avatar.<br />
integer avNum = llGetNumberOfPrims();<br />
do<br />
{<br />
if (av == llGetLinkKey(avNum))<br />
{<br />
// Get ac_pos_oc and ac_rot_oc (ac stands for Avatar Center), exactly the same as above<br />
// except that we don't need to test if avNum > 1, because it always will be.<br />
list params = llGetLinkPrimitiveParams(avNum, [PRIM_POS_LOCAL, PRIM_ROT_LOCAL]);<br />
vector ac_pos_oc = llList2Vector(params, 0);<br />
rotation ac_rot_oc = llList2Rot(params, 1);<br />
<br />
// Convert that to link coordinates. See formula (3) in [2].<br />
vector ac_pos_link = (ac_pos_oc - link_pos_oc) / link_rot_oc;<br />
rotation ac_rot_link = ac_rot_oc / link_rot_oc;<br />
<br />
// Now we have this little vector in the Avatar Center coordinates.<br />
vector sit_pos_ac = <0.0, 0.0, 0.05>;<br />
<br />
// Convert that to link coordinates. See formula (1) in [2].<br />
vector sit_pos_link = sit_pos_ac * ac_rot_link + ac_pos_link;<br />
<br />
// Return the values, accounting for the sit target bug of 0.4m.<br />
return [sit_pos_link - <0.0, 0.0, 0.4>, ac_rot_link];<br />
}<br />
}<br />
while (--avNum);<br />
}<br />
return [ZERO_VECTOR, ZERO_ROTATION];<br />
}<br />
<br />
setSitTargets()<br />
{<br />
// Set the same sit target on every prim.<br />
integer n = llGetNumberOfPrims();<br />
llSay(0, "[" + llList2CSV([sitTarget_pos_link, sitTarget_rot_link]) + "] set with llSitTarget on " + (string)n + " prims.");<br />
do<br />
{<br />
llLinkSitTarget(n, sitTarget_pos_link, sitTarget_rot_link);<br />
}<br />
while(--n);<br />
}<br />
<br />
//----------------------------------------------------------------------------<br />
//#line "/opt/secondlife/scripts/scripts/tests/sbGetLinkSitTarget_Test.m4s:105"<br />
default<br />
{<br />
state_entry()<br />
{<br />
setSitTargets();<br />
}<br />
<br />
touch_start(integer n)<br />
{<br />
setSitTargets();<br />
}<br />
<br />
changed(integer change)<br />
{<br />
if ((change & CHANGED_LINK))<br />
{<br />
integer n = llGetNumberOfPrims();<br />
do<br />
{<br />
key av = llAvatarOnLinkSitTarget(n);<br />
if (av != NULL_KEY)<br />
{<br />
llSay(0, "[" + llList2CSV(sbGetLinkSitTarget(n)) + "] returned by sbGetLinkSitTarget(" + (string)n + ").");<br />
}<br />
}<br />
while(--n);<br />
}<br />
}<br />
}<br />
</source><br />
:Yes the above two scripts are older versions. The 0.05 offset has been tried before. {{User|Talarus Luan}} [https://wiki.secondlife.com/w/index.php?title=LlSitTarget&diff=1179695&oldid=1179694 could not get it to work]. {{User|Talarus Luan}} went on to work out a quadratic equation that provided a more accurate result. See [[#UpdateSitTarget_changes.3F|#UpdateSitTarget changes?]] below. -- '''[[User:Strife_Onizuka|Strife]]''' <sup><small>([[User talk:Strife_Onizuka|talk]]|[[Special:Contributions/Strife_Onizuka|contribs]])</small></sup> 12:38, 7 April 2014 (PDT)<br />
<br />
::Hi Strife. There must be some miscommunication - we seem to be talking about different things. After extensive research (see [[ User:Timmy_Foxclaw/About_Coordinate_Systems_and_Rotations|this link]], especially the script at the end), I have found that the value is exactly 0.05 and not depend on the height of the avatar in SecondLife. The function sbGetLinkSitTarget as defined in the script above returns the exact values (within the normal floating point round off error of 0.000002 or so), no matter what position and rotation you passed to llSitTarget. Perhaps we can meet in some sandbox in SL? I'd like to understand where your quadratic expression exactly comes in. Maybe you can show me the test object and the tests that you did to determine it. [[User:Timmy Foxclaw|Timmy Foxclaw]] 15:41, 7 April 2014 (PDT)<br />
<br />
:::I'd love to meet you inworld but my current schedule precludes that for about the next month (it has sucked, I missed my own 10 year birthday). Beyond inserting the changes proposed by others I haven't done any of the work on this myself, I code mostly for the fun of it and do testing in LSLEditor. I have been watching your ACSaR article evolve, I've been thinking it might be worth bringing into the main namespace. I don't know how LL did such a wonderful job of screwing sittargets up. -- '''[[User:Strife_Onizuka|Strife]]''' <sup><small>([[User talk:Strife_Onizuka|talk]]|[[Special:Contributions/Strife_Onizuka|contribs]])</small></sup> 19:18, 7 April 2014 (PDT)<br />
<br />
::::Hey Timmy. I'm guessing that the quadratic equation to wihch Strife is referring is the one at the end of the [[#UpdateSitTarget_changes.3F|#UpdateSitTarget changes?]] section below, where {{User|Talarus Luan}} arrives at the quadratic equation<br />
<br />
offset = 0.008906 * z^3 - 0.049831 * z^2 + 0.088967 * z<br />
<br />
::::where z is avatar height. If I plug z = 1.16 and z = 2.45 into this equation, I get the values 0.050050466 and 0.049831322 respectively. The difference between these two values is just 0.000219144, so it's all very close to 0.05. However, I'd love to know the exact calculation in order to get this right in the next release of OpenSimulator. On a very unscientific eyeballing, they both seem more accurate than the z * 0.02638 calculation in the script (which has a value range of 0.0306008 to 0.064631) but between these two it's much harder to tell. How do you perform your measurements? -- [[User:Fenn Meredith|Fenn Meredith]] 16:26, 18 April 2014 (PDT)<br />
<br />
:::::Hi Fenn, I gave you a test object in SL. It prints out the values. A little drawing would make things a lot more clear but well, that's a bit hard :p. The idea is that if you pass some vector to llSitTarget then you have to add 0.4 to it's Z value to arrive at the same point as the vector in the Avatar center Coordinate system (AC) that points along the Z-axis of that coordinate system (lets call that point S). Hence if you apply no rotation then S is 0.4m above the sittarget, and the AC is 0.05m below that, hence 0.35m above the set sittarget. If you apply a rotation of 180 degrees, they will add up and AC ends up at 0.45m above the set sittarget. While, if you use a rotation of 90 degrees then AC ends up 0.4m above the set sittarget, but 0.05m to the left (or right) of it. The latter is thus the easiest way to distinguish them with a single sit. Here is a script that does that:<br />
<br />
<source lang="lsl2"><br />
vector sit_pos_link = <0.0, 0.0, 1.0>;<br />
rotation ac_rot_link;<br />
<br />
default<br />
{<br />
state_entry()<br />
{<br />
vector rot = <90.0, 0.0, 0>;<br />
ac_rot_link = llEuler2Rot(rot * DEG_TO_RAD);<br />
llSitTarget(sit_pos_link, ac_rot_link);<br />
}<br />
<br />
changed(integer change)<br />
{<br />
if ((change & CHANGED_LINK))<br />
{<br />
key av = llAvatarOnSitTarget();<br />
if (av != NULL_KEY)<br />
{<br />
llRequestPermissions(av, PERMISSION_TRIGGER_ANIMATION);<br />
}<br />
}<br />
}<br />
<br />
run_time_permissions(integer perm)<br />
{<br />
if ((perm & PERMISSION_TRIGGER_ANIMATION))<br />
{<br />
key user = llAvatarOnSitTarget();<br />
if (user)<br />
{<br />
integer linkNum = llGetNumberOfPrims();<br />
do<br />
{<br />
if (user == llGetLinkKey(linkNum))<br />
{<br />
list params = llGetLinkPrimitiveParams(linkNum, [PRIM_POS_LOCAL, PRIM_SIZE]);<br />
vector ac_pos_link = llList2Vector(params, 0);<br />
vector offsets = ac_pos_link - sit_pos_link;<br />
vector agentSize = llList2Vector(params, 1);<br />
float z = agentSize.z;<br />
llSay(0, "The agentSize.z is " + (string)z + " -->\n0.008906 * z^3 - 0.049831 * z^2 + 0.088967 * z = " + (string)(((0.008906 * z - 0.049831) * z + 0.088967) * z));<br />
llSay(0, "The actual offsets are:\n" + (string)offsets.z + " and " + (string)offsets.y + " (+/- 0.000002)");<br />
jump end;<br />
}<br />
}<br />
while (--linkNum);<br />
}<br />
@end;<br />
}<br />
}<br />
}<br />
</source><br />
<br />
:::::You can use this script also in opensim to see what it gives there. In 0.8-dev you might also want to print offsets.y / z (which will give -0.02638). [[User:Timmy Foxclaw|Timmy Foxclaw]] 06:25, 20 April 2014 (PDT)<br />
::::::Using your script, it certainly looks like 0.05 is correct (or near as makes no difference). But I'm surprised you can demonstrate this with such a simple script bearing in mind all the extensive discussion and painstaking curve fitting that went on above and below -- [[User:Fenn Meredith|Fenn Meredith]] 11:46, 23 April 2014 (PDT)<br />
:::::::Coming into this part of the conversation a little bit late, but to clarify a few things: firsly, the sit target most certainly *IS* affected by avatar height (apparently, from offline discussions, it is tied to the length of the thigh "bone"). Secondly, the parabolic curve fitting was necessary to eliminate a significant amount of error in the original linear adjustment that I discovered when working on various projects using UpdateSitTarget. I determined the values empirically, by using an in-world test apparatus that allowed me to visually measure the disparity between the original UpdateSitTarget setting, and the actual llSitTarget positioning. I had numerous subjects (20+ residents) wearing different avatars with a range of heights sit on the test apparatus, and I measured their height and the deviation for each. I plugged the values into a 4th-order equation solver and got the coefficients for a parabolic function which made the deviation as small as possible. Before, the deviation was often very noticeable; afterwards, it was imperceptible in most cases without zooming in to the sub-millimeter level. If you are trying to replicate the LL llSitTarget functionality in OpenSim, I would *strongly* advise against it. Instead, I would suggest harmonizing the avatar's hip bone position set by PRIM_POSITION with the llSitTarget position. Yes, this means that there will be a discrepancy with scripts made for use in SL directly ported to OpenSim, but if you simplify this mess, it makes life REAL easy in that it won't need the UpdateSitTarget correction at all, which is, in my opinion, far preferable.[[User:Talarus Luan|Talarus Luan]] 13:26, 26 July 2014 (PDT)<br />
<br />
==Using llSetLinkPrimitiveParams for skydiving: why limited to 5m in a linked set?==<br />
llSetLinkPrimitiveParams can be used as a handy tool to adjust an avatar's position and rotation.<br />
This works perfectly when the object consists of 1 prim, with a range for setting the avatar position away to 500m easily!<br />
When there are more prims linked, this offset seems to be limited to 5m (measured with llVecDist). This is an awfull sideeffect!<br />
<br />
Put this next script inside a prim and sit on the prim, it will bring you to 1000.0 higher then the prim.<br />
Next link this prim to another prim and try again. You will notice you are limited to 5m. My Question: why is this limited?<br />
<source lang="lsl2"><br />
// by Randur Source<br />
<br />
integer heightcnt = 0;<br />
list heights = [0.0, 1.0, 5.0, 6.0, 10.0, 100.0, 300.0, 500.0, 800.0, 1000.0];<br />
<br />
default<br />
{<br />
state_entry()<br />
{<br />
llSitTarget(ZERO_VECTOR,ZERO_ROTATION); // Clear the current sittarget for a clear test<br />
llSetRot(ZERO_ROTATION); // set the prim to no rotation, for simple z axis movement<br />
}<br />
<br />
changed(integer change)<br />
{<br />
if (change & CHANGED_LINK) // detect linked prims and avatars<br />
{<br />
integer primnum = llGetNumberOfPrims(); // the avatar is the last linked prim<br />
if (primnum <= 1) // stop if there is only 1 prim<br />
return;<br />
<br />
key avatar = llGetLinkKey(primnum);<br />
if (llGetAgentSize(avatar) == ZERO_VECTOR) // stop if this is not an avatar<br />
return;<br />
<br />
// loop through the list of test heights:<br />
for (heightcnt = 0; heightcnt < llGetListLength(heights); heightcnt++)<br />
{<br />
float height = llList2Float(heights,heightcnt);<br />
llSetLinkPrimitiveParams(primnum,[PRIM_POSITION,<0.0,0.0,height>]); // set this to the wanted height using a vector z axis<br />
<br />
vector avatarpos = llList2Vector(llGetObjectDetails(avatar,[OBJECT_POS]),0); // detect the avatar position within the sim<br />
float distance = llVecDist(llGetPos(),avatarpos);<br />
llOwnerSay("Attempt to move " + llKey2Name(llGetLinkKey(primnum)) +<br />
" to " + (string)height + "m high resulting to " + (string)distance + "m");<br />
<br />
llSleep(1.0);<br />
}<br />
llUnSit(avatar);<br />
}<br />
}<br />
}<br />
</source><br />
<br />
'''Posted by Sylvio Runo : Answer ''' :<br />
The correct limit is 54 meters.<br />
You can't move a linked object more than 54 meters away from the axis of the root prim.<br />
On SecondLife (other grids like OsGrid, may works diferent) when an agent sit on prim, the agent is attached to it, so the agent is a linked prim of the link set.<br />
<br />
More information about link rules, you will find here : http://wiki.secondlife.com/wiki/Linkability_Rules [http://wiki.secondlife.com/wiki/Linkability_Rules]<br />
<br />
==UpdateSitTarget changes?==<br />
I recently worked on a project where I used a version of this function, and it appears that it is a little off. A couple of things I noted: the Z-offset of the sit target is 0.35, not 0.4, and the avatar size doesn't seem to affect this position at all. When I used this function verbatim, I noticed discrepancies between the actual sit target and the set position call. When I changed the script as noted, I got a perfect match. Has the handling of the sit target been changed since this was written? [[User:Talarus Luan|Talarus Luan]] 22:57, 1 July 2009 (UTC)<br />
:Seconded. I wish I'd looked at this discussion before spending an hour on trying to figure out how the code actually behaved. -- [[User:Tonya Souther|Tonya Souther]] 15:11, 19 August 2009 (UTC)<br />
<br />
::This is news to me but I haven't been in world in ages :( -- '''[[User:Strife_Onizuka|Strife]]''' <sup><small>([[User talk:Strife_Onizuka|talk]]|[[Special:Contributions/Strife_Onizuka|contribs]])</small></sup> 22:56, 20 August 2009 (UTC)<br />
<br />
:::From some quick testing in 1.40, this seems to be how the "true" offset is computed:<br />
:::1. Start with offset as provided by LSL.<br />
:::2. Add < 0.0 , 0.0 , 0.4 ><br />
:::3. Subtract llRot2Up( rot ) * 0.05<br />
:::[[User:Gregory Maurer|--Gregory Maurer]] 20:00, 28 August 2010 (UTC)<br />
<br />
::::Confirmed. The following appears to work fine:<br />
<source lang="lsl2">llSetLinkPrimitiveParams(linkNum, [PRIM_POS_LOCAL, pos + <0.0, 0.0, 0.4> - (llRot2Up(rot) * 0.05), PRIM_ROT_LOCAL, rot]);</source><br />
::::This of course using the new <code>PRIM_POS_LOCAL</code> and <code>PRIM_ROT_LOCAL</code> values for simplicity. If one or two others can confirm that the above code works correctly, then I can splice it into the example.<br/>-- '''[[User:Haravikk_Mistral|Haravikk]]''' <sup><small>([[User_talk:Haravikk_Mistral|talk]]|[[Special:Contributions/Haravikk_Mistral|contribs]])</small></sup> 14:16, 26 December 2011 (PST)<br />
<br />
:::::Be sure to test it with avatars of different shapes, and shoe configurations. I recall that being an issue. {{User|Escort DeFarge}} would know about this best. -- '''[[User:Strife_Onizuka|Strife]]''' <sup><small>([[User talk:Strife_Onizuka|talk]]|[[Special:Contributions/Strife_Onizuka|contribs]])</small></sup> 22:05, 26 December 2011 (PST)<br />
<br />
::::::I tried with my two main avatar appearances, one average human height and one closer to 8 feet tall, and it didn't seem to make a difference. The test I used was a simple object with sit-target set, and a menu allowing it to be repositioned, causing the sit-target to move and if an avatar is seated on it, they will be repositioned using <code>llSetLinkPrimitiveParams()</code> as done above. In my case the position of the avatar was consistent both when sitting on the object (using the sit-target) and being repositioned. Avatar height appears to have no effect, as the sit-target seems to define the avatar's hip-location, which is seemingly the avatar's "centre" when seated. I'll try to run some more tests when I get a chance, as it's possible this behaviour may not hold true if the object doesn't have a sit-target on it. The height of the avatar does however have a marked visual impact, depending exactly what you're trying to line up where, but that's a general issue with sitting on objects.<br/>-- '''[[User:Haravikk_Mistral|Haravikk]]''' <sup><small>([[User_talk:Haravikk_Mistral|talk]]|[[Special:Contributions/Haravikk_Mistral|contribs]])</small></sup> 05:38, 28 December 2011 (PST)<br />
:::::::Sorry for my long delay in responding. Due to various RL issues and SL/LL burnout, I took a year off from SL to pursue other activities. That said, it seems to work fine to me, Haravikk; however, I have not done exhaustive testing with tons of different avs, shoes, etc. I would consider going ahead and changing it, because the version as it is right now is not correct for the majority of avatars, regardless. If Escort DeFarge or someone else wants to amend it later to include edge cases, that's great, but a better base accuracy is more important at this point. In fact, I think I will go ahead and edit it in, since it has been so long anyway.[[User:Talarus Luan|Talarus Luan]] 12:12, 5 July 2013 (PDT)<br />
:::::::Holding up on the edit, further testing is revealing that if the script is in a prim other than the root, it is off by varying amounts depending on the rotation.[[User:Talarus Luan|Talarus Luan]] 12:39, 5 July 2013 (PDT)<br />
:::::::OK, I think I found the error. Still need to keep the local position/rotation values for the child prim the script is in, like so:<br />
<source lang="lsl2">llSetLinkPrimitiveParams(linkNum, PRIM_POS_LOCAL, (pos + <0.0, 0.0, 0.4> - (llRot2Up(rot) * 0.05)) * localrot + localpos, PRIM_ROT_LOCAL, rot * localrot]);</source><br />
:::::::I'll hold off on the edit until I can get another verify that this code is good.[[User:Talarus Luan|Talarus Luan]] 12:51, 5 July 2013 (PDT)<br />
:::::::OK. I think I have analyzed this to death today and have come to the conclusion that Strife's original code is largely correct, but the error I am seeing comes from the "magic constants" 0.4 and 0.02638. Haravikk's code is simply a reduced form of Strife's code. The 0.4 magic constant is still there, but Haravikk is using just a close, but fixed, magic constant of 0.05 instead of Strife's (size.z * 0.02638), which comes out very close to 0.5 for most normal human avs. Thus, I am concluding that the inaccuracy is in the "magic constants" themselves, and I am going to hold off on the edit until I can get some more information on the source of these constants and see if there are better, more accurate values. It is annoying that, in all these years, we still haven't gotten LL to just tell us what the damn difference is between avatar sit targets and local position offsets in a linkset. It can't be that hard for someone who is familiar with the code to look at it and document it. -.- [[User:Talarus Luan|Talarus Luan]] 13:24, 5 July 2013 (PDT)<br />
<br />
::::::::Welcome back! I'd like to take credit for that but that's the part that Escort contributed. As to where 0.02638 comes from, I vaguely recall it came from Escort's testing. I was driven more by "wouldn't it be cool to write a function that..." than anything else. I do agree the values have always been not quite right. -- '''[[User:Strife_Onizuka|Strife]]''' <sup><small>([[User talk:Strife_Onizuka|talk]]|[[Special:Contributions/Strife_Onizuka|contribs]])</small></sup> 23:10, 5 July 2013 (PDT)<br />
:::::::::Thanks! OK, I did a bunch of empirical testing, sampling a bunch of avatars from 1.16m to 2.45m in height, as reported by llGetAgentSize. I picked the lowest and highest and one about standard height, and fitted a parabolic curve through them. I have reduced the inaccuracies to a great degree, but it still isn't 100% perfect for all sizes in that range, just the ones that I used to solve the curve equation. The rest show a *tiny* bit of movement, but they are very close. Obviously, the difference isn't parabolic, probably just some kind of discrete step function, but it works.[[User:Talarus Luan|Talarus Luan]] 11:16, 14 July 2013 (PDT)<br />
<source lang="lsl2">vector vCoefficients = <0.008906,-0.049831,0.088967>;<br />
float fAdjust = vCoefficients.x * size.z * size.z + vCoefficients.y * size.z + vCoefficients.z;<br />
llSetLinkPrimitiveParamsFast(linkNum,<br />
[PRIM_POS_LOCAL, (pos + <0.0, 0.0, 0.4> - (llRot2Up(rot) * size.z * fAdjust)) * localrot + localpos,<br />
PRIM_ROT_LOCAL, rot * localrot]);</source><br />
<br />
::::::::::I see you mind reading abilities haven't diminished (I contemplated suggesting the tests you have done, decided to go to bed instead). Any reason not to use parentheses? It looks like something that could get optimized to an a series of FMAs (by the VM). -- '''[[User:Strife_Onizuka|Strife]]''' <sup><small>([[User talk:Strife_Onizuka|talk]]|[[Special:Contributions/Strife_Onizuka|contribs]])</small></sup> 21:33, 14 July 2013 (PDT)<br />
<br />
<source lang="lsl2">vector vCoefficients = <0.008906,-0.049831,0.088967>;<br />
float fAdjust = ((((vCoefficients.x * size.z) + vCoefficients.y) * size.z) + vCoefficients.z) * size.z;<br />
llSetLinkPrimitiveParamsFast(linkNum,<br />
[PRIM_POS_LOCAL, (pos + <0.0, 0.0, 0.4> - (llRot2Up(rot) * fAdjust)) * localrot + localpos,<br />
PRIM_ROT_LOCAL, rot * localrot]);</source><br />
:::::::::::Yeah, I thought about optimizing it a bit after I posted it, but decided to leave it unoptimized here so the path from the current function to this change was clear, for demonstrability purposes. Besides, I had to leave some room for it to be Strifed&trade;. :P [[User:Talarus Luan|Talarus Luan]] 15:17, 17 July 2013 (PDT)<br />
<br />
::::::::::::I appreciate the gesture :p and I'm not as bad as I use to be. I'm not going to optimize out fAdjust, it's more readable this way. This is more for myself later as my memory is crap, the reasoning behind using llRot2Up is that it solves the pesky problem of the quaternion not having a magnitude of one. While the following isn't optimal, it is cool. -- '''[[User:Strife_Onizuka|Strife]]''' <sup><small>([[User talk:Strife_Onizuka|talk]]|[[Special:Contributions/Strife_Onizuka|contribs]])</small></sup> 00:00, 18 July 2013 (PDT)<br />
<source lang="lsl2"><br />
size.x = (size.z * (size.y = (size.z * size.z)));<br />
float fAdjust = vCoefficients * size;<br />
</source><br />
:::::::::::::Yeah, that is a nice way to represent it, for those used to the LSL representation for vector dot product. I'm a little less enthused about the size vector assignment chain, but that's just my general dislike for C value assignments and such. In my mind, I separate assignments from expressions, so seeing them mixed together causes a bit of a train wreck in my brain's lexical analyzer. :P[[User:Talarus Luan|Talarus Luan]] 10:00, 21 July 2013 (PDT)<br />
<br />
::::::::::::::I don't think anyone uses the LSL vector dot product. It took me three days to remember it existed and then I look up the syntax just to make sure I wasn't crazy (yes yes, I agree it's insane to think that looking up the syntax of an obscure feature is proof against insanity but I'm sticking to it, my cat agrees). I think a train wreck was my goal. -- '''[[User:Strife_Onizuka|Strife]]''' <sup><small>([[User talk:Strife_Onizuka|talk]]|[[Special:Contributions/Strife_Onizuka|contribs]])</small></sup> 11:13, 21 July 2013 (PDT)<br />
<br />
== Avatars Floating After Sit ==<br />
<br />
The position of avatars will sometimes change, generally noticeable as a rise on the Z axis of perhaps half a meter - common triggers for this is typing or another AV sitting on the same object - though these are not exhaustive. Does anyone have a clue why this happens, and how to prevent it from happening? [[User:TaraLi Jie|TaraLi Jie]] 21:14, 11 March 2012 (PDT)<br />
<br />
:Hmm, there are a few possible causes, but the main cause are the animations involved, so it's worth remembering that any animation overrider can potentially cause weirdness while on a sit-target, which is why most good ones can turn themselves off while seated. It's a bit difficult to describe specific problems with animations, but I think that sometimes it can be caused by animations that have a weird first frame, since it's used to calculate all the offsets etc. for the rest of the animation; normally this will be a neutral pose since you don't actually see it in the animation, but if it's something odd then it can mess with positioning. -- <br/>-- '''[[User:Haravikk_Mistral|Haravikk]]''' <sup><small>([[User_talk:Haravikk_Mistral|talk]]|[[Special:Contributions/Haravikk_Mistral|contribs]])</small></sup> 05:34, 12 March 2012 (PDT)<br />
<br />
::When I've had problems with this, the root cause has usually been that I've (or something has) inadvertently stopped an animation that's holding the avatar in place before starting another one. Because animations are all made differently, neither the animator with whom I work most of the time nor I have ever managed to figure out exactly what to avoid, but certainly when it happens to me, I always start debugging by looking very carefully at where I'm turning animations off and considering whether, in fact, I need to turn them off at all. Quite often, I find that simply turning off the default sit animation when my first animation starts, and then keeping the first animation going throughout, starting and stopping other ones over it, as necessary, solves the problem.<br />
<br />
::One "gotcha" is that stopping an animation and then immediately restarting it doesn't work. It confuses the viewer something horrible, and often leads to people floating in mid-air. [[User:Innula Zenovka|Innula Zenovka]] 09:04, 12 March 2012 (PDT)<br />
<br />
:::In developing a multi-sit script, I did some experiments. I did 20 tests using only llSitTarget() and every time that I started typing, my avatar shifted up. I then did 20 tests in which I repositioned myself using SLPPF after sitting. My avatar position didn't jump on typing in any of the 20 tests with SLPPF. Looking hopeful. [[User:Omei Qunhua|Omei Qunhua]] 11:54, 11 May 2014 (PDT)<br />
<br />
::::Yeah SLPPF rocks. -- '''[[User:Strife_Onizuka|Strife]]''' <sup><small>([[User talk:Strife_Onizuka|talk]]|[[Special:Contributions/Strife_Onizuka|contribs]])</small></sup> 18:28, 11 May 2014 (PDT)<br />
<br />
== Sit Target 0.4m 'bug' ==<br />
The notes say <br />
"rot affects the position of the sit-target in a buggy way way.<br />
To correct for the rot bug, simply subtract <0,0,0.4> from the position when rot is zero. See example below."<br />
<br />
But the example script adjusts z by 0.4m when rotation is NOT zero.<br />
<source lang="lsl2"><br />
if (rot!=ZERO_ROTATION) pos -=<0,0,0.4>; //here is the work around<br />
</source><br />
<br />
Which should it be?<br />
<br />
I've just been doing some tests without any 0.4m adjustment, and I am unable to observe any difference in my z position whether rotation is zero or not. Has something changed? If so, wouldn't the change screw up some furniture?<br />
[[User:Omei Qunhua|Omei Qunhua]] 14:09, 16 March 2014 (PDT)<br />
<br />
:You are right, there shouldn't be a test there. My understanding is that you always need to subtract 0.4 from z. Changing it would screw up furniture. -- '''[[User:Strife_Onizuka|Strife]]''' <sup><small>([[User talk:Strife_Onizuka|talk]]|[[Special:Contributions/Strife_Onizuka|contribs]])</small></sup> 21:02, 16 March 2014 (PDT)<br />
<br />
::Then, Strife, the notes and the example need correcting. Do you have sufficient understanding to word it as it should be? Not sure that I do. [[User:Omei Qunhua|Omei Qunhua]] 01:42, 12 May 2014 (PDT)</div>Draconis Neurocamhttps://wiki.secondlife.com/w/index.php?title=Template:LSL_Constants/llCreateCharacter&diff=1200489Template:LSL Constants/llCreateCharacter2016-06-19T00:14:34Z<p>Draconis Neurocam: Set a value for CHARACTER_STAY_WITHIN_PARCEL</p>
<hr />
<div><noinclude>{{Pathfinding LSL alpha}}</noinclude><br />
{| class="sortable" {{Prettytable}}<br />
|-{{Hl2}}<br />
! Option<br />
! title="Value" style="min-width:2em;" |<br />
! class="unsortable" | Default<br />
! class="unsortable" | Range / Values<br />
! class="unsortable" | Description<br />
|-<br />
|{{LSL Const|CHARACTER_DESIRED_SPEED|integer|1}}<br />
|{{#var:value}}<br />
|6<br />
|{{Interval|gte=0.2|lte=40.0|center=speed}}<br />
|Speed of pursuit in meters per second.<br />
|-<br />
|{{LSL Const|CHARACTER_RADIUS|integer|2}}<br />
|{{#var:value}}<br />
|<br />
|{{Interval|gte=0.125|lte=5.0|center=radius}}<br />
|Set collision capsule radius.<br />
|-<br />
|{{LSL Const|CHARACTER_LENGTH|integer|3}}<br />
|{{#var:value}}<br />
|<br />
|{{Interval|gt=0.0|lte=10.0|center=length}}<br />
|Set collision capsule length<br />
<br />
If the value is less than twice the '''radius''' plus 0.1m, it will be set to twice the radius plus 0.1m.<br />
|-<br />
|{{LSL Const|CHARACTER_ORIENTATION|integer|4}}<br />
|{{#var:value}}<br />
|[[VERTICAL]]<br />
|[[VERTICAL]], [[HORIZONTAL]]<br />
|Set the character orientation.<br />
|-<br />
|{{LSL Const|TRAVERSAL_TYPE|integer|7}}<br />
|{{#var:value}}<br />
|[[TRAVERSAL_TYPE_SLOW]]<br />
|[[TRAVERSAL_TYPE_FAST]], [[TRAVERSAL_TYPE_SLOW]], [[TRAVERSAL_TYPE_NONE]]<br />
|Controls the speed at which characters moves on terrain that is less than 100% walkable will move faster (e.g., a cat crossing a street) or slower (e.g., a car driving in a swamp).<br />
<br />
To use [[TRAVERSAL_TYPE_FAST|_FAST]] or [[TRAVERSAL_TYPE_SLOW|_SLOW]], you must specify a [[CHARACTER_TYPE]].<br />
|-<br />
|{{LSL Const|CHARACTER_TYPE|integer|6}}<br />
|{{#var:value}}<br />
| [[CHARACTER_TYPE_NONE]]<br />
| [[CHARACTER_TYPE_A]], [[CHARACTER_TYPE_B]], [[CHARACTER_TYPE_C]], [[CHARACTER_TYPE_D]], [[CHARACTER_TYPE_NONE]]<br />
|Specifies which walkability coefficient will be used by this character.<br />
|-<br />
|{{LSL Const|CHARACTER_AVOIDANCE_MODE|integer|5}}<br />
|{{#var:value}}<br />
|[[AVOID_CHARACTERS]] <nowiki>|</nowiki> [[AVOID_DYNAMIC_OBSTACLES]]<br />
| Combinable Flags:{{PBR}} [[AVOID_CHARACTERS]], [[AVOID_DYNAMIC_OBSTACLES]], [[AVOID_NONE]]<br />
|Allows you to specify that a character should not try to avoid other characters, should not try to avoid dynamic obstacles (relatively fast moving objects and avatars), or both. This is framed in the positive sense (<code><nowiki>[</nowiki>[[CHARACTER_AVOIDANCE_MODE]], [[AVOID_CHARACTERS]]]</code> would create a character that avoided other characters but not agents or moving vehicles). Setting this parameter to [[AVOID_NONE]] causes the character to not avoid either category.<br />
|-<br />
|{{LSL Const|CHARACTER_MAX_ACCEL|integer|8}}<br />
|{{#var:value}}<br />
|20<br />
|{{Interval|gte=0.5|lte=40.0|center=acceleration}}<br />
|The character's maximum acceleration rate.<br />
|-<br />
|{{LSL Const|CHARACTER_MAX_DECEL|integer|9}}<br />
|{{#var:value}}<br />
|30<br />
|{{Interval|gte=0.5|lte=60.0|center=deceleration}}<br />
|The character's maximum deceleration rate.<br />
|-<br />
|{{LSL Const|CHARACTER_DESIRED_TURN_SPEED|integer|12}}<br />
|{{#var:value}}<br />
|6<br />
|{{Interval|gte=0.02|lte=40.0|center=speed}}<br />
|The character's maximum speed while turning--note that this is only loosely enforced (i.e., a character may turn at higher speeds under certain conditions)<br />
|-<br />
|{{LSL Const|CHARACTER_MAX_TURN_RADIUS|integer|10}}<br />
|{{#var:value}}<br />
|1.25<br />
|{{Interval|gte=0.1|lte=10.0|center=radius}}<br />
|The character's turn radius when traveling at [[CHARACTER_DESIRED_TURN_SPEED]]<br />
|-<br />
|{{LSL Const|CHARACTER_MAX_SPEED|integer|13}}<br />
|{{#var:value}}<br />
|20<br />
|{{Interval|gte=1|lte=40.0|center=max_speed}}<br />
|The character's maximum speed. Affects speed when avoiding dynamic obstacles and when traversing low-walkability objects in [[TRAVERSAL_TYPE_FAST]] mode.<br />
|-<br />
|{{LSL Const|CHARACTER_ACCOUNT_FOR_SKIPPED_FRAMES|integer|14}}<br />
|{{#var:value}}<br />
|[[TRUE]]<br />
|[[TRUE]] or [[FALSE]]<br />
|[[TRUE]] matches pre-existing behavior. If set to [[FALSE]], character will not attempt to catch up on lost time when pathfinding performance is low, potentially providing more reliable movement (albeit while potentially appearing to be more stuttery). <br />
|-<br />
|{{LSL Const|CHARACTER_STAY_WITHIN_PARCEL|integer|15}}<br />
|{{#var:value}}<br />
| Depends[[llCreateCharacter#ct-caveat|*]]<br />
|[[TRUE]] or [[FALSE]]<br />
|[[FALSE]] matches traditional behavior. If set to [[TRUE]], treat the parcel boundaries as one-way obstacles (will re-enter but can't leave on it's own).<br />
|}</div>Draconis Neurocamhttps://wiki.secondlife.com/w/index.php?title=LlHTTPRequest&diff=1200456LlHTTPRequest2016-06-14T01:37:07Z<p>Draconis Neurocam: added a space</p>
<hr />
<div>{{LSL_Function<br />
|func=llHTTPRequest<br />
|func_id=230<br />
|func_energy=10.0<br />
|func_sleep=0.0<br />
|func_desc=Sends an HTTP request to the specified URL with the body of the request and parameters. <br />
|sort=HTTPRequest<br />
|func_footnote=<br />
|return_type=key|return_subtype=handle<br />
|return_text=identifying the HTTP request made.<br />
|p1_type=string|p1_name=url|p1_desc=A valid HTTP/HTTPS URL.<br />
|p2_type=list|p2_subtype=instructions|p2_name=parameters|p2_desc=configuration parameters, specified as HTTP_* flag-value pairs<br />
[ parameter1, value1, parameter2, value2, . . . parameterN, valueN]<br />
|p3_type=string|p3_name=body|p3_desc=Contents of the request.<br />
|constants={{LSL_Constants_HTTP}}<br />
{{LSL_Constants/HTTP_Headers}}<br />
|spec<br />
|caveats=<br />
*If there is a space in '''url''', the [[http_response]] status code will be 499.<br />
*The corresponding [[http_response]] event will be triggered in all scripts in the [[prim]], not just in the requesting script.<br />
*Requests must fully complete after 60 seconds, or else the response will be thrown away and the [[http_response]] status code will be 499.<br />
*The response body is limited to 2048 bytes by default, see [[HTTP_BODY_MAXLENGTH]] above to increase it. If the response is longer, it will be truncated.<br />
*Cannot be used to load textures or images from the internet, for more information see [[Web Textures]].<br />
*If the accessed site is relying on the LSL script to report L$ transactions, then it '''must''' check the X-SecondLife-Shard header to see if the script is running on the beta grid.<br />
* Some servers will return a 405 error if you send POST to a file that can't accept metadata, such as a text or HTML file. Make sure you use the GET method to ensure success in any environment.<br />
* While the HTTP status code from the server is provided to the script, redirect codes such as 302 will result in the redirect being automatically and transparently followed ONLY IF the [[HTTP_METHOD]] is GET, with the resulting response being returned. If the [[HTTP_METHOD]] is anything other then GET then you'll get back an http_response with a status code of 302, but without any way to view the headers, you can't know where you were being redirected to unless that was also included in the body.<br />
* The following applies when making a request to a script using HTTP-In:<br />
**When appending a query string to a cap URL there '''MUST''' be a trailing slash between the cap guid and the query string token <code>"?"</code>. For example: [https://sim3015.aditi.lindenlab.com:12043/cap/a7717681-2c04-e4ac-35e3-1f01c9861322?arg=gra {{HoverTextStyle|style=color:green;|<nowiki>https://sim3015.aditi.lindenlab.com:12043/cap/a7717681-2c04-e4ac-35e3-1f01c9861322</nowiki>|2={{String|x-script-url}} = {{String|https://sim3015.aditi.lindenlab.com:12043/cap/a7717681-2c04-e4ac-35e3-1f01c9861322}}}}?{{HoverTextStyle|style=color:red;|1=arg=gra|2={{String|x-query-string}} = {{String|1=arg=gra}}}}] will return a 500 HTTP status {{Wikipedia|List_of_HTTP_status_codes#5xx_Server_Error|Server Error code}}, but [https://sim3015.aditi.lindenlab.com:12043/cap/a7717681-2c04-e4ac-35e3-1f01c9861322/?arg=gra {{HoverTextStyle|style=color:green;|<nowiki>https://sim3015.aditi.lindenlab.com:12043/cap/a7717681-2c04-e4ac-35e3-1f01c9861322</nowiki>|2={{String|x-script-url}} = {{String|https://sim3015.aditi.lindenlab.com:12043/cap/a7717681-2c04-e4ac-35e3-1f01c9861322}}}}{{HoverTextStyle|style=color:blue;|/|2={{String|x-path-info}} = {{String|/}}}}?{{HoverTextStyle|style=color:red;|1=arg=gra|2={{String|x-query-string}} = {{String|1=arg=gra}}}}] will succeed.<br />
* X-SecondLife-Owner-Name may return "(Loading...)" instead of owner name (still true, 18th of July, 2011)<br />
* Requests made at approx 0625 SLT may fail with a 503 status code, with "ERROR: The requested URL could not be retrieved", and "(111) Connection refused" in the body of the response. This has been confirmed as expected behaviour by Kelly, due to the nightly maint & log rotation. It does reliably impact object to object HTTP at that time, and quite probably may impact object to/from web around the same time. The interruption in service is fairly brief, and the precise timing may vary as LL adjust their nightly maint processes, or due to server load.<br />
* Use HTTP_MIMETYPE to set the Content-Type header. Attempts to use HTTP_CUSTOM_HEADER to set it will cause a runtime script error.<br />
<br />
'''Throttles'''<br />
<br />
The LSL function llHTTPRequest() is throttled in two ways: by prim and owner. All group-owned objects are considered together in the same throttle.<br />
<br />
The current limits are 25 requests in 20 seconds for each object, and 1000 in 20 seconds for each owner. These may change in the future if needed to prevent problems in regions.<br />
<br />
It is possible for a large collection of objects or scripts to make many calls to llHTTPRequest() and reach this throttle. When a script calls llHTTPRequest() with the throttle blocking the request, it will return NULL_KEY.<br />
<br />
The calling script must check for the NULL_KEY result and react properly for the script and object to function correctly. Some things to consider:<br />
<br />
* Pause further requests until the throttle clears<br />
* Do not make any additional llHTTPRequest() calls until enough time has passed for the throttle to reset. They will fail and continue to return NULL_KEY otherwise.<br />
* Once reached, the throttles will remain in effect as long as requests continue, but will clear if there is a silent period with no requests at least twice the throttle interval, in this case 2 * 20 or 40 seconds.<br />
<br />
Consider how a group of objects behaves. Developers must consider how multiple objects will interact and how that will affect clearing the throttle.<br />
<br />
The llHTTPRequest() throttle is most likely to be an issue with a large number of objects in a region making requests. To clear the throttle fastest, when an object encounters the throttle, it should broadcast a region-wide chat message to other objects informing them of the event and stopping their requests. If those objects continue making requests, those requests will fail and just prolong recovery.<br />
<br />
If an object waits and still gets a failure, it may be a good idea to increase the time before the next request and/or add a small random value to the wait time. This may help prevent failures caused by large groups of objects acting nearly in unison.<br />
<br />
<br />
* Object requests are throttled at approximately 25 requests per 20 seconds. This is to support a sustained rate of 1 per second or a max burst of up to 25 every 40 seconds (2x the interval for max burst), smaller bursts are recommended. <br />
**[[NULL_KEY]] is returned if the request is throttled.<br />
***See [http://forums-archive.secondlife.com/139/72/108960/1.html this thread] and [http://forums-archive.secondlife.com/139/2c/109571/1.html this thread] for older details.<br />
<br />
<br />
|examples=<br />
<br />
*[[Writing Headers and HTTP POST Body to a File]]<br />
<br />
<source lang="lsl2"><br />
key http_request_id;<br />
<br />
default<br />
{<br />
state_entry()<br />
{<br />
http_request_id = llHTTPRequest("url", [], "");<br />
}<br />
<br />
http_response(key request_id, integer status, list metadata, string body)<br />
{<br />
if (request_id != http_request_id) return;// exit if unknown<br />
<br />
vector COLOR_BLUE = <0.0, 0.0, 1.0>;<br />
float OPAQUE = 1.0;<br />
<br />
llSetText(body, COLOR_BLUE, OPAQUE);<br />
}<br />
}<br />
</source><br />
<br />
Example PHP test script:<br />
<source lang="php"><br />
<?php header("content-type: text/plain; charset=utf-8"); ?><br />
Headers received:<br />
<?php<br />
<br />
/**<br />
* @author Wouter Hobble<br />
* @copyright 2008<br />
*/<br />
<br />
foreach ($_SERVER as $k => $v)<br />
{<br />
if( substr($k, 0, 5) == 'HTTP_')<br />
{<br />
print "\n". $k. "\t". $v;<br />
}<br />
}<br />
?><br />
</source><br />
<br />
example wrapper script Both capturing apache headers and global methodes<br />
<source lang="php"><br />
<?PHP<br />
// Author Waster Skronski.<br />
// General Public License (GPL).<br />
// Mind that some headers are not included because they're either useless or unreliable.<br />
<br />
$USE_APACHE_HEADERS = TRUE;// switch to false if you need cgi methods<br />
<br />
if ($USE_APACHE_HEADERS)<br />
{<br />
$headers = apache_request_headers();<br />
$objectgrid = $headers["X-SecondLife-Shard"];<br />
$objectname = $headers["X-SecondLife-Object-Name"];<br />
$objectkey = $headers["X-SecondLife-Object-Key"];<br />
$objectpos = $headers["X-SecondLife-Local-Position"];<br />
$ownerkey = $headers["X-SecondLife-Owner-Key"];<br />
$ownername = $headers["X-SecondLife-Owner-Name"];<br />
$regiondata = $headers["X-SecondLife-Region"];<br />
$regiontmp = explode ("(",$regiondata); // cut cords off<br />
$regionpos = explode (")",$regiontmp[1]);<br />
$regionname = substr($regiontmp[0],0,-1); // cut last space from simname<br />
} else {<br />
$db = $GLOBALS;<br />
$headers = $db['$_ENV'];<br />
$objectgrid = $headers["HTTP_X_SECONDLIFE_SHARD"];<br />
$objectname = $headers["HTTP_X_SECONDLIFE_OBJECT_NAME"];<br />
$objectkey = $headers["HTTP_X_SECONDLIFE_OBJECT_KEY"];<br />
$ownerkey = $headers["HTTP_X_SECONDLIFE_OWNER_KEY"];<br />
$objectpos = $headers["HTTP_X_SECONDLIFE_LOCAL_POSITION"];<br />
$ownername = $headers["HTTP_X_SECONDLIFE_OWNER_NAME"];<br />
$regiondata = $headers["HTTP_X_SECONDLIFE_REGION"];<br />
$regiontmp = explode ("(",$regiondata);<br />
$regionpos = explode (")",$regiontmp[1]);<br />
$regionname = substr($regiontmp[0],0,-1);<br />
}<br />
?><br />
</source><br />
<br />
Example wrapper script for GoDaddy.com Linux PHP servers (fix made by Thomas Conover):<br />
<br />
<source lang="php"><br />
// FETCH HEADERS START<br />
<br />
<br />
if (!function_exists('apache_request_headers'))<br />
{<br />
function apache_request_headers() {<br />
foreach($_SERVER as $key=>$value) {<br />
if (substr($key,0,5)=="HTTP_") {<br />
$key=str_replace(" ","-",ucwords(strtolower(str_replace("_"," ",substr($key,5)))));<br />
$out[$key]=$value;<br />
}else{<br />
$out[$key]=$value;<br />
}<br />
}<br />
return $out;<br />
}<br />
}<br />
// Mind that some headers are not included because they're either useless or unreliable. X-Secondlife-Local-Position<br />
$headers = apache_request_headers();<br />
$objectgrid = $headers["X-Secondlife-Shard"];<br />
$objectname = $headers["X-Secondlife-Object-Name"];<br />
$objectkey = $headers["X-Secondlife-Object-Key"];<br />
$objectpos = $headers["X-Secondlife-Local-Position"];<br />
$ownerkey = $headers["X-Secondlife-Owner-Key"];<br />
$ownername = $headers["X-Secondlife-Owner-Name"];<br />
$regiondata = $headers["X-Secondlife-Region"];<br />
$regiontmp = explode ("(",$regiondata); // cut cords off<br />
$regionname = substr($regiontmp[0],0,-1); // cut last space from simname<br />
$regiontmp = explode (")",$regiontmp[1]);<br />
$regionpos = $regiontmp[0];<br />
<br />
<br />
// FETCH HEADERS END<br />
</source><br />
<br />
<br />
<div style="display:none;"><source lang="lsl2"></source></div><br />
|helpers<br />
|also_header<br />
|also_events={{LSL DefineRow||[[http_response]]}}<br />
|also_functions={{LSL DefineRow||[[llEscapeURL]]}}<br />
{{LSL DefineRow||[[llHTTPResponse]]}}<br />
{{LSL DefineRow||[[llUnescapeURL]]}}<br />
|also_articles={{LSL DefineRow||[[Simulator IP Addresses]]}}<br />
|also_footer<br />
|notes=If for some reason while using the function [[llHTTPRequest]] or the event [[http_response]] you are unable to parse a known good RSS feed or some other form of web contents, you will need to work around it outside of SecondLife. This is unlikely to change in the near future since checking the headers requires more overhead at the simulator level.<br />
<br />
You may find that some web servers return either a null or a nonsensical result when [[llHTTPRequest]] is used, even though the same URL in a PC web browser returns the expected result. This may be due to the fact that the [[llHTTPRequest]] User Agent string is not recognised by some web servers as it does not contain "Mozilla", which would identify it as a web browser instead of, for example, a Shoutcast or an RSS client. A workaround is to append " HTTP/1.0\nUser-Agent: LSL Script (Mozilla Compatible)\n\n" or similar to the URL string, which will kludge the HTTP request to look like it originates from a web browser. This is also true when the PHP relays on $_COOKIE. Neither can the function [[llHTTPRequest]] set a cookie nor can the event [[http_request]] retrieve them.<br />
<br />
CGI environments may place the headers into variables by capitalizing the entire name, replacing dashes with underscores, and prefixing the name with "HTTP_", e.g. "HTTP_X_SECONDLIFE_OBJECT_NAME". PHP $_SERVER variables do this as well.<br />
<br />
Apache can include the headers in its logs, using the CustomLog and LogFormat directives. See [http://httpd.apache.org/docs/2.0/mod/mod_log_config.html#formats the docs] for details on the syntax.<br />
<br />
|mode<br />
|deprecated<br />
|permission<br />
|cat1=HTTP<br />
|cat2=XML-RPC<br />
|cat3=Communications<br />
|cat4=HTTP/Client<br />
}}</div>Draconis Neurocamhttps://wiki.secondlife.com/w/index.php?title=Writing_Headers_and_HTTP_POST_Body_to_a_File&diff=1200455Writing Headers and HTTP POST Body to a File2016-06-14T01:36:23Z<p>Draconis Neurocam: Added LSL</p>
<hr />
<div><br />
<source lang="php"> <br />
<!DOCTYPE html><br />
<html><br />
<head><br />
<title>LSL Test Page</title><br />
</head><br />
<body><br />
<p> <br />
<?php <br />
$headers = apache_request_headers(); <br />
function test_input($data) <br />
{<br />
$data = trim($data);<br />
$data = stripslashes($data);<br />
$data = htmlspecialchars($data);<br />
return $data;<br />
} <br />
if ($_SERVER["REQUEST_METHOD"] == "POST" && $headers["X-Secondlife-Shard"] == "Production") <br />
{<br />
$pdata=nl2br(implode("\n", $headers));<br />
foreach ($headers as $header => $value) <br />
{<br />
$headersindiv.= "$header: $value <br />\n";<br />
}<br />
$input=file_get_contents("php://input");<br />
$pdata = test_input($input);<br />
$headersindiv.=$pdata;<br />
<br />
$wfile = fopen("lslget.txt", "w") or die("Unable to open file!");<br />
fwrite($wfile, $headersindiv);<br />
fclose($wfile);<br />
$file='lslget.txt';<br />
if(filesize($file)>0)<br />
{<br />
$readfile=fopen($file, "r") or die("Unable to open file!");<br />
echo fread($readfile,filesize($file));<br />
fclose($readfile); <br />
}<br />
}<br />
?> <br />
</p><br />
</body><br />
</html><br />
</source><br />
<br />
<source lang="lsl2"><br />
<br />
key httpreq(string page,string MSG)<br />
{<br />
return llHTTPRequest(page,[<br />
HTTP_METHOD,<br />
//"GET" <br />
"POST" <br />
//"PUT" <br />
//"DELETE" <br />
,<br />
HTTP_MIMETYPE,<br />
"text/application/xhtml+xml"<br />
//"text/application/atom+xml"<br />
//"text/application/json"<br />
//"text/application/xml"<br />
//"text/application/llsd+xml"<br />
//"text/application/x-javascript"<br />
//"text/application/javascript"<br />
//"text/application/x-www-form-urlencoded"<br />
//"text/application/rss+xml"<br />
,<br />
HTTP_BODY_MAXLENGTH,16384,<br />
HTTP_VERIFY_CERT,TRUE,<br />
HTTP_VERBOSE_THROTTLE,TRUE,<br />
//HTTP_CUSTOM_HEADER,"","",<br />
HTTP_PRAGMA_NO_CACHE,TRUE<br />
],MSG);<br />
}<br />
key reqed;<br />
default<br />
{<br />
touch_start(integer total_number)<br />
{<br />
reqed=httpreq( "yourfile.php/","body text");<br />
}<br />
http_response(key request_id, integer status, list metadata, string body)<br />
{<br />
if(reqed==request_id)<br />
{<br />
llOwnerSay(body); <br />
}<br />
}<br />
}<br />
</source></div>Draconis Neurocamhttps://wiki.secondlife.com/w/index.php?title=Writing_Headers_and_HTTP_POST_Body_to_a_File&diff=1200454Writing Headers and HTTP POST Body to a File2016-06-14T01:34:35Z<p>Draconis Neurocam: Added PHP</p>
<hr />
<div><br />
<source lang="php"> <br />
<!DOCTYPE html><br />
<html><br />
<head><br />
<title>LSL Test Page</title><br />
</head><br />
<body><br />
<p> <br />
<?php <br />
$headers = apache_request_headers(); <br />
function test_input($data) <br />
{<br />
$data = trim($data);<br />
$data = stripslashes($data);<br />
$data = htmlspecialchars($data);<br />
return $data;<br />
} <br />
if ($_SERVER["REQUEST_METHOD"] == "POST" && $headers["X-Secondlife-Shard"] == "Production") <br />
{<br />
$pdata=nl2br(implode("\n", $headers));<br />
foreach ($headers as $header => $value) <br />
{<br />
$headersindiv.= "$header: $value <br />\n";<br />
}<br />
$input=file_get_contents("php://input");<br />
$pdata = test_input($input);<br />
$headersindiv.=$pdata;<br />
<br />
$wfile = fopen("lslget.txt", "w") or die("Unable to open file!");<br />
fwrite($wfile, $headersindiv);<br />
fclose($wfile);<br />
$file='lslget.txt';<br />
if(filesize($file)>0)<br />
{<br />
$readfile=fopen($file, "r") or die("Unable to open file!");<br />
echo fread($readfile,filesize($file));<br />
fclose($readfile); <br />
}<br />
}<br />
?> <br />
</p><br />
</body><br />
</html><br />
</source></div>Draconis Neurocamhttps://wiki.secondlife.com/w/index.php?title=LlHTTPRequest&diff=1200453LlHTTPRequest2016-06-14T01:31:37Z<p>Draconis Neurocam: Added Link to an example page and LSL setup.</p>
<hr />
<div>{{LSL_Function<br />
|func=llHTTPRequest<br />
|func_id=230<br />
|func_energy=10.0<br />
|func_sleep=0.0<br />
|func_desc=Sends an HTTP request to the specified URL with the body of the request and parameters. <br />
|sort=HTTPRequest<br />
|func_footnote=<br />
|return_type=key|return_subtype=handle<br />
|return_text=identifying the HTTP request made.<br />
|p1_type=string|p1_name=url|p1_desc=A valid HTTP/HTTPS URL.<br />
|p2_type=list|p2_subtype=instructions|p2_name=parameters|p2_desc=configuration parameters, specified as HTTP_* flag-value pairs<br />
[ parameter1, value1, parameter2, value2, . . . parameterN, valueN]<br />
|p3_type=string|p3_name=body|p3_desc=Contents of the request.<br />
|constants={{LSL_Constants_HTTP}}<br />
{{LSL_Constants/HTTP_Headers}}<br />
|spec<br />
|caveats=<br />
*If there is a space in '''url''', the [[http_response]] status code will be 499.<br />
*The corresponding [[http_response]] event will be triggered in all scripts in the [[prim]], not just in the requesting script.<br />
*Requests must fully complete after 60 seconds, or else the response will be thrown away and the [[http_response]] status code will be 499.<br />
*The response body is limited to 2048 bytes by default, see [[HTTP_BODY_MAXLENGTH]] above to increase it. If the response is longer, it will be truncated.<br />
*Cannot be used to load textures or images from the internet, for more information see [[Web Textures]].<br />
*If the accessed site is relying on the LSL script to report L$ transactions, then it '''must''' check the X-SecondLife-Shard header to see if the script is running on the beta grid.<br />
* Some servers will return a 405 error if you send POST to a file that can't accept metadata, such as a text or HTML file. Make sure you use the GET method to ensure success in any environment.<br />
* While the HTTP status code from the server is provided to the script, redirect codes such as 302 will result in the redirect being automatically and transparently followed ONLY IF the [[HTTP_METHOD]] is GET, with the resulting response being returned. If the [[HTTP_METHOD]] is anything other then GET then you'll get back an http_response with a status code of 302, but without any way to view the headers, you can't know where you were being redirected to unless that was also included in the body.<br />
* The following applies when making a request to a script using HTTP-In:<br />
**When appending a query string to a cap URL there '''MUST''' be a trailing slash between the cap guid and the query string token <code>"?"</code>. For example: [https://sim3015.aditi.lindenlab.com:12043/cap/a7717681-2c04-e4ac-35e3-1f01c9861322?arg=gra {{HoverTextStyle|style=color:green;|<nowiki>https://sim3015.aditi.lindenlab.com:12043/cap/a7717681-2c04-e4ac-35e3-1f01c9861322</nowiki>|2={{String|x-script-url}} = {{String|https://sim3015.aditi.lindenlab.com:12043/cap/a7717681-2c04-e4ac-35e3-1f01c9861322}}}}?{{HoverTextStyle|style=color:red;|1=arg=gra|2={{String|x-query-string}} = {{String|1=arg=gra}}}}] will return a 500 HTTP status {{Wikipedia|List_of_HTTP_status_codes#5xx_Server_Error|Server Error code}}, but [https://sim3015.aditi.lindenlab.com:12043/cap/a7717681-2c04-e4ac-35e3-1f01c9861322/?arg=gra {{HoverTextStyle|style=color:green;|<nowiki>https://sim3015.aditi.lindenlab.com:12043/cap/a7717681-2c04-e4ac-35e3-1f01c9861322</nowiki>|2={{String|x-script-url}} = {{String|https://sim3015.aditi.lindenlab.com:12043/cap/a7717681-2c04-e4ac-35e3-1f01c9861322}}}}{{HoverTextStyle|style=color:blue;|/|2={{String|x-path-info}} = {{String|/}}}}?{{HoverTextStyle|style=color:red;|1=arg=gra|2={{String|x-query-string}} = {{String|1=arg=gra}}}}] will succeed.<br />
* X-SecondLife-Owner-Name may return "(Loading...)" instead of owner name (still true, 18th of July, 2011)<br />
* Requests made at approx 0625 SLT may fail with a 503 status code, with "ERROR: The requested URL could not be retrieved", and "(111) Connection refused" in the body of the response. This has been confirmed as expected behaviour by Kelly, due to the nightly maint & log rotation. It does reliably impact object to object HTTP at that time, and quite probably may impact object to/from web around the same time. The interruption in service is fairly brief, and the precise timing may vary as LL adjust their nightly maint processes, or due to server load.<br />
* Use HTTP_MIMETYPE to set the Content-Type header. Attempts to use HTTP_CUSTOM_HEADER to set it will cause a runtime script error.<br />
<br />
'''Throttles'''<br />
<br />
The LSL function llHTTPRequest() is throttled in two ways: by prim and owner. All group-owned objects are considered together in the same throttle.<br />
<br />
The current limits are 25 requests in 20 seconds for each object, and 1000 in 20 seconds for each owner. These may change in the future if needed to prevent problems in regions.<br />
<br />
It is possible for a large collection of objects or scripts to make many calls to llHTTPRequest() and reach this throttle. When a script calls llHTTPRequest() with the throttle blocking the request, it will return NULL_KEY.<br />
<br />
The calling script must check for the NULL_KEY result and react properly for the script and object to function correctly. Some things to consider:<br />
<br />
* Pause further requests until the throttle clears<br />
* Do not make any additional llHTTPRequest() calls until enough time has passed for the throttle to reset. They will fail and continue to return NULL_KEY otherwise.<br />
* Once reached, the throttles will remain in effect as long as requests continue, but will clear if there is a silent period with no requests at least twice the throttle interval, in this case 2 * 20 or 40 seconds.<br />
<br />
Consider how a group of objects behaves. Developers must consider how multiple objects will interact and how that will affect clearing the throttle.<br />
<br />
The llHTTPRequest() throttle is most likely to be an issue with a large number of objects in a region making requests. To clear the throttle fastest, when an object encounters the throttle, it should broadcast a region-wide chat message to other objects informing them of the event and stopping their requests. If those objects continue making requests, those requests will fail and just prolong recovery.<br />
<br />
If an object waits and still gets a failure, it may be a good idea to increase the time before the next request and/or add a small random value to the wait time. This may help prevent failures caused by large groups of objects acting nearly in unison.<br />
<br />
<br />
* Object requests are throttled at approximately 25 requests per 20 seconds. This is to support a sustained rate of 1 per second or a max burst of up to 25 every 40 seconds (2x the interval for max burst), smaller bursts are recommended. <br />
**[[NULL_KEY]] is returned if the request is throttled.<br />
***See [http://forums-archive.secondlife.com/139/72/108960/1.html this thread] and [http://forums-archive.secondlife.com/139/2c/109571/1.html this thread] for older details.<br />
<br />
<br />
|examples=<br />
<br />
*[[Writing Headers and HTTP POST Body to a File]]<br />
<source lang="lsl2"><br />
key http_request_id;<br />
<br />
default<br />
{<br />
state_entry()<br />
{<br />
http_request_id = llHTTPRequest("url", [], "");<br />
}<br />
<br />
http_response(key request_id, integer status, list metadata, string body)<br />
{<br />
if (request_id != http_request_id) return;// exit if unknown<br />
<br />
vector COLOR_BLUE = <0.0, 0.0, 1.0>;<br />
float OPAQUE = 1.0;<br />
<br />
llSetText(body, COLOR_BLUE, OPAQUE);<br />
}<br />
}<br />
</source><br />
<br />
Example PHP test script:<br />
<source lang="php"><br />
<?php header("content-type: text/plain; charset=utf-8"); ?><br />
Headers received:<br />
<?php<br />
<br />
/**<br />
* @author Wouter Hobble<br />
* @copyright 2008<br />
*/<br />
<br />
foreach ($_SERVER as $k => $v)<br />
{<br />
if( substr($k, 0, 5) == 'HTTP_')<br />
{<br />
print "\n". $k. "\t". $v;<br />
}<br />
}<br />
?><br />
</source><br />
<br />
example wrapper script Both capturing apache headers and global methodes<br />
<source lang="php"><br />
<?PHP<br />
// Author Waster Skronski.<br />
// General Public License (GPL).<br />
// Mind that some headers are not included because they're either useless or unreliable.<br />
<br />
$USE_APACHE_HEADERS = TRUE;// switch to false if you need cgi methods<br />
<br />
if ($USE_APACHE_HEADERS)<br />
{<br />
$headers = apache_request_headers();<br />
$objectgrid = $headers["X-SecondLife-Shard"];<br />
$objectname = $headers["X-SecondLife-Object-Name"];<br />
$objectkey = $headers["X-SecondLife-Object-Key"];<br />
$objectpos = $headers["X-SecondLife-Local-Position"];<br />
$ownerkey = $headers["X-SecondLife-Owner-Key"];<br />
$ownername = $headers["X-SecondLife-Owner-Name"];<br />
$regiondata = $headers["X-SecondLife-Region"];<br />
$regiontmp = explode ("(",$regiondata); // cut cords off<br />
$regionpos = explode (")",$regiontmp[1]);<br />
$regionname = substr($regiontmp[0],0,-1); // cut last space from simname<br />
} else {<br />
$db = $GLOBALS;<br />
$headers = $db['$_ENV'];<br />
$objectgrid = $headers["HTTP_X_SECONDLIFE_SHARD"];<br />
$objectname = $headers["HTTP_X_SECONDLIFE_OBJECT_NAME"];<br />
$objectkey = $headers["HTTP_X_SECONDLIFE_OBJECT_KEY"];<br />
$ownerkey = $headers["HTTP_X_SECONDLIFE_OWNER_KEY"];<br />
$objectpos = $headers["HTTP_X_SECONDLIFE_LOCAL_POSITION"];<br />
$ownername = $headers["HTTP_X_SECONDLIFE_OWNER_NAME"];<br />
$regiondata = $headers["HTTP_X_SECONDLIFE_REGION"];<br />
$regiontmp = explode ("(",$regiondata);<br />
$regionpos = explode (")",$regiontmp[1]);<br />
$regionname = substr($regiontmp[0],0,-1);<br />
}<br />
?><br />
</source><br />
<br />
Example wrapper script for GoDaddy.com Linux PHP servers (fix made by Thomas Conover):<br />
<br />
<source lang="php"><br />
// FETCH HEADERS START<br />
<br />
<br />
if (!function_exists('apache_request_headers'))<br />
{<br />
function apache_request_headers() {<br />
foreach($_SERVER as $key=>$value) {<br />
if (substr($key,0,5)=="HTTP_") {<br />
$key=str_replace(" ","-",ucwords(strtolower(str_replace("_"," ",substr($key,5)))));<br />
$out[$key]=$value;<br />
}else{<br />
$out[$key]=$value;<br />
}<br />
}<br />
return $out;<br />
}<br />
}<br />
// Mind that some headers are not included because they're either useless or unreliable. X-Secondlife-Local-Position<br />
$headers = apache_request_headers();<br />
$objectgrid = $headers["X-Secondlife-Shard"];<br />
$objectname = $headers["X-Secondlife-Object-Name"];<br />
$objectkey = $headers["X-Secondlife-Object-Key"];<br />
$objectpos = $headers["X-Secondlife-Local-Position"];<br />
$ownerkey = $headers["X-Secondlife-Owner-Key"];<br />
$ownername = $headers["X-Secondlife-Owner-Name"];<br />
$regiondata = $headers["X-Secondlife-Region"];<br />
$regiontmp = explode ("(",$regiondata); // cut cords off<br />
$regionname = substr($regiontmp[0],0,-1); // cut last space from simname<br />
$regiontmp = explode (")",$regiontmp[1]);<br />
$regionpos = $regiontmp[0];<br />
<br />
<br />
// FETCH HEADERS END<br />
</source><br />
<br />
<br />
<div style="display:none;"><source lang="lsl2"></source></div><br />
|helpers<br />
|also_header<br />
|also_events={{LSL DefineRow||[[http_response]]}}<br />
|also_functions={{LSL DefineRow||[[llEscapeURL]]}}<br />
{{LSL DefineRow||[[llHTTPResponse]]}}<br />
{{LSL DefineRow||[[llUnescapeURL]]}}<br />
|also_articles={{LSL DefineRow||[[Simulator IP Addresses]]}}<br />
|also_footer<br />
|notes=If for some reason while using the function [[llHTTPRequest]] or the event [[http_response]] you are unable to parse a known good RSS feed or some other form of web contents, you will need to work around it outside of SecondLife. This is unlikely to change in the near future since checking the headers requires more overhead at the simulator level.<br />
<br />
You may find that some web servers return either a null or a nonsensical result when [[llHTTPRequest]] is used, even though the same URL in a PC web browser returns the expected result. This may be due to the fact that the [[llHTTPRequest]] User Agent string is not recognised by some web servers as it does not contain "Mozilla", which would identify it as a web browser instead of, for example, a Shoutcast or an RSS client. A workaround is to append " HTTP/1.0\nUser-Agent: LSL Script (Mozilla Compatible)\n\n" or similar to the URL string, which will kludge the HTTP request to look like it originates from a web browser. This is also true when the PHP relays on $_COOKIE. Neither can the function [[llHTTPRequest]] set a cookie nor can the event [[http_request]] retrieve them.<br />
<br />
CGI environments may place the headers into variables by capitalizing the entire name, replacing dashes with underscores, and prefixing the name with "HTTP_", e.g. "HTTP_X_SECONDLIFE_OBJECT_NAME". PHP $_SERVER variables do this as well.<br />
<br />
Apache can include the headers in its logs, using the CustomLog and LogFormat directives. See [http://httpd.apache.org/docs/2.0/mod/mod_log_config.html#formats the docs] for details on the syntax.<br />
<br />
|mode<br />
|deprecated<br />
|permission<br />
|cat1=HTTP<br />
|cat2=XML-RPC<br />
|cat3=Communications<br />
|cat4=HTTP/Client<br />
}}</div>Draconis Neurocamhttps://wiki.secondlife.com/w/index.php?title=LlHTTPRequest&diff=1200452LlHTTPRequest2016-06-13T21:20:33Z<p>Draconis Neurocam: Updated to a non deprecated PHP function.</p>
<hr />
<div>{{LSL_Function<br />
|func=llHTTPRequest<br />
|func_id=230<br />
|func_energy=10.0<br />
|func_sleep=0.0<br />
|func_desc=Sends an HTTP request to the specified URL with the body of the request and parameters. <br />
|sort=HTTPRequest<br />
|func_footnote=<br />
|return_type=key|return_subtype=handle<br />
|return_text=identifying the HTTP request made.<br />
|p1_type=string|p1_name=url|p1_desc=A valid HTTP/HTTPS URL.<br />
|p2_type=list|p2_subtype=instructions|p2_name=parameters|p2_desc=configuration parameters, specified as HTTP_* flag-value pairs<br />
[ parameter1, value1, parameter2, value2, . . . parameterN, valueN]<br />
|p3_type=string|p3_name=body|p3_desc=Contents of the request.<br />
|constants={{LSL_Constants_HTTP}}<br />
{{LSL_Constants/HTTP_Headers}}<br />
|spec<br />
|caveats=<br />
*If there is a space in '''url''', the [[http_response]] status code will be 499.<br />
*The corresponding [[http_response]] event will be triggered in all scripts in the [[prim]], not just in the requesting script.<br />
*Requests must fully complete after 60 seconds, or else the response will be thrown away and the [[http_response]] status code will be 499.<br />
*The response body is limited to 2048 bytes by default, see [[HTTP_BODY_MAXLENGTH]] above to increase it. If the response is longer, it will be truncated.<br />
*Cannot be used to load textures or images from the internet, for more information see [[Web Textures]].<br />
*If the accessed site is relying on the LSL script to report L$ transactions, then it '''must''' check the X-SecondLife-Shard header to see if the script is running on the beta grid.<br />
* Some servers will return a 405 error if you send POST to a file that can't accept metadata, such as a text or HTML file. Make sure you use the GET method to ensure success in any environment.<br />
* While the HTTP status code from the server is provided to the script, redirect codes such as 302 will result in the redirect being automatically and transparently followed ONLY IF the [[HTTP_METHOD]] is GET, with the resulting response being returned. If the [[HTTP_METHOD]] is anything other then GET then you'll get back an http_response with a status code of 302, but without any way to view the headers, you can't know where you were being redirected to unless that was also included in the body.<br />
* The following applies when making a request to a script using HTTP-In:<br />
**When appending a query string to a cap URL there '''MUST''' be a trailing slash between the cap guid and the query string token <code>"?"</code>. For example: [https://sim3015.aditi.lindenlab.com:12043/cap/a7717681-2c04-e4ac-35e3-1f01c9861322?arg=gra {{HoverTextStyle|style=color:green;|<nowiki>https://sim3015.aditi.lindenlab.com:12043/cap/a7717681-2c04-e4ac-35e3-1f01c9861322</nowiki>|2={{String|x-script-url}} = {{String|https://sim3015.aditi.lindenlab.com:12043/cap/a7717681-2c04-e4ac-35e3-1f01c9861322}}}}?{{HoverTextStyle|style=color:red;|1=arg=gra|2={{String|x-query-string}} = {{String|1=arg=gra}}}}] will return a 500 HTTP status {{Wikipedia|List_of_HTTP_status_codes#5xx_Server_Error|Server Error code}}, but [https://sim3015.aditi.lindenlab.com:12043/cap/a7717681-2c04-e4ac-35e3-1f01c9861322/?arg=gra {{HoverTextStyle|style=color:green;|<nowiki>https://sim3015.aditi.lindenlab.com:12043/cap/a7717681-2c04-e4ac-35e3-1f01c9861322</nowiki>|2={{String|x-script-url}} = {{String|https://sim3015.aditi.lindenlab.com:12043/cap/a7717681-2c04-e4ac-35e3-1f01c9861322}}}}{{HoverTextStyle|style=color:blue;|/|2={{String|x-path-info}} = {{String|/}}}}?{{HoverTextStyle|style=color:red;|1=arg=gra|2={{String|x-query-string}} = {{String|1=arg=gra}}}}] will succeed.<br />
* X-SecondLife-Owner-Name may return "(Loading...)" instead of owner name (still true, 18th of July, 2011)<br />
* Requests made at approx 0625 SLT may fail with a 503 status code, with "ERROR: The requested URL could not be retrieved", and "(111) Connection refused" in the body of the response. This has been confirmed as expected behaviour by Kelly, due to the nightly maint & log rotation. It does reliably impact object to object HTTP at that time, and quite probably may impact object to/from web around the same time. The interruption in service is fairly brief, and the precise timing may vary as LL adjust their nightly maint processes, or due to server load.<br />
* Use HTTP_MIMETYPE to set the Content-Type header. Attempts to use HTTP_CUSTOM_HEADER to set it will cause a runtime script error.<br />
<br />
'''Throttles'''<br />
<br />
The LSL function llHTTPRequest() is throttled in two ways: by prim and owner. All group-owned objects are considered together in the same throttle.<br />
<br />
The current limits are 25 requests in 20 seconds for each object, and 1000 in 20 seconds for each owner. These may change in the future if needed to prevent problems in regions.<br />
<br />
It is possible for a large collection of objects or scripts to make many calls to llHTTPRequest() and reach this throttle. When a script calls llHTTPRequest() with the throttle blocking the request, it will return NULL_KEY.<br />
<br />
The calling script must check for the NULL_KEY result and react properly for the script and object to function correctly. Some things to consider:<br />
<br />
* Pause further requests until the throttle clears<br />
* Do not make any additional llHTTPRequest() calls until enough time has passed for the throttle to reset. They will fail and continue to return NULL_KEY otherwise.<br />
* Once reached, the throttles will remain in effect as long as requests continue, but will clear if there is a silent period with no requests at least twice the throttle interval, in this case 2 * 20 or 40 seconds.<br />
<br />
Consider how a group of objects behaves. Developers must consider how multiple objects will interact and how that will affect clearing the throttle.<br />
<br />
The llHTTPRequest() throttle is most likely to be an issue with a large number of objects in a region making requests. To clear the throttle fastest, when an object encounters the throttle, it should broadcast a region-wide chat message to other objects informing them of the event and stopping their requests. If those objects continue making requests, those requests will fail and just prolong recovery.<br />
<br />
If an object waits and still gets a failure, it may be a good idea to increase the time before the next request and/or add a small random value to the wait time. This may help prevent failures caused by large groups of objects acting nearly in unison.<br />
<br />
<br />
* Object requests are throttled at approximately 25 requests per 20 seconds. This is to support a sustained rate of 1 per second or a max burst of up to 25 every 40 seconds (2x the interval for max burst), smaller bursts are recommended. <br />
**[[NULL_KEY]] is returned if the request is throttled.<br />
***See [http://forums-archive.secondlife.com/139/72/108960/1.html this thread] and [http://forums-archive.secondlife.com/139/2c/109571/1.html this thread] for older details.<br />
<br />
<br />
|examples=<br />
<source lang="lsl2"><br />
key http_request_id;<br />
<br />
default<br />
{<br />
state_entry()<br />
{<br />
http_request_id = llHTTPRequest("url", [], "");<br />
}<br />
<br />
http_response(key request_id, integer status, list metadata, string body)<br />
{<br />
if (request_id != http_request_id) return;// exit if unknown<br />
<br />
vector COLOR_BLUE = <0.0, 0.0, 1.0>;<br />
float OPAQUE = 1.0;<br />
<br />
llSetText(body, COLOR_BLUE, OPAQUE);<br />
}<br />
}<br />
</source><br />
<br />
Example PHP test script:<br />
<source lang="php"><br />
<?php header("content-type: text/plain; charset=utf-8"); ?><br />
Headers received:<br />
<?php<br />
<br />
/**<br />
* @author Wouter Hobble<br />
* @copyright 2008<br />
*/<br />
<br />
foreach ($_SERVER as $k => $v)<br />
{<br />
if( substr($k, 0, 5) == 'HTTP_')<br />
{<br />
print "\n". $k. "\t". $v;<br />
}<br />
}<br />
?><br />
</source><br />
<br />
example wrapper script Both capturing apache headers and global methodes<br />
<source lang="php"><br />
<?PHP<br />
// Author Waster Skronski.<br />
// General Public License (GPL).<br />
// Mind that some headers are not included because they're either useless or unreliable.<br />
<br />
$USE_APACHE_HEADERS = TRUE;// switch to false if you need cgi methods<br />
<br />
if ($USE_APACHE_HEADERS)<br />
{<br />
$headers = apache_request_headers();<br />
$objectgrid = $headers["X-SecondLife-Shard"];<br />
$objectname = $headers["X-SecondLife-Object-Name"];<br />
$objectkey = $headers["X-SecondLife-Object-Key"];<br />
$objectpos = $headers["X-SecondLife-Local-Position"];<br />
$ownerkey = $headers["X-SecondLife-Owner-Key"];<br />
$ownername = $headers["X-SecondLife-Owner-Name"];<br />
$regiondata = $headers["X-SecondLife-Region"];<br />
$regiontmp = explode ("(",$regiondata); // cut cords off<br />
$regionpos = explode (")",$regiontmp[1]);<br />
$regionname = substr($regiontmp[0],0,-1); // cut last space from simname<br />
} else {<br />
$db = $GLOBALS;<br />
$headers = $db['$_ENV'];<br />
$objectgrid = $headers["HTTP_X_SECONDLIFE_SHARD"];<br />
$objectname = $headers["HTTP_X_SECONDLIFE_OBJECT_NAME"];<br />
$objectkey = $headers["HTTP_X_SECONDLIFE_OBJECT_KEY"];<br />
$ownerkey = $headers["HTTP_X_SECONDLIFE_OWNER_KEY"];<br />
$objectpos = $headers["HTTP_X_SECONDLIFE_LOCAL_POSITION"];<br />
$ownername = $headers["HTTP_X_SECONDLIFE_OWNER_NAME"];<br />
$regiondata = $headers["HTTP_X_SECONDLIFE_REGION"];<br />
$regiontmp = explode ("(",$regiondata);<br />
$regionpos = explode (")",$regiontmp[1]);<br />
$regionname = substr($regiontmp[0],0,-1);<br />
}<br />
?><br />
</source><br />
<br />
Example wrapper script for GoDaddy.com Linux PHP servers (fix made by Thomas Conover):<br />
<br />
<source lang="php"><br />
// FETCH HEADERS START<br />
<br />
<br />
if (!function_exists('apache_request_headers'))<br />
{<br />
function apache_request_headers() {<br />
foreach($_SERVER as $key=>$value) {<br />
if (substr($key,0,5)=="HTTP_") {<br />
$key=str_replace(" ","-",ucwords(strtolower(str_replace("_"," ",substr($key,5)))));<br />
$out[$key]=$value;<br />
}else{<br />
$out[$key]=$value;<br />
}<br />
}<br />
return $out;<br />
}<br />
}<br />
// Mind that some headers are not included because they're either useless or unreliable. X-Secondlife-Local-Position<br />
$headers = apache_request_headers();<br />
$objectgrid = $headers["X-Secondlife-Shard"];<br />
$objectname = $headers["X-Secondlife-Object-Name"];<br />
$objectkey = $headers["X-Secondlife-Object-Key"];<br />
$objectpos = $headers["X-Secondlife-Local-Position"];<br />
$ownerkey = $headers["X-Secondlife-Owner-Key"];<br />
$ownername = $headers["X-Secondlife-Owner-Name"];<br />
$regiondata = $headers["X-Secondlife-Region"];<br />
$regiontmp = explode ("(",$regiondata); // cut cords off<br />
$regionname = substr($regiontmp[0],0,-1); // cut last space from simname<br />
$regiontmp = explode (")",$regiontmp[1]);<br />
$regionpos = $regiontmp[0];<br />
<br />
<br />
// FETCH HEADERS END<br />
</source><br />
<br />
<br />
<div style="display:none;"><source lang="lsl2"></source></div><br />
|helpers<br />
|also_header<br />
|also_events={{LSL DefineRow||[[http_response]]}}<br />
|also_functions={{LSL DefineRow||[[llEscapeURL]]}}<br />
{{LSL DefineRow||[[llHTTPResponse]]}}<br />
{{LSL DefineRow||[[llUnescapeURL]]}}<br />
|also_articles={{LSL DefineRow||[[Simulator IP Addresses]]}}<br />
|also_footer<br />
|notes=If for some reason while using the function [[llHTTPRequest]] or the event [[http_response]] you are unable to parse a known good RSS feed or some other form of web contents, you will need to work around it outside of SecondLife. This is unlikely to change in the near future since checking the headers requires more overhead at the simulator level.<br />
<br />
You may find that some web servers return either a null or a nonsensical result when [[llHTTPRequest]] is used, even though the same URL in a PC web browser returns the expected result. This may be due to the fact that the [[llHTTPRequest]] User Agent string is not recognised by some web servers as it does not contain "Mozilla", which would identify it as a web browser instead of, for example, a Shoutcast or an RSS client. A workaround is to append " HTTP/1.0\nUser-Agent: LSL Script (Mozilla Compatible)\n\n" or similar to the URL string, which will kludge the HTTP request to look like it originates from a web browser. This is also true when the PHP relays on $_COOKIE. Neither can the function [[llHTTPRequest]] set a cookie nor can the event [[http_request]] retrieve them.<br />
<br />
CGI environments may place the headers into variables by capitalizing the entire name, replacing dashes with underscores, and prefixing the name with "HTTP_", e.g. "HTTP_X_SECONDLIFE_OBJECT_NAME". PHP $_SERVER variables do this as well.<br />
<br />
Apache can include the headers in its logs, using the CustomLog and LogFormat directives. See [http://httpd.apache.org/docs/2.0/mod/mod_log_config.html#formats the docs] for details on the syntax.<br />
<br />
|mode<br />
|deprecated<br />
|permission<br />
|cat1=HTTP<br />
|cat2=XML-RPC<br />
|cat3=Communications<br />
|cat4=HTTP/Client<br />
}}</div>Draconis Neurocamhttps://wiki.secondlife.com/w/index.php?title=Template:LSL_Constants/HTTP_Headers&diff=1200451Template:LSL Constants/HTTP Headers2016-06-13T21:09:02Z<p>Draconis Neurocam: Added descriptions.</p>
<hr />
<div>{{{!}} class="sortable" {{Prettytable}}<br />
{{!}}+Headers sent by the simulator in the course of calling [[llHTTPRequest]].<br />
{{!}}-{{Hl2}}<br />
! NoWrap {{!}} Header<br />
! Description<br />
! class="unsortable" {{!}} Example data<br />
{{!}}- <br />
{{!}} NoWrap {{!}} {{#if:{{{lower-case|}}}|connection|Connection}}<br />
{{!}} Connection options <br />
{{!}} close<br />
{{!}}- <br />
{{!}} NoWrap {{!}} {{#if:{{{lower-case|}}}|cache-control|Cache-Control}}<br />
{{!}} Maximum response age accepted.<br />
{{!}} max-age=259200<br />
{{!}}- <br />
{{!}} NoWrap {{!}} {{#if:{{{lower-case|}}}|x-forwarded-for|X-Forwarded-For}}<br />
{{!}} Used to show the IP address connected to through proxies.<br />
{{!}} 127.0.0.1<br />
{{!}}- <br />
{{!}} NoWrap {{!}} {{#if:{{{lower-case|}}}|via|Via}}<br />
{{!}} Shows the recipients and protocols used between the User Agent and the server. <br />
{{!}} 1.1 sim10115.agni.lindenlab.com:3128 (squid/2.7.STABLE9)<br />
{{!}}- <br />
{{!}} NoWrap {{!}} {{#if:{{{lower-case|}}}|content-length|Content-Length}}<br />
{{!}} The size of the entity-body, in decimal number of octets.<br />
{{!}} 17<br />
{{!}}- <br />
{{!}} NoWrap {{!}} {{#if:{{{lower-case|}}}|pragma|Pragma}}<br />
{{!}} The message should be forwarded to the server, even if it has a cached version of the data.<br />
{{!}} no-cache<br />
{{!}}- <br />
{{!}} NoWrap {{!}} {{#if:{{{lower-case|}}}|x-secondlife-shard|X-SecondLife-Shard}}<br />
{{!}} The environment the object is in. "Production" is the main grid and "Testing" is the preview grid<br />
{{!}} Production<br />
{{!}}- <br />
{{!}} NoWrap {{!}} {{#if:{{{lower-case|}}}|x-secondlife-region|X-SecondLife-Region}}<br />
{{!}} The name of the region the object is in, along with the global coordinates of the region's south-west corner<br />
{{!}} Jin Ho (264448, 233984)<br />
{{!}}- <br />
{{!}} NoWrap {{!}} {{#if:{{{lower-case|}}}|x-secondlife-owner-name|X-SecondLife-Owner-Name}}<br />
{{!}} {{LSLGC|Avatar/Name|Legacy name}} of the owner of the object<br />
{{!}} Zeb Wyler<br />
{{!}}- <br />
{{!}} NoWrap {{!}} {{#if:{{{lower-case|}}}|x-secondlife-owner-key|X-SecondLife-Owner-Key}}<br />
{{!}} {{HoverLink|UUID|Universally Unique Identifier}} of the owner of the object<br />
{{!}} NoWrap {{!}} 01234567-89ab-cdef-0123-456789abcdef<br />
{{!}}- <br />
{{!}} NoWrap {{!}} {{#if:{{{lower-case|}}}|x-secondlife-object-name|X-SecondLife-Object-Name}}<br />
{{!}} The name of the object containing the script<br />
{{!}} Object<br />
{{!}}- <br />
{{!}} NoWrap {{!}} {{#if:{{{lower-case|}}}|x-secondlife-object-key|X-SecondLife-Object-Key}}<br />
{{!}} The key of the object containing the script<br />
{{!}} NoWrap {{!}} 01234567-89ab-cdef-0123-456789abcdef<br />
{{!}}- <br />
{{!}} NoWrap {{!}} {{#if:{{{lower-case|}}}|x-secondlife-local-velocity|X-SecondLife-Local-Velocity}}<br />
{{!}} The velocity of the object<br />
{{!}} 0.000000, 0.000000, 0.000000<br />
{{!}}- <br />
{{!}} NoWrap {{!}} {{#if:{{{lower-case|}}}|x-secondlife-local-rotation|X-SecondLife-Local-Rotation}}<br />
{{!}} The rotation of the object containing the script<br />
{{!}} 0.000000, 0.000000, 0.000000, 1.000000<br />
{{!}}- <br />
{{!}} NoWrap {{!}} {{#if:{{{lower-case|}}}|x-secondlife-local-position|X-SecondLife-Local-Position}}<br />
{{!}} The position of the object within the region<br />
{{!}} (173.009827, 75.551231, 60.950001)<br />
{{!}}-<br />
{{!}} NoWrap {{!}} {{#if:{{{lower-case|}}}|user-agent|User-Agent}}<br />
{{!}} The user-agent header sent by LSL Scripts. Contains Server version.<br />
{{!}} Second Life LSL/16.05.24.315768 (<nowiki>http://secondlife.com</nowiki>)<br />
{{!}}-<br />
{{!}} NoWrap {{!}} {{#if:{{{lower-case|}}}|content-type|Content-Type}}<br />
{{!}} The media type of the entity body.<br />
{{!}} text/plain; charset=utf-8<br />
{{!}}-<br />
{{!}} NoWrap {{!}} {{#if:{{{lower-case|}}}|accept-charset|Accept-Charset}}<br />
{{!}} Acceptable character sets from the server. Q being the quality expected when sending the different character sets.<br />
{{!}} utf-8;q=1.0, *;q=0.5 <br />
{{!}}-<br />
{{!}} NoWrap {{!}} {{#if:{{{lower-case|}}}|accept|Accept}}<br />
{{!}} Media types the server will accept.<br />
{{!}} text/*, application/xhtml+xml, application/atom+xml, application/json, application/xml, application/llsd+xml, application/x-javascript, application/javascript, application/x-www-form-urlencoded, application/rss+xml<br />
{{!}}-<br />
{{!}} NoWrap {{!}} {{#if:{{{lower-case|}}}|accept-encoding|Accept-Encoding}}<br />
{{!}} Acceptable content encodings for the server.<br />
{{!}} deflate, gzip<br />
{{!}}-<br />
{{!}} NoWrap {{!}} {{#if:{{{lower-case|}}}|host|Host}}<br />
{{!}} The internet host being requested.<br />
{{!}} <nowiki>secondlife.com</nowiki><br />
{{!}}- <br />
{{!}}- class="sortbottom" <br />
{{!}} colspan="3" {{!}} <sup><br />
*CGI environments may place the headers into variables by capitalizing the entire name, replacing dashes with underscores, and prefixing the name with "HTTP_", e.g. "{{#if:{{{lower-case|}}}|x-secondlife-object-name|X-SecondLife-Object-Name}}" becomes "HTTP_X_SECONDLIFE_OBJECT_NAME".<br />
*HTTP header names are case insensitive [http://www.w3.org/Protocols/rfc2616/rfc2616-sec4.html#sec4.2]. Some ISPs may modify the case of header names, as was seen in {{JIRA|BUG-5094}}.<br />
</sup><br />
{{!}} style="display:none;" {{!}}<br />
{{!}} style="display:none;" {{!}}<br />
{{!}}}</div>Draconis Neurocamhttps://wiki.secondlife.com/w/index.php?title=Template:LSL_Constants/HTTP_Headers&diff=1200448Template:LSL Constants/HTTP Headers2016-06-13T03:30:57Z<p>Draconis Neurocam: Updated the headers sent by the SL Server</p>
<hr />
<div>{{{!}} class="sortable" {{Prettytable}}<br />
{{!}}+Headers sent by the simulator in the course of calling [[llHTTPRequest]].<br />
{{!}}-{{Hl2}}<br />
! NoWrap {{!}} Header<br />
! Description<br />
! class="unsortable" {{!}} Example data<br />
{{!}}- <br />
{{!}} NoWrap {{!}} {{#if:{{{lower-case|}}}|connection|Connection}}<br />
{{!}} <br />
{{!}} close<br />
{{!}}- <br />
{{!}} NoWrap {{!}} {{#if:{{{lower-case|}}}|cache-control|Cache-Control}}<br />
{{!}} <br />
{{!}} max-age=259200<br />
{{!}}- <br />
{{!}} NoWrap {{!}} {{#if:{{{lower-case|}}}|x-forwarded-for|X-Forwarded-For}}<br />
{{!}} <br />
{{!}} 127.0.0.1<br />
{{!}}- <br />
{{!}} NoWrap {{!}} {{#if:{{{lower-case|}}}|via|Via}}<br />
{{!}} <br />
{{!}} 1.1 sim10115.agni.lindenlab.com:3128 (squid/2.7.STABLE9)<br />
{{!}}- <br />
{{!}} NoWrap {{!}} {{#if:{{{lower-case|}}}|content-length|Content-Length}}<br />
{{!}} <br />
{{!}} 17<br />
{{!}}- <br />
{{!}} NoWrap {{!}} {{#if:{{{lower-case|}}}|pragma|Pragma}}<br />
{{!}} <br />
{{!}} no-cache<br />
{{!}}- <br />
{{!}} NoWrap {{!}} {{#if:{{{lower-case|}}}|x-secondlife-shard|X-SecondLife-Shard}}<br />
{{!}} The environment the object is in. "Production" is the main grid and "Testing" is the preview grid<br />
{{!}} Production<br />
{{!}}- <br />
{{!}} NoWrap {{!}} {{#if:{{{lower-case|}}}|x-secondlife-region|X-SecondLife-Region}}<br />
{{!}} The name of the region the object is in, along with the global coordinates of the region's south-west corner<br />
{{!}} Jin Ho (264448, 233984)<br />
{{!}}- <br />
{{!}} NoWrap {{!}} {{#if:{{{lower-case|}}}|x-secondlife-owner-name|X-SecondLife-Owner-Name}}<br />
{{!}} {{LSLGC|Avatar/Name|Legacy name}} of the owner of the object<br />
{{!}} Zeb Wyler<br />
{{!}}- <br />
{{!}} NoWrap {{!}} {{#if:{{{lower-case|}}}|x-secondlife-owner-key|X-SecondLife-Owner-Key}}<br />
{{!}} {{HoverLink|UUID|Universally Unique Identifier}} of the owner of the object<br />
{{!}} NoWrap {{!}} 01234567-89ab-cdef-0123-456789abcdef<br />
{{!}}- <br />
{{!}} NoWrap {{!}} {{#if:{{{lower-case|}}}|x-secondlife-object-name|X-SecondLife-Object-Name}}<br />
{{!}} The name of the object containing the script<br />
{{!}} Object<br />
{{!}}- <br />
{{!}} NoWrap {{!}} {{#if:{{{lower-case|}}}|x-secondlife-object-key|X-SecondLife-Object-Key}}<br />
{{!}} The key of the object containing the script<br />
{{!}} NoWrap {{!}} 01234567-89ab-cdef-0123-456789abcdef<br />
{{!}}- <br />
{{!}} NoWrap {{!}} {{#if:{{{lower-case|}}}|x-secondlife-local-velocity|X-SecondLife-Local-Velocity}}<br />
{{!}} The velocity of the object<br />
{{!}} 0.000000, 0.000000, 0.000000<br />
{{!}}- <br />
{{!}} NoWrap {{!}} {{#if:{{{lower-case|}}}|x-secondlife-local-rotation|X-SecondLife-Local-Rotation}}<br />
{{!}} The rotation of the object containing the script<br />
{{!}} 0.000000, 0.000000, 0.000000, 1.000000<br />
{{!}}- <br />
{{!}} NoWrap {{!}} {{#if:{{{lower-case|}}}|x-secondlife-local-position|X-SecondLife-Local-Position}}<br />
{{!}} The position of the object within the region<br />
{{!}} (173.009827, 75.551231, 60.950001)<br />
{{!}}-<br />
{{!}} NoWrap {{!}} {{#if:{{{lower-case|}}}|user-agent|User-Agent}}<br />
{{!}} The user-agent header sent by LSL Scripts. Contains Server version.<br />
{{!}} Second Life LSL/16.05.24.315768 (<nowiki>http://secondlife.com</nowiki>)<br />
{{!}}-<br />
{{!}} NoWrap {{!}} {{#if:{{{lower-case|}}}|content-type|Content-Type}}<br />
{{!}} <br />
{{!}} text/plain; charset=utf-8<br />
{{!}}-<br />
{{!}} NoWrap {{!}} {{#if:{{{lower-case|}}}|accept-charset|Accept-Charset}}<br />
{{!}} <br />
{{!}} utf-8;q=1.0, *;q=0.5 <br />
{{!}}-<br />
{{!}} NoWrap {{!}} {{#if:{{{lower-case|}}}|accept|Accept}}<br />
{{!}} <br />
{{!}} text/*, application/xhtml+xml, application/atom+xml, application/json, application/xml, application/llsd+xml, application/x-javascript, application/javascript, application/x-www-form-urlencoded, application/rss+xml<br />
{{!}}-<br />
{{!}} NoWrap {{!}} {{#if:{{{lower-case|}}}|accept-encoding|Accept-Encoding}}<br />
{{!}} <br />
{{!}} deflate, gzip<br />
{{!}}-<br />
{{!}} NoWrap {{!}} {{#if:{{{lower-case|}}}|host|Host}}<br />
{{!}} <br />
{{!}} <nowiki>secondlife.com</nowiki><br />
{{!}}- <br />
{{!}}- class="sortbottom" <br />
{{!}} colspan="3" {{!}} <sup><br />
*CGI environments may place the headers into variables by capitalizing the entire name, replacing dashes with underscores, and prefixing the name with "HTTP_", e.g. "{{#if:{{{lower-case|}}}|x-secondlife-object-name|X-SecondLife-Object-Name}}" becomes "HTTP_X_SECONDLIFE_OBJECT_NAME".<br />
*HTTP header names are case insensitive [http://www.w3.org/Protocols/rfc2616/rfc2616-sec4.html#sec4.2]. Some ISPs may modify the case of header names, as was seen in {{JIRA|BUG-5094}}.<br />
</sup><br />
{{!}} style="display:none;" {{!}}<br />
{{!}} style="display:none;" {{!}}<br />
{{!}}}</div>Draconis Neurocamhttps://wiki.secondlife.com/w/index.php?title=Template:LSL_Constants_HTTP&diff=1200447Template:LSL Constants HTTP2016-06-13T02:53:25Z<p>Draconis Neurocam: Added acceptable MIME TYPES from reading the headers of an HTTP Request.</p>
<hr />
<div>{{#if:<br />
<br />
{{LSL Function/boolean|verify|if=*|td=the server SSL certificate must be verifiable using one of the standard certificate authorities|fd=any server SSL certificate will be accepted.}}<br />
<br />
{{LSL Function/boolean|noisy|if=*|td=shout error messages to DEBUG_CHANNEL if the outgoing request rate exceeds the server limit|fd=the error messages are suppressed.}}<br />
<br />
{{LSL Function/boolean|send_header|if=when|td=the {{String|Pragma: no-cache}} header is sent|fd=no {{String|Pragma}} header is sent.}}<br />
<br />
{{#vardefine:p_method_hover|A valid HTTP method, such as {{String|GET}}, {{String|POST}}, {{String|PUT}} and {{String|DELETE}}}}<br />
<br />
{{#vardefine:p_name_hover|The name of the header to be set.}}<br />
{{#vardefine:p_value_hover|The value of the header to be set.}}<br />
<br />
{{#vardefine:p_length_hover|The maximum length allowed for an HTTP body, this is also capped by the VM in use.}}<br />
<br />
{{#vardefine:p_MIME_type_hover|}}<br />
<br />
}}{{{!}} class="sortable" {{Prettytable|style=margin-top:0;}}<br />
{{!}}-{{Hl2}}<br />
! '''Flag'''<br />
! title="Value" {{!}}<br />
! class="unsortable" {{!}} '''Parameter(s)'''<br />
! class="unsortable" {{!}} '''Default Parameter Value(s)'''<br />
! class="unsortable" {{!}} '''Description'''<br />
{{!}}-<br />
{{!}} {{LSL Const|HTTP_METHOD|integer|0}}<br />
{{!}} {{#var:value}}<br />
{{!}} <nowiki>[</nowiki>[[string]]&nbsp;{{LSL Param|method}}<nowiki>]</nowiki><br />
{{!}} <nowiki>[</nowiki>"GET"<nowiki>]</nowiki><br />
{{!}} "GET", "POST", "PUT" and "DELETE"<br />
{{!}}-<br />
{{!}} {{LSL Const|HTTP_MIMETYPE|integer|1}}<br />
{{!}} {{#var:value}}<br />
{{!}} <nowiki>[</nowiki>[[string]]&nbsp;{{LSL Param|MIME_type}}<nowiki>]</nowiki><br />
{{!}} <nowiki>[</nowiki>"text/plain;charset=utf-8"<nowiki>]</nowiki><br />
{{!}} text/* MIME types should specify a charset. To emulate HTML forms use application/x-www-form-urlencoded. This allows you to set the body to a properly escaped ([[llEscapeURL]]) sequence of &lt;name,value&gt; pairs in the form var=value&amp;var2=value2 and have them automatically parsed by web frameworks.<br />
;Accepted MIME types are: <br />
: <nowiki>"text/application/xhtml+xml"</nowiki><br />
: <nowiki>"text/application/atom+xml"</nowiki><br />
: <nowiki>"text/application/json"</nowiki><br />
: <nowiki>"text/application/xml"</nowiki><br />
: <nowiki>"text/application/llsd+xml"</nowiki><br />
: <nowiki>"text/application/x-javascript"</nowiki><br />
: <nowiki>"text/application/javascript"</nowiki><br />
: <nowiki>"text/application/x-www-form-urlencoded"</nowiki><br />
: <nowiki>"text/application/rss+xml"</nowiki> <br />
{{!}}-<br />
{{!}} {{LSL Const|HTTP_BODY_MAXLENGTH|integer|2}}<br />
{{!}} {{#var:value}}<br />
{{!}} <nowiki>[</nowiki>[[integer]]&nbsp;{{LSL Param|length}}<nowiki>]</nowiki><br />
{{!}} <nowiki>[</nowiki>{{BytesHover|2048}}<nowiki>]</nowiki><br />
{{!}} Sets the maximum (UTF-8 encoded) byte length of the HTTP response body. The maximum that can be set depends upon which VM is used.<br />
* '''[[Mono]] Max:''' {{BytesHover|16384}}<br />
* '''[[LSO]] Max:''' {{BytesHover|4096}}<br />
{{!}}-<br />
{{!}} {{LSL Const|HTTP_VERIFY_CERT|integer|3}}<br />
{{!}} {{#var:value}}<br />
{{!}} <nowiki>[</nowiki>[[integer]]&nbsp;{{LSL Param|verify}}<nowiki>]</nowiki><br />
{{!}} <nowiki>[</nowiki>[[TRUE]]<nowiki>]</nowiki><br />
{{!}} If [[TRUE]], the server SSL certificate must be verifiable using one of the standard certificate authorities{{Footnote|A list of acceptable certificate authorities can be found at {{Jira|SCR-473}}.|A list of acceptable certificate authorities can be found at SCR-473.}} when making HTTPS requests. If [[FALSE]], any server SSL certificate will be accepted.<br />
{{!}}-<br />
{{!}} {{LSL Const|HTTP_VERBOSE_THROTTLE|integer|4}}<br />
{{!}} {{#var:value}}<br />
{{!}} <nowiki>[</nowiki>[[integer]]&nbsp;{{LSL Param|noisy}}<nowiki>]</nowiki><br />
{{!}} <nowiki>[</nowiki>[[TRUE]]<nowiki>]</nowiki><br />
{{!}} If [[TRUE]], shout error messages to [[DEBUG_CHANNEL]] if the outgoing request rate exceeds the server limit. If [[FALSE]], the error messages are suppressed (llHTTPRequest will still return [[NULL_KEY]]).<br />
{{!}}-<br />
{{!}} {{LSL Const|HTTP_CUSTOM_HEADER|integer|5}}<br />
{{!}} {{#var:value}}<br />
{{!}} <nowiki>[</nowiki>[[string]]&nbsp;{{LSL Param|name}}, [[string]]&nbsp;{{LSL Param|value}}<nowiki>]</nowiki><br />
{{!}} NA<br />
{{!}} Add an extra custom HTTP header to the request. The first string is the name of the parameter to change, e.g. "Pragma", and the second string is the value, e.g. "no-cache". Up to 8 custom headers may be configured per request, and each header's combined name+value length must be no greater than 253 characters. Note that certain headers, such as the default headers, are blocked for security reasons.<br />
{{!}}-<br />
{{!}} {{LSL Const|HTTP_PRAGMA_NO_CACHE|integer|6}}<br />
{{!}} {{#var:value}}<br />
{{!}} <nowiki>[</nowiki>[[integer]]&nbsp;{{LSL Param|send_header}}<nowiki>]</nowiki><br />
{{!}} <nowiki>[</nowiki>[[TRUE]]<nowiki>]</nowiki><br />
{{!}} Sends "Pragma: no-cache" header ([[TRUE]]), or does not send a "Pragma" header ([[FALSE]]).<br />
{{!}}}</div>Draconis Neurocamhttps://wiki.secondlife.com/w/index.php?title=LlGetAgentInfo_Test&diff=1200292LlGetAgentInfo Test2016-06-01T02:07:34Z<p>Draconis Neurocam: Display LSL correctly</p>
<hr />
<div>[LLGetAgentInfoTest]<br />
<br />
[VERSION] 0.1<br />
<br />
[LENGTH] 00:30<br />
<br />
[TESTERS] 1<br />
<br />
[OVERVIEW] This test has been designed to test the functionality of the llGetAgentInfo LSL <br />
function.<br />
<br />
[SETUP] 1 tester, Rezzable Sim with telehub, and another Sim bordering it. Also a sim to Teleport to.<br />
<br />
[*]<br />
<br />
[0010] Remove all your Attachments and Scripted Attachments (Right Click Yourself > Take <br />
Off > Detach All)<br />
<br />
[0020] Locate youself in a Telehub Sim, on the border with another sim but don't cross <br />
over.<br />
<br />
[0030] Right-click on the ground, then select CREATE and rez a default cube prim called <br />
agentinfo in the sim you are in.<br />
<br />
[0040] Right-click on the Cube, then select Edit.<br />
<br />
[0050] In the Edit Window, select the Content Tab.<br />
<br />
[0060] In the Content Window, Click "New Script"<br />
<br />
[0070] In the Script window, copy and paste the following script replacing any original <br />
script and then select "Save". Wait for it to compile and save, Then Close Script Window.<br />
<br />
[SCRIPT] llGetAgentInfoScript<br />
<br />
[0080] Verify "New Script" appears in the Contents List<br />
<br />
[0090] Close the Edit Window<br />
<br />
[*]<br />
<br />
[0100] Press the "Home" Key (or "F" with Chat Button turned off) to Enable Flying.<br />
<br />
[0110] Verify you hear AGENT_FLYING and AGENT_IN_AIR started.<br />
<br />
[0120] Fly around a little bit but do Not leave the sim, approach the Prim and land close <br />
by it.<br />
<br />
[0130] Verify you hear AGENT_FLYING and AGENT_IN_AIR ended.<br />
<br />
[0140] Press the "PG UP" Key (or "E" with Chat Button turned off) to Jump.<br />
<br />
[0150] Verify you hear AGENT_IN_AIR started only when you jump.<br />
<br />
[0160] Verify you hear AGENT_IN_AIR ended only when you land from jump.<br />
<br />
[0170] Right-click on the ground, then select CREATE and Rez a cube called nonscript, <br />
Right Click on it Select More > Attach > Left Hand<br />
<br />
[0180] Verify you hear AGENT_ATTACHMENT started<br />
<br />
[0190] Right-click on the ground, then select CREATE and Rez a cube, call it scriptprim.<br />
<br />
[0200] Right-click on the Cube, then select Edit.<br />
<br />
[0210] In the Edit Window, select the Content Tab.<br />
<br />
[0220] In the Content Window, Click "New Script"<br />
<br />
[0230] In the Script window select "Save". Wait for it to compile and save, Then Close <br />
Script Window.<br />
<br />
[0240] Verify "New Script" appears in the Contents List<br />
<br />
[0250] Close the Edit Window<br />
<br />
[0260] Right Click on this scriptprim, Select More > Attach > Right Hand<br />
<br />
[0270] Verify you hear AGENT_SCRIPTED started<br />
<br />
[0280] Click View > Mouselook (or Press M with Chat Button turned off)<br />
<br />
[0290] Verify you hear AGENT_MOUSELOOK started<br />
<br />
[0300] Leave Mouselook<br />
<br />
[0310] Verify you hear AGENT_MOUSELOOK ended<br />
<br />
[0320] Right click on the land near to the original box and Select "Sit Here".<br />
<br />
[0330] As soon as your sat, Verify you hear AGENT_SITTING started.<br />
<br />
[0340] Click "Stand up" on your screen<br />
<br />
[0350] Verify you hear AGENT_SITTING ended<br />
<br />
[*]<br />
<br />
[NOTE] As your Sitting on Land it should NOT say your sitting on an object too.<br />
<br />
[*]<br />
<br />
[0360] Right-click on the ground, then select CREATE and Rez a cube<br />
<br />
[0370] Right-click on the cube, select "Sit Here"<br />
<br />
[0380] Verify you hear both, AGENT_SITTING and AGENT_ON_OBJECT started.<br />
<br />
[0390] Click Stand up on your screen<br />
<br />
[0380] Verify you hear both, AGENT_SITTING and AGENT_ON_OBJECT ended.<br />
<br />
[0390] Click World Menu and Set Away<br />
<br />
[0400] Verify you hear AGENT_AWAY started<br />
<br />
[0410] Bring yourself back from Away<br />
<br />
[0420] Verify you hear AGENT_AWAY ended<br />
<br />
[0430] Walk around the box abit but dont leave the sim or stop moving<br />
<br />
[0440] Verify you hear AGENT_WALKING started<br />
<br />
[0450] Stop walking<br />
<br />
[0460] Verify you hear AGENT_WALKING ended<br />
<br />
[0470] Type some text in the chat box (so that your avatar does the typing animation)<br />
<br />
[0480] Verify you hear AGENT_TYPING started<br />
<br />
[0490] And when you finish typing<br />
<br />
[0500] Verify you hear AGENT_TYPING ended<br />
<br />
[0510] Press and Hold the "PG Down" (or C with Chat Button turned off)<br />
<br />
[0520] Verify you hear AGENT_CROUCHING started<br />
<br />
[0530] Release the key<br />
<br />
[0540] Verify you hear AGENT_CROUCHING ended<br />
<br />
[0550] Set you Avatar to Busy, Click World, Set Busy (and acknowledge the dialog)<br />
<br />
[0560] Verify you hear AGENT_BUSY started<br />
<br />
[0570] Set you Avatar Not Busy<br />
<br />
[0580] Verify you hear AGENT_BUSY ended<br />
<br />
[0590] Click World > Always Run or Ctrl R<br />
<br />
[0600] Verify you hear AGENT_ALWAYS_RUN started<br />
<br />
[0610] Click World > Always Run or Ctrl R again<br />
<br />
[0620] Verify you hear AGENT_ALWAYS_RUN ended<br />
<br />
[*]<br />
<br />
[NOTE] This LSL Command Should only Work with the agent in the same simulator as the <br />
script.<br />
<br />
[*]<br />
<br />
[0630] Walk a Short Distance across the sim border.<br />
<br />
[0640] Verify you heard AGENT_WALKING started<br />
<br />
[0650] But as soon as you left the sim and stopped walking<br />
<br />
[0660] Verify you heard all the following, AGENT_WALKING, AGENT_SCRIPTED, <br />
AGENT_ATTACHMENTS stopped.<br />
<br />
[0670] Try any method before to get a reation from the script, typing, sitting, busy, flying without crossing the sim border<br />
<br />
[0680] Verify you couldnt get a response from the script.<br />
<br />
[0690] Turn around and walk back towards your start point.<br />
<br />
[0700] Verify you hear the following as you cross the sim border, AGENT_WALKING, <br />
AGENT_SCRIPTED, AGENT_ATTACHMENTS started.<br />
<br />
[0710] Verify when you stop walking you also hear AGENT_WALKING stopped.<br />
<br />
[*]<br />
<br />
[Sit Testing]<br />
<br />
[*]<br />
<br />
[0720] Remove all your Attachments and Scripted Attachments (Right Click Yourself > Take <br />
Off > Detach All)<br />
<br />
[0730] Right-click on the ground, then select CREATE and Rez a cube<br />
<br />
[0740] Right-click on the cube, select "Sit Here"<br />
<br />
[0750] Verify you hear both, AGENT_SITTING and AGENT_ON_OBJECT started.<br />
<br />
[0760] Look in your Inventory > Objects for the Two Prims you just Detatched, one is <br />
called nonscript the other scriptprim, Right Click on nonscript, Select Attach To, Select <br />
Left Hand<br />
<br />
[0770] Verify you hear AGENT_ATTACHMENT started<br />
<br />
[0780] Look in your Inventory > Objects for the Two Prims you just Detatched, one is <br />
called nonscript the other scriptprim, Right Click on scriptprim, Select Attach To, Select <br />
Right Hand<br />
<br />
[0790] Verify you hear AGENT_SCRIPTED started<br />
<br />
[0800] Click View > Mouselook (or Press M with Chat Button turned off)<br />
<br />
[0810] Verify you hear AGENT_MOUSELOOK started<br />
<br />
[0820] Leave Mouselook<br />
<br />
[0830] Verify you hear AGENT_MOUSELOOK ended<br />
<br />
[0840] Click World Menu and Set Away<br />
<br />
[0850] Verify you hear AGENT_AWAY started<br />
<br />
[0860] Bring yourself back from Away<br />
<br />
[0870] Verify you hear AGENT_AWAY ended<br />
<br />
[0880] Type some text in the chat box (so that your avatar does the typing animation)<br />
<br />
[0890] Verify you hear AGENT_TYPING started<br />
<br />
[0900] And when you finish typing<br />
<br />
[0910] Verify you hear AGENT_TYPING ended<br />
<br />
[0920] Press and Hold the "PG Down" (or C with Chat Button turned off)<br />
<br />
[0930] Set you Avatar to Busy, Click World, Set Busy (and acknowledge the dialog)<br />
<br />
[0940] Verify you hear AGENT_BUSY started<br />
<br />
[0950] Set you Avatar Not Busy<br />
<br />
[0960] Verify you hear AGENT_BUSY ended<br />
<br />
[0970] Click World > Always Run or Ctrl R<br />
<br />
[0980] Verify you hear AGENT_ALWAYS_RUN started<br />
<br />
[0990] Click World > Always Run or Ctrl R again<br />
<br />
[1000] Verify you hear AGENT_ALWAYS_RUN ended<br />
<br />
[1010] Remove all your Attachments and Scripted Attachments (Right Click Yourself > Take <br />
Off > Detach All)<br />
<br />
[1020] Verify you hear both AGENT_ATTACHMENTS and AGENT_SCRIPTED ended<br />
<br />
[1030] Click Stand up on your screen<br />
<br />
[1040] Verify you hear both, AGENT_SITTING and AGENT_ON_OBJECT ended.<br />
<br />
[*]<br />
<br />
[Teleporting Out and In]<br />
<br />
[*]<br />
<br />
[1050] With your Attachments still Removed, Teleport Out of the Sim and then Teleport Back <br />
to the Originating Sim.<br />
<br />
[1060] Position yourself in your work area, near the agentinfo prim you created at the <br />
start of the test.<br />
<br />
[1070] Press the "Home" Key (or "F" with Chat Button turned off) to Enable Flying.<br />
<br />
[1080] Verify you hear AGENT_FLYING and AGENT_IN_AIR started.<br />
<br />
[1090] Fly around a little bit but do Not leave the sim, approach the Prim and land close <br />
by it.<br />
<br />
[1100] Verify you hear AGENT_FLYING and AGENT_IN_AIR ended.<br />
<br />
[1110] Press the "PG UP" Key (or "E" with Chat Button turned off) to Jump.<br />
<br />
[1120] Verify you hear AGENT_IN_AIR started only when you jump.<br />
<br />
[1130] Verify you hear AGENT_IN_AIR ended only when you land from jump.<br />
<br />
[1140] Look in your Inventory > Objects for the Two Prims you just Detatched, one is <br />
called nonscript the other scriptprim, Right Click on nonscript, Select Attach To, Select <br />
Left Hand<br />
<br />
[1150] Verify you hear AGENT_ATTACHMENT started<br />
<br />
[1160] Look in your Inventory > Objects for the Two Prims you just Detatched, one is <br />
called nonscript the other scriptprim, Right Click on scriptprim, Select Attach To, Select <br />
Right Hand<br />
<br />
[1170] Verify you hear AGENT_SCRIPTED started<br />
<br />
[1180] Click View > Mouselook (or Press M with Chat Button turned off)<br />
<br />
[1190] Verify you hear AGENT_MOUSELOOK started<br />
<br />
[1200] Leave Mouselook<br />
<br />
[1210] Verify you hear AGENT_MOUSELOOK ended<br />
<br />
[1220] Right click on the land near to the original box and Select "Sit Here".<br />
<br />
[1230] As soon as your sat, Verify you hear AGENT_SITTING started.<br />
<br />
[1240] Click "Stand up" on your screen<br />
<br />
[1250] Verify you hear AGENT_SITTING ended<br />
<br />
[1260] Right-click on the ground, then select CREATE and Rez a cube<br />
<br />
[1270] Right-click on the cube, select "Sit Here"<br />
<br />
[1280] Verify you hear both, AGENT_SITTING and AGENT_ON_OBJECT started.<br />
<br />
[1290] Click Stand up on your screen<br />
<br />
[1300] Verify you hear both, AGENT_SITTING and AGENT_ON_OBJECT ended.<br />
<br />
[1310] Click World Menu and Set Away<br />
<br />
[1320] Verify you hear AGENT_AWAY started<br />
<br />
[1330] Bring yourself back from Away<br />
<br />
[1340] Verify you hear AGENT_AWAY ended<br />
<br />
[1350] Walk around the box abit but dont leave the sim or stop moving<br />
<br />
[1360] Verify you hear AGENT_WALKING started<br />
<br />
[1370] Stop walking<br />
<br />
[1380] Verify you hear AGENT_WALKING ended<br />
<br />
[1390] Type some text in the chat box (so that your avatar does the typing animation)<br />
<br />
[1400] Verify you hear AGENT_TYPING started<br />
<br />
[1410] And when you finish typing<br />
<br />
[1420] Verify you hear AGENT_TYPING ended<br />
<br />
[1430] Press and Hold the "PG Down" (or C with Chat Button turned off)<br />
<br />
[1440] Verify you hear AGENT_CROUCHING started<br />
<br />
[1450] Release the key<br />
<br />
[1460] Verify you hear AGENT_CROUCHING ended<br />
<br />
[1470] Set you Avatar to Busy, Click World, Set Busy (and acknowledge the dialog)<br />
<br />
[1480] Verify you hear AGENT_BUSY started<br />
<br />
[1490] Set you Avatar Not Busy<br />
<br />
[1500] Verify you hear AGENT_BUSY ended<br />
<br />
[1510] Click World > Always Run or Ctrl R<br />
<br />
[1520] Verify you hear AGENT_ALWAYS_RUN started<br />
<br />
[1530] Click World > Always Run or Ctrl R again<br />
<br />
[1540] Verify you hear AGENT_ALWAYS_RUN ended<br />
<br />
[1550] Remove all your Attachments and Scripted Attachments (Right Click Yourself > Take <br />
Off > Detach All)<br />
<br />
[1560] Verify you hear both AGENT_ATTACHMENTS and AGENT_SCRIPTED ended<br />
<br />
[1570] All Done, Clean Up your Workspace.<br />
<br />
[END]<br />
<br />
<br />
[llGetAgentInfoScript]<br />
<br />
<source lang="lsl2"><br />
integer info; <br />
integer lastinfo; <br />
integer diffinfo; <br />
<br />
default <br />
{ <br />
state_entry() <br />
{ <br />
llSetTimerEvent(0.1); <br />
} <br />
<br />
timer() <br />
{ <br />
<br />
lastinfo = info; <br />
info = llGetAgentInfo(llGetOwner()); <br />
<br />
<br />
diffinfo = lastinfo ^ info; <br />
<br />
<br />
if (diffinfo & AGENT_ATTACHMENTS) <br />
{ <br />
if (info & AGENT_ATTACHMENTS) <br />
{ <br />
llSay(0,"AGENT_ATTACHMENTS started"); <br />
} <br />
else <br />
{ <br />
llSay(0,"AGENT_ATTACHMENTS ended"); <br />
} <br />
}<br />
<br />
if (diffinfo & AGENT_AWAY)<br />
{<br />
if (info & AGENT_AWAY) <br />
{ <br />
llSay(0,"AGENT_AWAY started"); <br />
} <br />
else <br />
{ <br />
llSay(0,"AGENT_AWAY ended"); <br />
} <br />
} <br />
<br />
if (diffinfo & AGENT_FLYING) <br />
{ <br />
if (info & AGENT_FLYING) <br />
{ <br />
llSay(0,"AGENT_FLYING started"); <br />
} <br />
else <br />
{ <br />
llSay(0,"AGENT_FLYING ended"); <br />
} <br />
} <br />
<br />
if (diffinfo & AGENT_MOUSELOOK) <br />
{ <br />
if (info & AGENT_MOUSELOOK) <br />
{ <br />
llSay(0,"AGENT_MOUSELOOK started"); <br />
} <br />
else <br />
{ <br />
llSay(0,"AGENT_MOUSELOOK ended"); <br />
} <br />
} <br />
<br />
if (diffinfo & AGENT_WALKING) <br />
{ <br />
if (info & AGENT_WALKING) <br />
{ <br />
llSay(0,"AGENT_WALKING started"); <br />
} <br />
else <br />
{ <br />
llSay(0,"AGENT_WALKING ended"); <br />
} <br />
} <br />
<br />
if (diffinfo & AGENT_SCRIPTED) <br />
{ <br />
if (info & AGENT_SCRIPTED) <br />
{ <br />
llSay(0,"AGENT_SCRIPTED started"); <br />
} <br />
else <br />
{ <br />
llSay(0,"AGENT_SCRIPTED ended"); <br />
} <br />
} <br />
<br />
if (diffinfo & AGENT_SITTING) <br />
{ <br />
if (info & AGENT_SITTING) <br />
{ <br />
llSay(0,"AGENT_SITTING started"); <br />
} <br />
else <br />
{ <br />
llSay(0,"AGENT_SITTING ended"); <br />
} <br />
} <br />
<br />
if (diffinfo & AGENT_ON_OBJECT) <br />
{ <br />
if (info & AGENT_ON_OBJECT) <br />
{ <br />
llSay(0,"AGENT_ON_OBJECT started"); <br />
} <br />
else <br />
{ <br />
llSay(0,"AGENT_ON_OBJECT ended"); <br />
} <br />
} <br />
<br />
if (diffinfo & AGENT_IN_AIR) <br />
{ <br />
if (info & AGENT_IN_AIR) <br />
{ <br />
llSay(0,"AGENT_IN_AIR started"); <br />
} <br />
else <br />
{ <br />
llSay(0,"AGENT_IN_AIR ended"); <br />
} <br />
} <br />
<br />
if (diffinfo & AGENT_TYPING) <br />
{ <br />
if (info & AGENT_TYPING) <br />
{ <br />
llSay(0,"AGENT_TYPING started"); <br />
} <br />
else <br />
{ <br />
llSay(0,"AGENT_TYPING ended"); <br />
} <br />
} <br />
<br />
if (diffinfo & AGENT_CROUCHING) <br />
{ <br />
if (info & AGENT_CROUCHING) <br />
{ <br />
llSay(0,"AGENT_CROUCHING started"); <br />
} <br />
else <br />
{ <br />
llSay(0,"AGENT_CROUCHING ended"); <br />
} <br />
} <br />
<br />
if (diffinfo & AGENT_BUSY) <br />
{ <br />
if (info & AGENT_BUSY) <br />
{ <br />
llSay(0,"AGENT_BUSY started"); <br />
} <br />
else <br />
{ <br />
llSay(0,"AGENT_BUSY ended"); <br />
} <br />
} <br />
<br />
if (diffinfo & AGENT_ALWAYS_RUN) <br />
{ <br />
if (info & AGENT_ALWAYS_RUN) <br />
{ <br />
llSay(0,"AGENT_ALWAYS_RUN started"); <br />
} <br />
else <br />
{ <br />
llSay(0,"AGENT_ALWAYS_RUN ended"); <br />
} <br />
} <br />
} <br />
}<br />
</source><br />
<br />
[[Category:QA Portal]]<br />
[[Category:Quality Assurance]]</div>Draconis Neurocamhttps://wiki.secondlife.com/w/index.php?title=Category:LSL_Username&diff=1196872Category:LSL Username2015-07-05T20:12:38Z<p>Draconis Neurocam: LSL format</p>
<hr />
<div>{{LSL Header}}{{LSLC|}}{{LSLC|Avatar/Name}}<br />
A user's username depends upon what type of account it is:<br />
{| {{Prettytable}}<br />
|- {{Hl2}}<br />
!Type<br />
!Format<br />
|- <br />
| Legacy<br />
| "firstname.lastname"<br />
|-<br />
| Modern<br />
| "firstname"<br />
|}<br />
<br />
<source lang="lsl2">string LegacyToUsername(string legacy)<br />
{<br />
return llDumpList2String(llParseString2List(llToLower(legacy)+" ", [" resident ", " "],[]), ".");<br />
}</source><br />
<br />
See {{LSLGC|Avatar/Name}} for more details.</div>Draconis Neurocamhttps://wiki.secondlife.com/w/index.php?title=Category:LSL_Avatar/Name&diff=1196871Category:LSL Avatar/Name2015-07-05T20:01:51Z<p>Draconis Neurocam: Update LSL syntax</p>
<hr />
<div>{{LSL Header|ml=*}}{{LSLC|}}{{LSLC|Avatar}}[[Category:Display Names]]<br />
{{RightToc}}<br />
===Names===<br />
From an LSL standpoint avatars can have 3 different names.<br />
<br />
{| {{Prettytable}}<br />
! Naming <br />
! {{Hl2}} | Description<br />
! {{Hl2}} | Unique<br />
! {{Hl2}} | Get (in region)<br />
! {{Hl2}} | Request ([[dataserver]])<br />
! {{Hl2}} | [[llSensor]]([[llSensorRepeat|Repeat]]) flags<br />
! {{Hl2}} | {{LSLGC|Detected|detected}} events<br />
|-<br />
! {{Hl2}} | {{LSLGC|Display Name}}<br />
| The name that is displayed on the screen.<br />
| No<br />
| [[llGetDisplayName]]<br />
| [[llRequestDisplayName]]<br />
| [[Display Names/LSL#What about an AGENT_BY_DISPLAY_NAME flag for llSensor?|N/A]]<br />
| {{HoverText|N/A|Use llGetDisplayName in conjunction with llDetectedKey.}}<br />
|-<br />
! {{Hl2}} | {{LSLGC|Username}}<br />
| The name the users logs in with.<br />
| Yes<br />
| [[llGetUsername]]<br />
| [[llRequestUsername]]<br />
| [[AGENT_BY_USERNAME]]<br />
| {{HoverText|N/A|Use llGetUsername in conjunction with llDetectedKey.}}<br />
|-<br />
! {{Hl2}} | {{LSLGC|Legacy Name}}<br />
| An interface predating [[Display Names]].<br />
| Yes<br />
| [[llKey2Name]]<br />
| [[llRequestAgentData]]<br />
| [[AGENT_BY_LEGACY_NAME]]<br />
| [[llDetectedName]]<br />
|}<br />
{| {{Prettytable|style=float: right; margin-top: 0;}}<br />
|+ Name Formats by Account Type<br />
! Naming<br />
! {{Hl2}} | Modern<br />
! {{Hl2}} | Legacy<br />
|-<br />
! {{Hl2}} | Default {{LSLGC|Display Name}}<br />
| "FirstName"<br />
| "FirstName LastName"<br />
|-<br />
! {{Hl2}} | {{LSLGC|Username}}<br />
| "firstname"<br />
| "firstname.lastname"<br />
|-<br />
! {{Hl2}} | {{LSLGC|Legacy Name}}<br />
| "FirstName Resident"<br />
| "FirstName LastName"<br />
|}<br />
<br />
=== Modern and Legacy Accounts ===<br />
* Modern accounts are created by choosing a user name, which consists of one name (no spaces).<br />
* Legacy accounts were created by choosing two names: first and last names. These two names are used together to form the username.<br />
<br />
To maintain compatibility with legacy scripts (that expect two names), modern accounts are given the legacy last name "Resident".<br />
<br />
==== Default Display Name ====<br />
<br />
The default value of the Display Name depends upon the type of the account. For modern accounts, it is the first part of the Legacy Name (without the space and last name "Resident"; this is the same as the Username with capitalization used at registration time preserved). For legacy accounts, it is the full Legacy Name.<br />
<source lang="lsl2"><br />
string agentDefaultName(string agentUsername, string agentLegacyName) {<br />
integer i = llStringLength(agentUsername);<br />
if (i < llStringLength(agentLegacyName)) {<br />
// modern account<br />
return llDeleteSubString(agentLegacyName, i, -1);<br />
} else {<br />
// legacy account<br />
return agentLegacyName;<br />
}<br />
}<br />
</source><br />
<br />
==== Legacy Name to Username ====<br />
<br />
The relationship between the Username and Legacy Name is simple. The Username for a specific Legacy Name is the Legacy Name in lowercase with the space replaced with a period. If the last name of the Legacy Name is "Resident", then the username is just the Legacy Name first name in lowercase (without the last name or the period).<br />
<br />
<source lang="lsl2"><br />
string agentUsername(string agentLegacyName) {<br />
return llDumpList2String(llParseString2List(llToLower(agentLegacyName)+" ", [" resident ", " "],[]), ".");<br />
}</source><br />
<br />
''If a Username is passed into this function instead of a Legacy Name, the Username will still be returned.''<br />
<br />
=== Other names ===<br />
<br />
====Complete Name====<br />
[[Viewer URI Name Space]] apparently also defines something called a Complete Name, which seems to be just the Display Name made unique by appending the Username in parenthesis when the Display Name is not set to its default value (and just the Display Name when it is set to its default value).<br />
<source lang="lsl2"><br />
string agentCompleteName(string agentDisplayName, string agentUsername, string agentLegacyName) {<br />
if (agentDisplayName == agentDefaultName(agentUsername, agentLegacyName)) {<br />
return agentDisplayName;<br />
} else {<br />
return agentDisplayName + " (" + agentUsername + ")";<br />
}<br />
}<br />
</source><br />
<br />
====Web Name====<br />
Some Second Life web pages (e.g., friends online: https://secondlife.com/my/account/friends.php or search results from: http://search.secondlife.com/) seem to return another form of naming similar to the Complete Name. This name is also just the Display Name made unique by appending a unique name in parenthesis when the Display Name is not set to its default value. The difference seems to be that the appended unique value is the default Display Name, instead of the Username, so this name always contains the default Display Name (with the current Display Name prepended).<br />
<source lang="lsl2"><br />
string agentWebName(string agentDisplayName, string agentUsername, string agentLegacyName) {<br />
string agentDefaultName = agentDefaultName(agentUsername, agentLegacyName);<br />
if (agentDisplayName == agentDefaultName) {<br />
return agentDisplayName;<br />
} else {<br />
return agentDisplayName + " (" + agentDefaultName + ")";<br />
}<br />
}<br />
</source><br />
<br />
=== Legacy-Name Only Functions ===<br />
<br />
These functions only take Legacy Names and there are no alternative functions available.<br />
<br />
* [[llCollisionFilter]]<br />
* [[llListen]] - likewise the [[listen]] {{LSLGC|Events|event}} only has a Legacy Name parameter.<br />
<br />
===FAQs===<br />
There are a couple of FAQs that go into much more detail about this:<br />
* LSL FAQ: [[Display Names/LSL]]<br />
* General FAQ: [[Display Names]]</div>Draconis Neurocamhttps://wiki.secondlife.com/w/index.php?title=Json_usage_in_LSL&diff=1196615Json usage in LSL2015-05-21T07:08:47Z<p>Draconis Neurocam: Fixed the language references for highlighting purposes.</p>
<hr />
<div>{{LSL Header|lm=*}}{{LSLC|}}{{LSLC|JSON|*Json usage in LSL}}<br />
==Overview==<br />
[http://www.json.org/ JSON] (JavaScript Object Notation) is a language and architecture independent, lightweight text format used for [http://en.wikipedia.org/wiki/Serialization serializing data structures], much as [http://en.wikipedia.org/wiki/XML XML] does for documents but in a much more compact form. At its most basic level JSON text is merely a string, but one that follows a [http://tools.ietf.org/html/rfc4627 set of rules] in it's construction. These rules allow the encoding, manipulation, storing, transmission and decoding of complex data structures in a terse, readable form. JSON text can be used for interacting with other applications that are json aware and is commonly used for web client-server communications.<br />
<br />
JSON text can also be used to implement [http://en.wikipedia.org/wiki/Object_(computer_science) primitive objects], [http://en.wikipedia.org/wiki/Database databases], complex data structures such as [http://en.wikipedia.org/wiki/Array_data_type multi-dimensional arrays] and [http://en.wikipedia.org/wiki/Associative_array associative arrays], as well as abstract data types such as [http://en.wikipedia.org/wiki/LIFO_(computing) stacks], [http://en.wikipedia.org/wiki/FIFO_(computing) queues] and [http://en.wikipedia.org/wiki/Linked_list linked lists]. Of course, lacking native support in LSL for any of that, such implementations would be somewhat primitive and require coding of the necessary functionality (such as getAllKeys(), getArrayLength(), deleteItem(), as well as iterator operators etc). But these limitations should not stop anyone from considering adding JSON text to their "coding toolbelt", since there are possible benefits such as data encapsulation, lessened memory footprint of lengthy lists, as well as nesting of compound data structures, to name a few.<br />
<br />
An LSL based test script of these functions can be found at [[Json_usage_in_LSL/TestScript]]. The full list of JSON functions can be found at [[:Category:LSL_JSON]].<br />
<br />
==Type Conversions==<br />
<br />
JSON has native data types that differ from [[LSL Types]]. Json Value types can be determined with [[llJsonValueType]]. However, all Values retrieved from Json text will be a [[String]] and may require explicit conversion before being used further (ie ''(float)"3.109000"'' and ''(vector)"<1.00000, 1.00000, 1.00000>"'').<br />
* '''Number''' - [[JSON_NUMBER]] includes both LSL [[Integer]] and [[Float]] types (but '''not''' ''Inf'' and ''NaN'', which must be explicitly converted to [[String]] before encoding). '''''NOTE:''''' [[Float]] values will be converted as per the LSL [[Typecast|string conversion rules]]- to 6 decimal place precision, with padded zeros or rounding used, except within vectors and rotations, where 5 decimal place precision results (ie 6.1 => '''6.100000''' and <1,1,1> => '''"<1.00000, 1.00000, 1.00000>"''').<br />
* '''String''' - [[JSON_STRING]] equivalent to LSL [[String]]. '''''NOTE:''''' The LSL types [[Key]], [[Rotation]], and [[Vector]] will be converted to their String representation when encoded within a Json text, either implicitly using [[llList2Json]] or explicitly before using [[llJsonSetValue]], and are always returned as a [[String]] when retrieved by [[llJsonGetValue]]. LSL strings which both begin and end with "'''\"'''" are interpreted literally as JSON strings, while those without are parsed when converted into JSON.<br />
* '''Array''' - [[JSON_ARRAY]] similar to the LSL [[List]]. This is a bracket-enclosed group of Values which are separated with commas ("''[Value, Value, ... ]''"). The Values are retrieved by use of a zero-based Index ('''''NOTE:''''' Negative indices are '''not''' supported!). A Value may be an Array or an Object, allowing "nesting", and an empty Array ("''[]''") is allowed.<br />
* '''Object''' - [[JSON_OBJECT]] similar to a [[List#Strided_lists|Strided List]] with a stride of 2, this is a curly brace-enclosed group of comma-separated "Key":Value pairs ("''{"Key":Value, "Key":Value, ... }''". The Values are retrieved by use of the "Key", which '''must''' be a String. A Value may be an Array or an Object, allowing "nesting", and an empty Object ("''{}''") is allowed. <br />
* the Boolean constants '''true''' and '''false''' - [[JSON_TRUE]] and [[JSON_FALSE]]. '''''NOTE:''''' These are not to be confused with the LSL [[TRUE]] and [[FALSE]] (which are overloaded integers) and they cannot be directly used in comparative testing (so, instead of ''if(jsonReturn)'', you must use ''if(jsonReturn == JSON_TRUE)''.<br />
* the constant '''null''' - [[JSON_NULL]] which represents an empty, valueless placeholder and has no equivalent in LSL.<br />
* [[JSON_INVALID]] - not a Value as such, but a possible return flag representing a failed operation within a Json text (such as trying to retrieve a Value from a non existent address within the text or attempting to set a Value in an Array with an out of bounds index). This flag should be checked for whenever dealing with unknown Json text and when debugging your own manipulations to avoid erroneous code operation.<br />
<br />
==New LSL Methods==<br />
===Specifying Json Elements===<br />
<br />
[[llJsonGetValue]], [[llJsonValueType]] and [[llJsonSetValue]] each take the same first two arguments:<br />
1. a JSON value in the form of a [[String|string]], and <br />
2. a set of specifiers in the form of a [[List|list]].<br />
[[llJsonSetValue]] additionally takes a third an argument: <br />
3. a JSON value in the form of a [[String|string]]. <br />
<br />
To understand specifiers one must generally understand that JSON data is structured in a [http://en.wikipedia.org/wiki/Nested_set_model nested set model]. LSL's built-in JSON parser uses the supplied "specifiers" list to perform [http://en.wikipedia.org/wiki/Tree_traversal tree traversal] on the nodes of the supplied JSON [http://en.wikipedia.org/wiki/Tree_(data_structure) tree data structure]. A JSON tree may be visualized as a set of hierarchical levels of parents and children. Each level is contained within '''curly braces {for objects, which are lists of members, that are defined as key-value pairs}''' or '''square braces [for arrays of elements, that are defined as single values]'''. <br />
<br />
When JSON is presented in human-readable form, it is traditionally formatted such that the first parent level of organization is indented farthest to the left, and each more deeply-nested child level of organization is indented farther and farther to the right. The left-most level of nodes have no parents, only children. They begin with the very first member that appears after the initial "{" character of the JSON string (if it starts as an object), or the first element that appears after the initial "[" character (if it starts as an array). A node is considered as being a parent only if it has a non-null JSON object or array as its value.<br />
<br />
With that parent-child tree data structure in mind, the specifiers list that you supply in the above functions tell LSL's JSON parser how to [http://en.wikipedia.org/wiki/Tree_(data_structure)#Traversal_methods walk the tree] of the JSON data that you have supplied with the first argument of the function. The first specifier in the list tells the LSL JSON parser which node to walk to first. The next specifier tells it which of that node's children to walk to. Once the LSL parser has "walked" to the last destination node specified by your list of specifiers, it will then perform the function on the JSON value that it finds there. <br />
<br />
If, anywhere along the line, any of the specified nodes do not exist, [[llJsonGetValue]] and [[llJsonValueType]] will almost always return [[JSON_INVALID]]. However there is a rare exception: if any specifier in the list leads to a node that has no characters in its JSON string value, [[JSON_NULL]] will be returned instead of [[JSON_INVALID]]—no matter what might come after it in the specifiers list. For example in:<br />
<br />
<source lang="lsl2"><br />
string example = "{\"parent\":,}"; <br />
string test1 = llJsonGetValue(example,["parent"]);<br />
string test2 = llJsonGetValue(example,["parent","child that doesn't exist","etc."]);<br />
</source> <br />
test1 and test2 will both be [[JSON_NULL]]. <br />
<br />
The same is true for arrays: a specifier pointing to any element of a valid array will return [[JSON_NULL]] anywhere there is no JSON value specified at given position in the array:<br />
<br />
<source lang="lsl2"><br />
string example = "{\"parent\":[ , , , , ]}";<br />
string test1 = llJsonGetValue(example,["parent",2]);<br />
string test2 = llJsonGetValue(example,["parent",1,"child that does not exist","etc."]);<br />
</source><br />
test1 and test2 will also both be [[JSON_NULL]]. <br />
<br />
These types of scenarios may be useful in determining valid JSON paths for the setter: in all the scenarios where [[JSON_NULL]] is returned, the same set of specifiers is able to be successfully used for [[llJsonSetValue]]. However if [[JSON_INVALID]] is returned, there is no guarantee the setter won't return an error.<br />
<br />
For [[llJsonGetValue]], if a JSON value is present at the specified node, it will be returned by the function. The value may an object that contains no valid JSON data, so be careful. Such an object will be deemed a [[JSON_OBJECT]] by [[llJsonValueType]], even if its contents are not valid JSON. Therefore it's always best to check the [[llJsonValueType]] of any specified value to make sure it's valid before using the information in your script. <br />
<br />
<br />
{{LSL Tip|Counter-intuitiveness warning! If there exist multiple members with the same name in the same object at the same child-level, a specifier that points to that name will be interpreted by LSL as pointing to the member closest to the end of the string! This behavior is opposite from the behavior of [[llListFindList]] and [[llSubStringIndex]], which always find the match that is closest to the beginning of the list or string, respectively!}}<br />
<br />
<br />
The specifiers list may only consist of strings/keys (for object member keys), and integers (for array element positions), which define a path to the desired value in a JSON compound object.<br />
<br />
* An empty list specifies the entire Json value.<br />
* If the list is not empty, each element of the list is used to select the element at the same level of nesting in the JSON value:<br />
** if the specifier list element is a string, then the corresponding element in the json value must be an object and the list element selects the value whose JSON name exactly matches the string.<br />
** if the specifier list element is an integer, then the corresponding element in the json value must be an array and the list element is used as a zero-based index into the Json array.<br />
* Additionally llJsonSetValue accepts [[JSON_APPEND]] as a specifier to indicate appending the value to the end of the array at that level. Be careful because If the value at that level is not an array, it will be overwritten and replaced with the array you're setting! <br />
<br />
For example, given the JSON value:<br />
<source lang="javascript"><br />
{<br />
"alpha": 1,<br />
"beta": [<br />
"x",<br />
"y",<br />
"z"<br />
],<br />
"gamma": {<br />
"a": 3.2,<br />
"b": true<br />
}<br />
}<br />
</source><br />
the contents of the string returned would be:<br />
<source lang="lsl2"><br />
llJsonGetValue ( value, [ "alpha" ] ) ⇒ 1<br />
llJsonGetValue ( value, [ "beta" ] ) ⇒ [ "x", "y", "z" ]<br />
llJsonGetValue ( value, [ "beta", 2 ] ) ⇒ z<br />
llJsonGetValue ( value, [ "gamma", "a" ] ) ⇒ 3.2<br />
</source><br />
<br />
llJsonSetValue(string json, list specifiers, string value_to_set) will force the resulting JSON to conform with the specifiers supplied, as long as the specified path is traversable.<br />
<br />
==Json Interrogation and Validation==<br />
<br />
To determine the type of a json value:<br />
<br />
<source lang="lsl2">string type = llJsonValueType( string json, list specifiers );</source><br />
<br />
:returns one of several following special constants (see table below). Each constant has a name, JSON_XXXX, which unlike most LSL constants is not an integer—instead, it's a single-character string. The single character is not printable but has a specific escape value (if run through llEscapeURL) in the range of %EF%B7%90–97. The below table shows each constant's invocation and escape code:<br />
<br />
{{LSL Constants/JSON}}<br />
<br />
==Json to LSL Conversion==<br />
<br />
To directly extract a Json value to an LSL string:<br />
<br />
<source lang="lsl2"><br />
string value = llJsonGetValue( string json, list specifiers );<br />
</source><br />
* ''json'' is a string containing a valid json array or object value<br />
* ''specifiers'' is a list of specifiers (see Specifying Json Elements)<br />
* returns a json string<br />
* if the specifiers do not indicate a value that exists in the input, [[JSON_INVALID]] is returned<br />
<br />
To convert a json compound value (either an array or an object) to an LSL List:<br />
<br />
<source lang="lsl2"><br />
list values = llJson2List( string json );<br />
</source><br />
* ''json'' is a string containing a valid json array or object value<br />
* If the string in json is not a valid json object or array a list with a single item matching the conversion above is returned.<br />
<br />
==Recursive Parsing==<br />
<br />
Since any value in a Json array or object may be any arbitrary type, including an array or object, the parsing methods must handle nested values. Nested arrays or objects are not converted, but remain LSL String values. If an LSL script needs to use the components in such a nested value, it must explicitly pass that string to the appropriate method. For example, the following json value is passed to llJson2List:<br />
<source lang="javascript"><br />
{<br />
"alpha": 1,<br />
"beta": [<br />
"x",<br />
"y",<br />
"z"<br />
],<br />
"gamma": {<br />
"a": 3.2,<br />
"b": true<br />
}<br />
}<br />
</source><br />
The result would be an LSL list with a stride of 2: the first elements of the 3 strides would be "alpha", "beta", and "gamma". The second element of the first stride would be the integer 1, but the second elements of the other two strides would be LSL strings containing the json representation of the array '[ "x", "y", "z" ]' and object '{ a: 3.2, b: true }' respectively.<br />
<br />
==LSL to Json==<br />
<br />
To convert a list to json:<br />
<source lang="lsl2"><br />
string json = llList2Json( string type, list values );<br />
</source><br />
* ''type'' must be either [[JSON_ARRAY]] or [[JSON_OBJECT]]<br />
* ''values'' is the list to be converted to json.<br />
<br />
:Produces an LSL String containing a Json compound value, either an array or an object depending on type, containing the values in the input list. <br />
<br />
:If type is [[JSON_ARRAY]], the list may contain values of any LSL type; they are converted as described in Type Conversions above. <br />
<br />
:If type is [[JSON_OBJECT]], the list must have a stride of 2. The first value of each stride must be a string. The second value of each stride may be any LSL type, and are converted as described in Type Conversions above. [[JSON_INVALID]] is returned if the stride is not 2.<br />
<br />
:[[JSON_INVALID]] is returned if any other string or json type is specified as the type.<br />
<br />
To directly set a Json value within a string:<br />
<source lang="lsl2"><br />
string jsonresult = llJsonSetValue( string json, list specifiers, string value );<br />
</source><br />
* ''json'' is a string containing a valid json array or object value<br />
* ''specifiers'' is a list of specifiers (see [[#Specifying Json Elements]])<br />
* ''value'' the value to be inserted into the specified place in json<br />
* Returns the newly modified json string<br />
<br />
:The only failure mode for llJsonSetValue is if an array index is specified in specifiers that is negative (but not [[JSON_APPEND]]) or more greater than the list size. In all other cases the json is modified so that the set can succeed. For example if an integer is specified for a level that is an object, the object will be removed completely and replaced with an array. If the object key does not exist it will be added, and [[JSON_APPEND]] or an index one larger than the last item in an array can be used to append to an array. These features are to allow building a Json string with llJsonSetValue.<br />
<br />
==Recursive Construction of Compound Json Values==<br />
<br />
Since LSL does not support nested lists, the construction method may only be used to convert a single level; to create a Json array or object whose values are nested arrays or objects, the LSL script must first construct the nested values and then pass those values as strings to another construction method call. For example, to construct the Json value:<br />
<source lang="javascript"><br />
{<br />
"alpha": 1,<br />
"beta": [<br />
"x",<br />
"y",<br />
"z"<br />
],<br />
"gamma": {<br />
"a": 3.2,<br />
"b": true<br />
}<br />
}<br />
</source><br />
The following sequence could be used:<br />
<source lang="lsl2"><br />
string gamma_value = llList2Json( JSON_OBJECT, [ "a", 3.2, "b", JSON_TRUE ] );<br />
string beta_value = llList2Json( JSON_ARRAY, [ "\"x\"", "\"y\"", "\"z\"" ] );<br />
string value = llList2Json( JSON_OBJECT,[ "alpha", 1, "beta", beta_value, "gamma", gamma_value ] );<br />
</source><br />
or the equivalent without the intermediate variables:<br />
<source lang="lsl2"><br />
string value =<br />
llList2Json( JSON_OBJECT,<br />
["alpha", 1,<br />
"beta", llList2Json( JSON_ARRAY, [ "\"x\"", "\"y\"", "\"z\"" ] ),<br />
"gamma", llList2Json( JSON_OBJECT, [ "a", 3.2, "b", JSON_TRUE ] )]<br />
);<br />
</source><br />
<br />
'''''NOTE''''' the use of the '''JSON_TRUE''' constant in the above to obtain the bare word 'true' for the value of ["gamma", "b"]. If one had used the LSL constant TRUE, they would've incorrectly obtained an integer '1'. The same applies for 'false'. Do not use the LSL TRUE or FALSE constants, use the correct JSON_* type constants or the LSL strings "true" or "false". For the JSON value 'null', either use the LSL constant '''JSON_NULL''' or the LSL string "null".<br />
<br />
<br />
==Limitations==<br />
* Json support in LSL does not support all the escape codes specified in [http://www.ietf.org/rfc/rfc4627.txt RFC 4627]. Instead, behavior for escape codes is consistent with general LSL string behavior: [[String#Escape_Codes]].</div>Draconis Neurocamhttps://wiki.secondlife.com/w/index.php?title=Talk:LlCastRay&diff=1196274Talk:LlCastRay2015-04-25T21:53:50Z<p>Draconis Neurocam: /* Simplification function for use. */</p>
<hr />
<div>== Why isn't this using the sensor API? ==<br />
<br />
# The sensor API already exists and has well understood behavior.<br />
# The sensor API resolves many of the problems people have brought up, such as list length and range.<br />
# The sensor API is asynchronous.<br />
# Creating new APIs when there are already viable existing ones leads to Mainframe-itis.<br />
# This would be an opportunity to add a result filter variant to the llSensor() family...<br />
<br />
llCastRay(string name, key id, integer type, float range, vector path, integer request_mask);<br />
<br />
Eg:<br />
<br />
llCastRay("", "", AGENT|ACTIVE|PASSIVE, 32, <1, 0, 0>, SENSOR_POSITION);<br />
<br />
/...<br />
<br />
sensor(integer n)<br />
{<br />
integer i;<br />
for(i = 0; i < n; i++)<br />
llSay(0, "Ping at "+(string)llDetectedPos(i));<br />
}<br />
<br />
-- [[User:Argent Stonecutter|Argent Stonecutter]] 11:53, 7 July 2010 (UTC)<br />
<br />
:I think somewhere Falcon said not doing it like sensors was intentional in order to get the data the moment the command is run instead of having to wait for an event, i don't remember seeing an explanation why this was a better approach though.<br />
:Btw, how would the normal of the hit(s) be reported? A new llDetected* function? Perhaps this would be an opportunity to introduce list llDetected(integer index, list what), this way future llDetected* functions can be easily prototyped without needing to actually implement a whole new command in the server (you know, like with the primitive params stuff)<br />
:ps: talking about normals and llDetected* i would like to plug [http://jira.secondlife.com/browse/SVC-3369 SVC-3369] "llDetectedCollisions* (similar to llDetectedTouch*)" , mind taking a look Falcon?<br />
--[[User:TigroSpottystripes Katsu|TigroSpottystripes Katsu]] 12:46, 7 July 2010 (UTC)<br />
<br />
:This was not done like the sensor API because it's not really all that similar to sensors. Unfortunately I don't have time to get into a discussion of why the API you're suggesting would be problematic, but if you read the history of this feature (SVC-5389), I hope you'll begin to see where I'm coming from.<br />
:Tigro, Sorry, I'm backlogged for a month at this point, so I don't think I'll be able to look at that soon. :) In general, I'm looking at this feature right now only because it affects a huge audience and is way, way overdue. Oh, and because I'm a physics guy and it's a physics feature more than anything else. :P<br />
<br />
[[User:Falcon Linden|Falcon Linden]] 03:34, 8 July 2010 (UTC)<br />
<br />
::SVC-5389 is about download problems. Do you mean SVC-5381? There's a couple of notes about sensors being "heavy", but not really any explanation of why they're "heavy". The only heavy feature of sensors is that it calculates and returns more information than you're asking for, and the request_mask would take care of that... and would open up the possibility of adding the same kind of masking to existing sensor calls. In terms of scripting, sensors are in many ways lighter because you're not having to pass around (and copy) lists.<br />
<br />
:: There's some comments about speed of response, but also about having to throttle it to once per frame. I think the sensor API would make that less of an issue. -- [[User:Argent Stonecutter|Argent Stonecutter]] 20:09, 11 July 2010 (UTC)<br />
<br />
::: I'm undecided about use of the [[sensor]]() event. The main reason being that many of the cases where I see this function being used for simple AI behaviours you are almost certainly going to be calling [[llCastRay]]() from within the sensor() event, so having to then cache the original sensor data and wait for the second event is incredibly messy. On the other hand, I do agree that it does feel a lot like a special case of sensor so it would make sense to use the event, allowing with suitable <code>llDetected*()</code> functions for the extra data such as [https://jira.secondlife.com/browse/SVC-1432 llDetectedNormal()] which is another long overdue function.<br/>-- '''[[User:Haravikk_Mistral|Haravikk]]''' <sup><small>([[User_talk:Haravikk_Mistral|talk]]|[[Special:Contributions/Haravikk_Mistral|contribs]])</small></sup> 11:15, 22 October 2010 (UTC)<br />
<br />
== llSonar please? ==<br />
<br />
I would appreciate if you took in consideration my suggestions at http://jira.secondlife.com/browse/SVC-2486 please; any feedback is more than welcome. <br />
<br />
ps:llCastRay is already awesome, you rock! Please try the hardest you can to figure out how to get this to come to the maingrid with the least crippling as possible.<br />
<br />
--[[User:TigroSpottystripes Katsu|TigroSpottystripes Katsu]] 03:01, 3 July 2010 (UTC)<br />
<br />
Hi Tigro,<br />
<br />
If I understand your feature request, it sounds much like the shape cast described in SVC-5381 (http://jira.secondlife.com/browse/SVC-5381) for a sphere or a cylinder cast along its primary axis. Is that correct?<br />
<br />
Thanks,<br />
[[User:Falcon Linden|Falcon Linden]]<br />
<br />
: I have just skimmed thru the comments there, do shape casting allow for somthing liek for example have a nonphys object recognize the geometry so it could rest against a jumbled pile of prims as if it was laying against them physicly? (in the ASCII art in SVC-2486 it would be having the object represented by the O's resting in the diagonal line as if it was solid) --[[User:TigroSpottystripes Katsu|TigroSpottystripes Katsu]] 05:44, 3 July 2010 (UTC)<br />
<br />
:A practical example, imagine a giant mecha, with big flat feet, now imagine a landscape littered with prims of all sorts of shapes and sizes, to make it look realistic, on each step the foot should be rotated to rest against the highest points under it ; just raycasting you have the risk of shooting between prims, and with shapecast you don't get the rotation for the foot. --[[User:TigroSpottystripes Katsu|TigroSpottystripes Katsu]] 03:04, 4 July 2010 (UTC)<br />
<br />
While I realize that this has been "shelved until further notice", I just wanted to pitch in and say I'd definitely like a shapecast option. I am more interested in this for general "spatial awareness" than for combat purpose, so a shape would be very useful for things like finding the highest point in an area, or checking if openings are big enough to pass through.<br />
<br />
[[User:Tali Rosca|Tali Rosca]] 00:52, 27 September 2010 (UTC)<br />
<br />
== What am I looking at? ==<br />
<br />
A function I just threw in to replace phantom bullets for quickly acquiring a point of interest -- whatever your camera's focused on (in this sim, within 20m) is returned, allowing quicker, more intuitive targeting of other objects. PERMISSION_TRACK_CAMERA must be previously set.<br />
<br />
<lsl>key camPing() {<br />
// End points at the camera and 20m in front of it<br />
vector camPos = llGetCameraPos();<br />
<br />
// Clamp the end position to within the sim<br />
// From an SLUniverse post by Chalice Yao<br />
// http://www.sluniverse.com/php/vb/scripting/46344-llcastray-available-testing-maybe-only.html#post969497<br />
float xSteps;<br />
float ySteps;<br />
vector camRot = llRot2Fwd(llGetCameraRot());<br />
fXSteps = llAbs( ( 256.0 * !!camRot.x ) - camPos.x ) / camRot.x;<br />
fYSteps = llAbs( ( 256.0 * !!camRot.y ) - camPos.y ) / camRot.y;<br />
if(xSteps > ySteps)<br />
xSteps = ySteps;<br />
if ( xSteps > 20.0 )<br />
xSteps = 20.0<br />
<br />
// Cast the ray; ignore hits on land, otherwise get the root key<br />
list contacts = llCastRay( camPos, camPos + ( camRot * xSteps ), <br />
RC_REJECT_LAND,<br />
RC_GET_ROOT_KEY );<br />
<br />
// Return values<br />
if ( llList2Integer( contacts, -1 ) > 0 ) { // Got a return<br />
return llList2Key( contacts, 0 );<br />
}<br />
return NULL_KEY;<br />
}<br />
</lsl><br />
<br />
[[User:Jack Abraham|Jack Abraham]] 06:10, 7 July 2010 (UTC)<br />
<br />
== RC_GET_LINK_NUM? Not RC_GET_LINK_KEY? ==<br />
<br />
I can't think of a circumstance where knowing the link number of the return would be useful. UUID of the prim hit would be far more useful; is that within the realm of possibility? [[User:Jack Abraham|Jack Abraham]] 04:47, 3 July 2010 (UTC)<br />
<br />
Hi Jack,<br />
<br />
The default behavior is to return the UUID of the prim hit. If you want the root key instead, you have to use RC_GET_ROOT_KEY. The intended purpose of RC_GET_LINK_NUM was for scripts like your camera targeting system where it is expected that the camera will be pointed at a child of the linkset performing the cast. For example, suppose you make a minesweeper game where each tile is a prim in the linkset. And suppose you script it so that the use can select a tile by focusing on it and clicking. The script could cast a ray from the camera and determine the link number of the tile in the player's line of sight. Then it could use that link number in an llMessageLinked or some other LSL function to modify the appropriate child prim. Does that make sense? If it turns out no one has any use for RC_GET_LINK_NUM, I'll eliminate it for the sake of simplicity. But the behavior you're looking for is already there by default! Yay.<br />
<br />
Cheers,<br />
[[User:Falcon Linden|Falcon Linden]]<br />
<br />
Makes perfect sense; I need to read better. Thanks. [[User:Jack Abraham|Jack Abraham]] 05:44, 3 July 2010 (UTC)<br />
<br />
== Memory concerns ==<br />
<br />
Dumping all possible avaible information into a list regardless of whether any of them will be used seems severely wasteful. If you really need to dump all the info as soon as the command is called straight into script memory, at least do somthing like adding a parameter to the command that is a list where each item identifies which pieces of information the scripter wants (like with llGetPrimtiveParams ) --[[User:TigroSpottystripes Katsu|TigroSpottystripes Katsu]] 05:51, 3 July 2010 (UTC)<br />
<br />
I think we basically have that, Tigro; we only get UUID and hit position unless we set additional flags. Falcon indicated that we will not get all hits in the final version; that'll further reduce the size of the list. [[User:Jack Abraham|Jack Abraham]] 07:50, 3 July 2010 (UTC)<br />
<br />
== Clamping ==<br />
<br />
It would be a waste of server resources if every script has to add clamping code to make sure<br />
their begin and end are inside the region! Instead, do not return an error code but just stop<br />
and return only the hits inside the region. That might mean you have to add the clamping code in the<br />
server, but that would be a hell of a lot more efficient than doing that in the LSL scripts.<br />
<br />
Note that clamping is relatively easy, in C++ it shouldn't cost more than a few microseconds.<br />
The algorithm would be something like:<br />
<br />
1) A bounding box can be given with two vectors: ''bbmin'' and ''bbmax'', where ''bbmin'' is the bottom,<br />
south/west corner of the sim (0,0,0), and ''bbmax'' the upper, north/east corner of the sim<br />
(256,256,4096).<br />
<br />
2) Let the ray begin at vector ''begin'' and end at vector ''end'' (using the same coordinate system as the bounding box).<br />
<br />
3) Calculate bbmine = bbmin - end, and bbmaxe = bbmax - end. Check if end is outside the sim,<br />
so clamping is needed at all, by checking that at least one coordinate in bbmine is positive<br />
or one coordinate in bbmaxe is negative (set 'clamping_needed').<br />
<br />
4) Shift coordinates so that ''begin'' becomes the origin and ''end'' becomes the direction<br />
(bbmin -= begin; bbmax -= begin; dir = end - begin). Lets call ''end'' ''dir'' from now on.<br />
<br />
5) Check that bbmin has three negative coordinates and ''bbmax'' has three positive coordinates.<br />
If not then ''begin'' is outside the bounding box (if the signs are correct, except there are one or more zeroes, it's on the border<br />
and you can just return ''begin''). Not sure if you should return an error code or return just no results.<br />
Finally, if begin is outside the bounding box, but end was inside, you might want to clamp begin<br />
instead of end. Lets assume that begin is inside the bounding box for now. If end was also inside<br />
it, then no clamping is needed and we stop here.<br />
<br />
6) Clamping is needed. Calculate dir.x / bbmin.x, dir.x / bbmax.x, dir.y / bbmin.y, dir.y / bbmax.y, dir.z / bbmin.z and dir.z / bbmax.z.<br />
<br />
7) Find the largest value 'max' of those six and return ''begin'' + dir / max as the collision point of the ray in the direction dir.<br />
<br />
As you can see, this is a very fast routine. Still, I think it should be added to the server side.<br />
I didn't add code in order to avoid any license problems ;)<br />
<br />
[[User:Aleric Inglewood|Aleric Inglewood]] 12:00, 3 July 2010 (UTC)<br />
<br />
Actually, using SSE2, clamping would take just a few cpu instructions. It's not a question of efficiency for me, it's a question of future compatibility. Since we don't have script versioning for LSL, if we later add the ability to cast rays between sims or change the size of a region, existing scripts will break. I've been thinking of adding a version parameter to this function in order to deal with that possibility, in which case I could clamp in native code.<br />
<br />
Cheers<br />
[[User:Falcon Linden|Falcon Linden]] 17:20, 3 July 2010 (UTC)<br />
<br />
<br />
:Definitely, clamping in native code rather than LSL is very desirable. I'm thinking a version parameter would be best done as a way of accessing old behaviors, similarly to how we have legacy prim types in llSetPrimitiveParams, and optional for the latest version. What do y'allz think?<br />
::--[[User:Michelle Resistance|Michelle Resistance]] 15:37, 8 July 2010 (UTC)<br />
<br />
== return also types casted ==<br />
<br />
since filters RC_REJECT_AGENTS, RC_REJECT_PHYSICAL, RC_REJECT_NONPHYSICAL, and RC_REJECT_LAND are used, and therefore detected, it would be handy if in the results returned, the status AGENT, NON_PHYSICAL, PHYSICAL and LAND would also be returned. Is it douable ?<br />
--<br />
<br />
<br />
I've been thinking about that. Either I'll somehow include the type in the list of returned data (perhaps only if you add the flag RC_GET_TYPE or something) or else modify llGetObjectDetails to return the data. You'll definitely have access one way or the other. Regarding land, though, you can definitively identify that because it will return null UUID.<br />
<br />
[[User:Falcon Linden|Falcon Linden]] 17:20, 3 July 2010 (UTC)<br />
<br />
== Meep ==<br />
<br />
Heya Falcon, really would absolutely love to have an llCastRay function in production.<br />
<br />
I saw you had a concern of versioning issues. To overcome that, I heavily recommend using a list as an input, as that would be far more flexible on the kind of parameters and options you can push through rather than fooling yourself into using a hardcoded structure of llCastRay(vector start, vector end, other stuff) etc. A bit like how llSetPrimitiveParams works basically. For example in the past, LL upgraded the prim type interface from legacy to a more advanced and flexible set of input (torii, tubes and rings, yey), they could do this easily because a list was used as a parameter in the function, instead of having to expend resources on adding more functions, bloating LSL and causing legacy issues.<br />
<br />
I also have a question, when you cast a ray and it hits an avatar, that hits the avatars' actual sphere-ish phys mesh, correct?<br />
<br />
I have actually experimented personally with LSL and my custom client with a prototype LSL Script API, I could offload raycast processing into nearby clients easily and even built a half-working hexapod spider that can walk on a prim landscape, as well as all the fun raycasting combat gun stuff :). So, I have some serious experience to share in this field and having the raycasts locally processed would be really useful in a more timely manner (rather than suffering the delays of network lag).<br />
<br />
What are your thoughts on the kind of filtering? Whitelist versus Blacklist? Whitelists are apparently more effective based on desire. (Would be good for consistency (which is hard enough to come by..): llSensors, llListen, ...)<br />
<br />
On a last note, you might be wondering about my achievement with my custom client, I couldn't get raycasting weapons taking off because there is a missing critical element to gameplay: Tracers. The user of a gun MUST be able to see WHERE their bullets went (guns use fire cone spread algorithms for added realism). This is one of the significant problems that keep raycasting usage in weaponry really taking off. Otherwise I could have seriously introduced raycasting and changed the face of SL combat with my custom client. If only particle systems could be spontaneously created midair (without requiring the particle system to be 'attached' to the prim (it's possible code-wise in the client btw)) via scripts to simulate tracer effects, then raycasting would seriously be able to take off socially.<br />
<br />
--[[User:Nexii Malthus|<span style="color: #bbb; text-shadow:-1px -1px #ddd, 1px 1px #888;">Nexii Malthus</span>]] 02:10, 4 July 2010 (UTC)<br />
<br />
Hi Nexii,<br />
<br />
Let me take these one at a time. First, in regard to versioning, LSL lists are very inefficient on the C++ side. They're implemented as linked lists (yuck). I do see the advantage to using a list for parameters, but it would make parsing it slower and I'd rather pull a Windows API (heh, also yuck) style move and (a) add a reserved version number parameter and (b) if necessary later, create an llCastRayEx function. Not the world's most extensible implementation, but c'est la vie.<br />
<br />
Second, an avatar's shape isn't sphere shaped at all...and it's not a mesh, it's a convex hull. Its basic shape is kind of like a capsule. I'll leave the process of determining its exact shape via llCastRay calls with RC_GET_NORMAL as an exercise to the reader. :) (And if you do it, be sure to post pictures! That would rock.)<br />
<br />
Third, I'm pushing hard for LL to provide client side prediction/client side physics. Although that wouldn't immediately lead to client side scripting, it eventually might. And in the meantime, although open source viewers would need to replace the physics module with an open source version (of which there are plenty), you would have a framework for doing physics-based raycasts locally.<br />
<br />
Fourth, regarding filtering, it just made the most sense to use blacklists as it's most common to want to know "What's the first thing I'm hitting?" It's less common to want to know "what's the first avatar/prim/land triangle that I'm hitting?"<br />
<br />
Finally, after seeing your comment about tracers I looked up the details of llParticleSystem and was astonished to see that, as far as I could tell, you're totally right. Here's one idea as a temporary workaround: rez a transparent, phantom, nonphysical sphere (perfect, solid spheres are the simplest physics shape available) at the location you need your particle effect, create it there, and then call llDie(). It sucks, I know, but I'm not a graphics programmer and can't add an appropriate particle system function. Another idea, though much much less efficient, would be to rez a set of long, colored, phantom cylinders the length of the raycast. It's still much more efficient than prim bullets since it would be nonphysical and phantom, though.<br />
<br />
Hope that helps,<br />
[[User:Falcon Linden|Falcon Linden]] 05:44, 4 July 2010 (UTC)<br />
<br />
<br />
[[File:Avmeshforms.png|256px]]<br />
Rendering of what the standing and ground sitting av shapes are!<br />
--[[User:Moy Loon|Moy Loon]]<br />
: Hahahahah, awesome! :D<br />
: btw, can you repeat this but with a crouching av as well to confirm there is no change when an av crouches please? --[[User:TigroSpottystripes Katsu|TigroSpottystripes Katsu]] 18:35, 24 July 2010 (UTC)<br />
<br />
I already know that crouching avs have no change, The sitting on a prim is different than the ground sit though!<br />
--Moy<br />
<br />
== Function to not fail, what do you think? ==<br />
<br />
I made this:<br />
<br />
<lsl>list JustRayIt(vector start, vector end, integer filter, integer flags)<br />
{<br />
list temp;<br />
<br />
<br />
while((llList2Integer(temp, -1) < 0) || (llGetListLength(temp) == 0))<br />
{<br />
temp = llCastRay(start, end, filter, flags);<br />
<br />
}<br />
<br />
return temp;<br />
}<br />
</lsl><br />
<br />
The idea being to halt the rest of the script until it can get a valid trace; does it work the way i intended it to? Is there any downside to using this? Is there a better way to get the same result? --[[User:TigroSpottystripes Katsu|TigroSpottystripes Katsu]] 04:14, 4 July 2010 (UTC)<br />
<br />
Hi Tigro,<br />
<br />
The script you're suggesting would, sadly, be hugely inefficient. It would hog system resources until the script's time slice ran out. And, to make matters worse, once you fail you're guaranteed not succeed until at least the next frame anyway. I'm not a huge lsl scripter, so I'm not 100% sure, but I believe if you added an llSleep(0) call in the while loop, your script would be put to sleep until the next frame. Failing that, try llSleep(0.1) or some other small number.<br />
<br />
Good luck,<br />
[[User:Falcon Linden|Falcon Linden]] 05:29, 4 July 2010 (UTC)<br />
<br />
:The way it is on the Oatmeals, do tracing ever fail in the frame? --[[User:TigroSpottystripes Katsu|TigroSpottystripes Katsu]] 05:40, 4 July 2010 (UTC)<br />
:Also, doesn't llSleep hog systems resources just the same? --[[User:TigroSpottystripes Katsu|TigroSpottystripes Katsu]] 05:44, 4 July 2010 (UTC)<br />
<br />
On Oatmeal, casts will fail if the overall physics FPS drops too low. It will never fail due to too many raycasts in the same frame, however. In production it will, but I wanted to see how people used it before determining appropriate limits.<br />
<br />
llSleep stops execution of your script and allows the simulator to move on to processing another script. It is not implemented as a busy-wait. (At least, I sure hope not. I haven't actually checked the code.)<br />
<br />
[[User:Falcon Linden|Falcon Linden]] 05:50, 4 July 2010 (UTC)<br />
<br />
: How about this version?<br />
<lsl><br />
list JustRayIt(vector start, vector end, integer filter, integer flags)<br />
{<br />
list temp;<br />
<br />
<br />
while((llList2Integer(temp, -1) < 0) || (llGetListLength(temp) == 0))<br />
{<br />
llSleep(0);<br />
temp = llCastRay(start, end, filter, flags);<br />
<br />
}<br />
if(llGetListLength(temp) == 1)<br />
temp = [NULL_KEY,end, llVecNorm(end-start), 0];<br />
<br />
return temp;<br />
}<br />
</lsl><br />
: It got the sleep as you suggested, and if it doesn't hit anything in range it still returns a key, a hit position, a normal (so it kinda works like a telescopic feeler, when not reaching anythign it eventually stops at maximum extension with no deflection), while still keeping llList2Integer(theraylist, -1) == 0<br />
--[[User:TigroSpottystripes Katsu|TigroSpottystripes Katsu]] 19:43, 7 July 2010 (UTC)<br />
:Ok, i finally managed to get it to wrok right, i think, but hsould i keep posting here clogging the talk page?<br />
<br />
== Partially offtopic: about SVC-4606 "Surface conveyour belt" ==<br />
<br />
Falcon, if it's not you, could you please bring [http://jira.secondlife.com/browse/SVC-4606 SVC-4606] to the attention of whatever Linden that would be able to evaluate it and get it in the plans if it's possible please? (If it's you, then please take a look and see what you can do) --[[User:TigroSpottystripes Katsu|TigroSpottystripes Katsu]] 04:43, 4 July 2010 (UTC)<br />
<br />
I have thought about adding a much, much simpler version of this (where you simply get to specify a velocity vector and a face of the prim), but it would be at least a little tricky to implement and there are a number of things of more general use that I'd like to get to first. Some day, though, it would be a great feature.<br />
[[User:Falcon Linden|Falcon Linden]] 05:51, 4 July 2010 (UTC)<br />
<br />
:If the server already knows about which face collided and things like the normal of the collision point (and of course the texture parameters of the prim), wouldn't it be just a matter of basic vector math to get the resulting force and stuff? I imagine this could be a game changer close to the scale of flexies, people moving around a mall on flat conveyors like those on some airports, working escalators, more realistic wheeled and tracked vehicle behavior, people will find all sorts of uses for it. Is there somewhere i can see the stuff you got planned? --[[User:TigroSpottystripes Katsu|TigroSpottystripes Katsu]] 06:01, 4 July 2010 (UTC)<br />
<br />
I'm about to head out (it IS a Saturday night here, haha), so this is probably my last post, at least for a few hours, probably until tomorrow. The problem is related to stability and details about determining which objects to apply the force to and how. In the physics engine, this would be done by modifying the contact points between the conveyor belt and the other bodies. Also, the server doesn't really know which face collided, which makes it trickier still, as that info would have to be derived dynamically any time a body came in contact with the conveyor belt object. Finally, it would almost certainly break avatar animations which rely on the avatar's velocity (not the requested motion of the user) to determine when to play a particular animation. Unfortunately, I don't have a publicly visible list of projects I'd like to complete. But they do include llCastRay (yay progress!), llCastShape (see SVC-5389...I think...the raycast SVC, exposing the Havok vehicle kit, providing for alternative physics representation (so that the shape you see isn't tied to the shape the physics engine sees, allowing simpler collision geometry), providing control of friction, density, restitution, and gravity, ... the list goes on. Please bear in mind, however, that there is absolutely no guarantee any of these will be shipped as they are mostly unscheduled it isn't clear what LL's priorities will be in the coming months. Oh, and of course, given the opportunity, I'd put all of these ideas aside to work on client side prediction which would have HUGE impact on lag, although it wouldn't provide much in the way of new resident-facing features.<br />
<br />
Have a good night,<br />
[[User:Falcon Linden|Falcon Linden]] 06:24, 4 July 2010 (UTC)<br />
<br />
That partial list of projects is, like, my wishlist as an LSL scripter. You're my new favorite Linden. ^_^;<br />
--[[User:Michelle Resistance|Michelle Resistance]] 15:44, 8 July 2010 (UTC)<br />
<br />
::Some of those are among the feature suggestions i've filled on pjira :)<br />
::Falcon rocks indeed!! --[[User:TigroSpottystripes Katsu|TigroSpottystripes Katsu]] 16:10, 8 July 2010 (UTC)<br />
<br />
== selfignoring? ==<br />
<br />
Is there a way to have the raytrace ignore prims in the same linkset? --[[User:TigroSpottystripes Katsu|TigroSpottystripes Katsu]] 05:42, 4 July 2010 (UTC)<br />
<br />
No, unfortunately this is not possible and would be hacky to implement (though it could be done if there were enough demand for it). It will, however, always ignore a shape that the ray begins inside of. So if you use llGetPos() from a convex prim, that prim will not be returned by the cast. You can always use the UUID of the prim to ignore the result as well.<br />
<br />
[[User:Falcon Linden|Falcon Linden]] 05:46, 4 July 2010 (UTC)<br />
<br />
I'm not sure if it's too late, but I would really enjoy this, as I'm working on a game where the root prim that sends the raycast is usually in the center (for pivot reasons), and raycast might return the sender UUID a bunch of times. And I don't think raycasts with 5-6 hits is very efficient. I'll experiment a bit with setting phantom or physics for a fraction of a second while the raycast occurs, but in the future a RC_REJECT_SELF or similar would be awesome. --[[User:Jasdac Stockholm|Jasdac Stockholm]] 04:46, 18 September 2011 (PDT)<br />
<br />
== On the topic of limiting it to not work past a distance ==<br />
<br />
It was done with llSensor, and what happened? People wasted server resources to overcome the limitation; you still think it's a good idea? --[[User:TigroSpottystripes Katsu|TigroSpottystripes Katsu]] 08:04, 4 July 2010 (UTC)<br />
<br />
Nope. I don't. But llCastRay isn't artificially limited to a distance. It's simply limited to work within the region. But that isn't an artificial limit, it's a fundamental one: llCastRay uses the physics engine for raycasts. On a given simulator, nothing exists in the physics world outside the region boundaries.<br />
<br />
[[User:Falcon Linden|Falcon Linden]] 09:47, 4 July 2010 (UTC)<br />
<br />
:Hm, sorry, i'm not finding it now, but i could swear i had read you saying somthing along the lines of "you wouldn't want people raycasting from the other side of the sim", dunno... --[[User:TigroSpottystripes Katsu|TigroSpottystripes Katsu]] 09:56, 4 July 2010 (UTC)<br />
<br />
Yes, I did say that. I then proceeded to change my mind. :)<br />
[[User:Falcon Linden|Falcon Linden]] 18:59, 4 July 2010 (UTC)<br />
<br />
::Will llCastRay() at least return objects near the region boundaries, I know some script functions are aware of these but is the physics engine? It'd be nice to have some margin of error for objects crossing region boundaries…<br/>-- '''[[User:Haravikk_Mistral|Haravikk]]''' <sup><small>([[User_talk:Haravikk_Mistral|talk]]|[[Special:Contributions/Haravikk_Mistral|contribs]])</small></sup> 13:21, 8 May 2011 (PDT)<br />
<br />
== Is it a logical bug on my script or does it not update fast enough? ==<br />
<br />
Does the data llCastRay reads from gets update as often as the position and rotation of phys objects or does it get updated less often? I'm mostly confident that the start position is inside the prim but somtimes the trace will hit the prim somehow, it happens more often when the prim is bouncing around fast. --[[User:TigroSpottystripes Katsu|TigroSpottystripes Katsu]] 11:23, 4 July 2010 (UTC)<br />
<br />
That depends on how you're updating the objects. If you're calling llSetPos() or similar in your script, those updates will not be processed until later, whereas the llCastRay call will be processed immediately. I suspect llGetPos() will return the value you set with llSetPos() even though the physics object isn't there yet.<br />
[[User:Falcon Linden|Falcon Linden]] 19:01, 4 July 2010 (UTC)<br />
<br />
== "I'm personally praying that llCastRay will make simulated projectile weapons essentially obsolete in SL. " ==<br />
<br />
I've spent a little time exploring the functionality of llCastRay today. From the perspective of a veteran LL damage combat scripter;<br />
<br />
In terms of raw utility, llCastRay effectively provides the ability to determine a bullet's target without the intervening physics. This is an advantage because it means that traditional region crawl caused by irresponsible people spamming physical objects is significantly reduced. It also means that the number of bullets required to send an individual home is reduced; in the case of the firer being able to aim, of course.<br />
<br />
The function seems more fitted to abstracted combat with meters and script awareness (determining distance to surfaces, etc) however, because it provides a very large volume of data back to the script calling it but does not impact what it is detecting in any way.<br />
While it is possible to build a weapon that uses it for projectiles with traditional LL damage, the benefits do not necessarily outweigh the negatives; it effectively moves the majority of work from the source system to the projectiles instead. Using communications such as listens to transfer a target vector from a gun to a bullet on each rez is obviously absurdly inefficient considering the rates at which most people like to fire them and therefore the cast is better placed in the bullets themselves; this means that the bullets cannot be temporary prior to casting and therefore realistically on rez, although they can simply be set temporary subsequent to casting. Regardless of the method of acquiring the target position, the bullet must still travel to the location to inflict damage; a stacked primparams position is the obvious solution, as it also allows for temponrez and physics to be set in the same call.<br />
<br />
Would it be possible to implement a sister (if somewhat crippled) function to llCastRay that has the capability to inflict LL damage on agents? While I see a great deal of value in llCastRay it is not necessarily preferable to physics as a combat tool. Something along the lines of an llCastDamage which is restricted to cast from the root position of the object calling it along a fixed axis. In a similar manner to a sensor, except with a damage variable similar to the llDamage() prim param setter that affects only the first thing it intersects. Additional fluff could be a contact sound triggered at the point of intersection, contact particles and so forth.<br />
<br />
tested projectile, just for reference:<br />
<lsl><br />
vector xyz(vector in)<br />
{<br />
if (in.x > 255.9) in.x = 255.9;<br />
else if (in.x < 0.1) in.x = 0.1;<br />
if (in.y > 255.9) in.y = 255.9;<br />
else if (in.y < 0.1) in.y = 0.1;<br />
if (in.z > 4095.9) in.z = 4095.9;<br />
else if (in.z < 0.1) in.z = 0.1;<br />
return in;<br />
}<br />
<br />
default<br />
{<br />
state_entry()<br />
{<br />
llCollisionSound("",0.0);<br />
llCollisionSprite("");<br />
llSetDamage(100.0);<br />
}<br />
on_rez(integer s)<br />
{<br />
if (!s) return;<br />
vector p = llGetPos();<br />
vector d = <20.0,0.0,0.0>*llGetRot();<br />
list ray = llCastRay(p,xyz(p+d),0,0);<br />
list tgt = [PRIM_POSITION,llList2Vector(ray,1)];<br />
tgt += tgt += tgt += tgt += tgt += tgt;//1,2,4,8etc<br />
llSetLinkPrimitiveParamsFast(LINK_THIS,[PRIM_TEMP_ON_REZ,TRUE]+tgt+[PRIM_PHYSICS,TRUE]);<br />
llDie();<br />
}<br />
}<br />
</lsl><br />
[[User:Jeremy Duport|Jeremy Duport]] 19:51, 4 July 2010 (UTC)<br />
<br />
== This is *not* a viable replacement for projectiles ==<br />
<br />
llCastRay is a great idea, and I'll make heavy use of it in a wide range of applications, but there's no way it's going to replace scripted bullets in any meaningful way.<br />
<br />
There's just no other way to get a decent visual effect for bullets. Particles are an enormous performance drain on the client [and don't anyone tell me to just get a better machine, I'm a poor student, damnit], and of course look the same from every direction. Scripted bullets are also the only timely way to get a particle effect at unscripted impact locations.<br />
<br />
There's also the problem of communicating effectively between a gun and a scripted target. With combat going on, something like a listen on targets and regionsay from guns is going to trigger zillions of unnecessary events. Sure, *I* know how to properly hash UUIDs to integers, and there's reasonable code for that on this wiki, but have you actually seen the kind of shit most scripters in SL try to pull? Note that people are *still* using resizer scripts in every prim of a linkset and controlling them with linked messages.<br />
<br />
Also, despite being sidetracked by https://jira.secondlife.com/browse/SVC-5953, I'm a week or so of work away from releasing several weapons that trigger bullet rezzes via changed events, rather than by inked messages. Tyro Dreamscape has already successfully demonstrated this method as a near-zero-sim-impact way of squeezing high firing rates of scripted bullets out of as few rezzing scripts as possible. Sure, you could bring up sim garbage collector woes, or my argument from above about the absurdly low coding standards among scripters, but the former has not been an issue in practice, at least with intentionally minimalist bullet scripts, and the latter is something I'm expecting market forces to help with. We *can* do scripted bullets the right way.<br />
<br />
I'd really like someone to prove me wrong. Thoughts?<br />
<br />
--[[User:Michelle Resistance|Michelle Resistance]] 15:55, 5 July 2010 (UTC)<br />
<br />
<br />
Ummm, you do realize that you're still just calling a function in one script, that triggers an event in another, right? Except that where a linked message merely communicates between scripts, the changed() event requires triggering a function that changes some parameter of the other object, so you're asking the simulator to do a small bit of extra unnecessary work in between calling the function and triggering the event.<br />
<br />
You are right that scripted bullets can be done the right way. But the right way doesn't mean reinventing the wheel or creating a Rube Goldberg machine, it requres understanding what the wrong way is, why certain things use extra processing resources, and finding the most effective ways to mitigate those problems. Keep in mind that people have tried to use llResetOtherScript() and actually believed that it was more efficient. It was the same sort of reasoning involved, where someone thought "method A is laggy, therefore method B will be better."<br />
<br />
It is quite possible to make efficient physical projectile weapons. But just because many people are unable to do so does not mean that you need to find some supersekret new method for doing so. It is simply a matter of using good coding practices like KISS. Granted, it's oh so much easier to market something that's new and different, but that doesn't make it so.<br />
<br />
[[User:Jahar Aabye|Jahar Aabye]] 19:24, 5 July 2010 (UTC)<br />
<br />
<br />
Passing data through a changed event, at least the way Tyro and I have been doing it, has far less impact on the sim than the string operations that most people do when communicating between scripts via link messages. Try it, it's rather impressive. And, to dispel concerns that it's just a gimmick, I'll explain exactly what I'm doing and (probably) why it works better.<br />
<br />
I've got a main script and several rezzer "thread" scripts, all in the same prim (they don't need to be, but that's how I'm doing it), a hollow sphere. When a user pulls the trigger (or an automated weapon decides to open fire), llSetColor(<AUTO, timer, aim>) is called [llSetLinkColor also works, though llSetLinkPrimitiveParams and the fast variant don't, as they don't trigger a changed event], where AUTO is a predefined floating-point number identifying that it's a firing order, timer is the argument we want the thread to past to llSetTimerEvent to control the firing rate, and aim is either 1.0 or 0.0, signifying if I'm using the prim's other face to provide additional data about where to aim the bullets (which we can do without triggering a second changed event, if the llSetColor call for the other face is done immediately before or after the firing-order call). This has been significantly more responsive (in LSO, anyhow) than a linked message in all my tests, and can easily support rather egregious firing rates [~25 bullets per second with five threads - well under the goo fence limit, though probably more than you'd want] from many simultaneous users without affecting sim FPS. My team's theory, that led us to try this in the firs place, was that the link_message dispatch code on the sim side is slowed by argument passing and filtering in a way that the changed event is not. That we're only performing floating-point operations when using face color as an argument buffer seems to make the difference. Certainly, one could use the link_message integer parameter to do filtering, and I write all my APIs that way, but it appears the extra overhead of passing string and key arguments, even when not used, is enough to upset the sim when performed at high speed. As a side benefit, using the changed event keeps the rezzer threads from needing link_message handlers, reducing the number of scripts that need to filter out other communication happening in the linkset.<br />
<br />
Hope that allays your concerns. If not, I'll be here all week. ~_^<br />
<br />
--[[User:Michelle Resistance|Michelle Resistance]] 23:06, 5 July 2010 (UTC)<br />
<br />
<br />
::Well yes, you're simply shifting a portion of the load from the VM (which would handle the linked messages) to the Database and Simulator (which are handling the altering of the primitive's parameters and which then triggers the VM's changed() event). This does not make it particularly more efficient, as I mentioned before you still have a function call and an event triggered, you're merely routing it through another method, in this case the simulator, which has to then alert every client within draw/LOD distance as to the nature of the change. I am fully aware of what you are doing and how you are doing it, you are at least the third person in as many years who has mentioned it.<br />
<br />
::Rather than a lecture on how to script guns, I'll simply say that if it works for you, then that's all that matters. There are efficient ways to use linked messages, and there are incredibly inefficient ways to use linked messages. Similarly, I am certain that people will find right ways and wrong ways to handle llRayCast() if it is ever implemented. Incorrect methods will undoubtedly spread through the grapevine with assurances that "this supersekrit way is teh best evar!!!11!!" Market forces have as of yet had minimal effect on poor scripting with regards to guns in SL, I wouldn't expect that to change at any time in the future. As you correctly note, many fashion designers still put resize scripts into every prim of hair.<br />
<br />
::In some respects, I doubt that many amateur gun scriptors will be much different after raycasting than before. It may be less likely to be used by many amateur gun scripters simply because the default LL Damage system is built around physical collisions, and presumably that would remain the same. Also, combat systems that use raycasting would likely require at least a decent understanding LSL or else might use prewritten no-mod scripts to do the raycasting. To that extent, I do worry that raycasting may appear to be more efficient when it debuts on the grid, if only because of self-selection in terms of who is using it and how it is used. This is probably something that should be considered if llCastRay() is ever implemented, as it does have an effect on how to interpret any sort of metrics gathered when trying to determine its relative efficiency compared to bullet-based guns.<br />
<br />
::In the end, it will be one more tool. I would hope that the devs at LL do not really think that this will completely replace physical projectiles, but it is nice to have the option. Similarly, I do hope that people understand that the relative efficiency of various guns on the grid varies wildly, and that the scriptor has a far greater impact on the relative efficiency of a gun than whether it uses physical bullets or llCastRay() when it is implemented.<br />
<br />
[[User:Jahar Aabye|Jahar Aabye]] 00:18, 6 July 2010 (UTC)<br />
::: Latelly i've been using llTarget and not_at_target to have stuff run as fast as the server allows without actually using somthing like while(true) --[[User:TigroSpottystripes Katsu|TigroSpottystripes Katsu]] 00:31, 6 July 2010 (UTC)<br />
:::: In my tests, I've found that LSO loops seem to end up *slower* than repeating events like timers and not_at_target. 'Sweird. --[[User:Michelle Resistance|Michelle Resistance]] 00:47, 6 July 2010 (UTC)<br />
:You could use llRayCast to verify if the aiming hits anyone,and then rez a "bullet", posJump it to the target and make it phys to collide if you wanna use collisions to relay hits. --[[User:TigroSpottystripes Katsu|TigroSpottystripes Katsu]] 23:57, 5 July 2010 (UTC)<br />
<br />
:::Actually, that would probably be the worst of all worlds. You're still rezzing a bullet, still moving it to the target, still making it physical, still colliding it. All of the things that llCastRay() is attempting to prevent. Also, most combat systems that involve collisions limit (or should limit) the minimum velocity of a collision. To get around this, one would probably have to add a call to llApplyImpulse() or something similar. At the end of the day, you wind up with a situation not much better off than just firing a bullet.<br />
<br />
:::llCastRay() is probably best implemented in a combat system in a manner similar to current sensor-based combat systems, which have been around for years. I'm not sure that sensor-based (or raycasting-based) combat is any better or worse than physical bullet-based combat. Each has different tradeoffs, and at the end of the day it's going to come down to how these functions are worked into the system that gets set up. Whether using sensors, raycasting, or bullets, it's all about understanding the strengths and weaknesses of each system, and working with that in mind. Raycasting does have some significant strengths, but only if you take advantage of them. Raycasting, if done correctly, will probably take some load off the physics engine at the possible cost of runtime efficiency and memory. Physical bullet systems are simpler and may have an advantage in terms of runtime efficiency and memory use if done correctly, at the expense of offloading more of the work on the physics engine that has to deal with all of the active objects and the collisions generated.<br />
<br />
[[User:Jahar Aabye|Jahar Aabye]] 00:18, 6 July 2010 (UTC)<br />
<br />
Ahoy folks!<br />
<br />
I don't know enough about the issues in LSL to comment on most of the topics brought up in this thread. But with regard to the issues around the appearance of raycasts vs rezzed bullets, once you use llCastRay, you'll at <i>least</i> be able to set your bullets phantom. This prevents the physics engine from needing to check for collisions with anything but the land. Unfortunately, due to an old bug, collision checks against the ground are still very expensive. We expect to fix this by 1.44 at the latest. Once that's done, phantom bullets will be much more efficient.<br />
<br />
::Phantom bullets would give us the problem of having to inform them somehow of a hit so they can [promptly] self-destruct instead of continuing to pass through things… unless you're suggesting the bullets themselves do llCastRay and short circuit the physics system. That sounds like a terrible hack, though. Shouldn't it be more efficient to let the physics engine do its thing, rather than going through the twisty little passages of LSL VMs? --[[User:Michelle Resistance|Michelle Resistance]] 17:02, 6 July 2010 (UTC)<br />
<br />
Regarding the matter of rezzing a bullet and then using the posjump trick (assuming that refers to the llSetPrimitiveParams hack where you repeatedly set the prim's position in a second call), that will actually be substantially less inefficient in 1.40 (when we finally get it right!). The reason is that in the past, each time you set the prim's position, the physics world would be updated, sometimes many many times in a frame. That is no longer the case (only the final position is actually used).<br />
<br />
::"[[PosJump]]" actually refers to a different >10m movement hack than what you're talking about, which is known as "[[WarpPos]]". PosJump is very much preferable, as the LSL script doesn't have to waste time and memory calculating a series of intermediate steps… but it doesn't work with llSetLinkPrimitiveParamsFast, just the slow variety. --[[User:Michelle Resistance|Michelle Resistance]] 17:02, 6 July 2010 (UTC)<br />
<br />
:::Last i tried it did work with llSetLinkPrimitiveParamsFast, did you test it yourself? --[[User:TigroSpottystripes Katsu|TigroSpottystripes Katsu]] 17:31, 6 July 2010 (UTC)<br />
::::Yes, just a few weeks ago… though now that I think about it, I could have been confusing the issue with that posjump fails when the object is physical. --[[User:Michelle Resistance|Michelle Resistance]] 16:54, 7 July 2010 (UTC)<br />
<br />
And yes, an LSL busy loop (e.g., while(TRUE)) is very, very inefficient. It uses as much of the sim's resources as available until it is cut off for the frame. Even the most inefficient event scheme would probably be better than a busy loop.<br />
<br />
[[User:Falcon Linden|Falcon Linden]] 03:25, 6 July 2010 (UTC)<br />
<br />
::I've found that even a bounded for loop is slower than a timer, in practice. Any idea why this might be? --[[User:Michelle Resistance|Michelle Resistance]] 17:02, 6 July 2010 (UTC)<br />
<br />
In LSO it makes sense that using [[changed]] would be faster than the [[link_message]]. The changed event has one parameter, link_message has four; two of which are strings. It takes more computer time to push a link_message event onto a scripts event queue then it does to push a changed event. It takes more time to copy the values into script memory and trigger the event. Mind you, using [[llSetColor]] this way is going to cause a huge number of updates that the sim will try and send to all users in sight of the weapon. For a long time I thought we need a better comm event, no string, no key, just a list. Than I latched onto C# and the idea of building custom events. -- '''[[User:Strife_Onizuka|Strife]]''' <sup><small>([[User talk:Strife_Onizuka|talk]]|[[Special:Contributions/Strife_Onizuka|contribs]])</small></sup> 16:21, 8 July 2010 (UTC)<br />
<br />
== Possibility to limit list length? ==<br />
<br />
I am concerned about the memory issues posed by this function. It was mentioned above, but not really fleshed out. In order to be useful for a combat perspective, you can't really set any of the flags (that is, it must return all agents and objects) so that you know whether there is a wall or some other barrier between yourself and the target. This means that you can get a potentially very long list with a UUID and vector position for each object hit. This could easily eat up several kb of script memory.<br />
<br />
However, limiting the function to returning the first object hit (as has been mentioned as the possible final version) also removes some potentially interesting uses of this function. For example, you could have a situation where you get one result if it reaches an avatar unimpeded, another if there is a single object between you and the other av, and then no result if there is more than one object.<br />
<br />
Would it be possible to compromise, and add another variable to input into the function to select the total number of objects to return? So you could have: <br />
<br />
list llCastRay(vector start,vector end,integer filters,integer flags,integer num_returned)<br />
<br />
Where num_returned would be the total number of objects hit, starting with the closest. It could be enumerated starting from 0 so as to match the values in the returned list, or from 1 if you would need to use 0 to set it to no limit.<br />
<br />
As for this function making physical projectile combat obsolete, I do not believe that this will happen. I see this as akin to how sculpties have enhanced building: they give builders more options and allow for a greater variety of creative designs, but they have not obviated the use of regular prims. Similarly, I think that this feature may increase the options available when developing combat systems and weapons. However, I think that there are advantages to physical projectiles (such as the ability to code for ballistic trajectory). I have used sensor-based combat systems before (although this has many advantages over those as well), and I have found that those feel a bit too much like playing "laser tag" especially when used over longer distances.<br />
<br />
I think that this will create more options for combat, it may allow for new types of combat, but there are always tradeoffs inherent in any system. Raycasting methods will have advantages and disadvantages, they will be more efficient in some ways and less in others. It will be nice to have this as a new option, but I worry about overselling this as a complete replacement. After all, the Mono VM was marketed as being the wave of the future that would make LSL-compiled scripts obsolete. While many scriptors knew to be cautious with a new VM, LL's overhyping of the system created a marketing environment where customers were asking if every product was Mono. This resulted in Mono being used in a vast number of situations where it was not only unnecessary but entirely inappropriate. <br />
<br />
I worry about a similar situation unfolding here, where marketing llCastRay as a complete replacement for physical projectiles will encourage non-technical people to demand "those new ray guns LL keeps telling us about, why haven't you been making those?" Then these same people will inevitably come back a week later demanding why the RayCast "bullets" behave differently. All that I am asking is that you please acknowledge that non-technical people will read these announcements without understanding the technical nuance and the inherent tradeoffs. Overhyping something as a "complete replacement" when it is a new feature that allows for new options may only wind up creating new headaches. A new feature that opens new doors and allows for new options for creators is great, it is wonderful. No need to oversell a good thing.<br />
<br />
[[User:Jahar Aabye|Jahar Aabye]] 19:24, 5 July 2010 (UTC)<br />
<br />
In the final version of llCastRay, if more than 1 hit can be returned I'll be sure to give you the ability to select some kind of limit (even if it's only a binary "first hit or all N hits" choice--where N is definitely a finite number determined by the specification). <br />
<br />
Also, if using llCastRay feels too much like laser tag, try adding a small delay before the raycast executes or adding some randomness to the cast's direction. As for the ballistic trajectory, if that's really critical, there are ways to simulate it. For example, you could make 4 ray casts approximating the parabolic curve, but you'd have the possibility of performing an early-out if one of the first casts hits something.<br />
<br />
[[User:Falcon Linden|Falcon Linden]] 03:33, 6 July 2010 (UTC)<br />
<br />
::Yes, randomness for the direction is easily doable by modifying existing code. What I meant about ballistics isn't just the trajectory, drop, and inaccuracies like random variations in direction. A delay before firing can be done, but one factor in the current projectile combat is that your aim is highly dependent upon the distance to your target and how this relates to the target's movement. With projectiles, it is far easier to hit a close target than a far one, and if the target is moving, this has a disproportionate impact on difficulty with a farther target. This is because of the time that it takes for the bullet to reach the target, because the bullet's travel is not instant.<br />
<br />
::Now, because SL physics limits bullet velocity to far less than in real life (our SL bullets are usually 115 m/s while a 5.56mm round from an M16 is well over 900 m/s), the result is that it greatly exaggerates the effects of distance and movement, but distance in SL is always a somewhat arbitrary measurement. So I recognize that physical projectiles are far from perfect, and plenty of people have complained of difficulty when they first try SL combat after experience with other video and computer games that probably are using raytracing or similar technology. But it does add a satisfactory level of difficulty and skill to competitions.<br />
<br />
::I know this is probably not feasible, and I certainly don't want it to wind up polluting the code and making everything more difficult, but is there any way to give the ray a specific velocity, rather than being nearly instant? I'm not just talking about a delay between the firing input and casting the ray, but having the ability to set the ray to move at a specified speed so that distance to target matters? I mean, I suppose that I could fire multiple staggered rays to try to imitate this, and have the script read data from each successive ray only between certain distances....but that's gonna get really inefficient really fast, while the simulator is already calculating avatar distance and movement.<br />
--[[User:Jahar Aabye|Jahar Aabye]] 05:47, 7 July 2010 (UTC)<br />
<br />
:::Hey Jahar, I see what you're saying, but no, there's no way to slow down the ray, it's a synchronous, instantaneous query into the physics world's current state. You'll just need to come up with a new clever way to inject difficulty into things :) (I'm usually terrible at first person shooters and those have stupid AIs and instantaneous raycasts. I'm sure a group of human enemies can find a way to make hitting them challenging while still being fun, even if the bullets travel faster now.) Also, given that the physics hitbox of a player is pretty narrow, I'm guessing it may be harder than you expect to hit a moving target from the other side of the sim, even with a raycast. But then, I haven't tried.<br />
:::[[User:Falcon Linden|Falcon Linden]] 03:46, 8 July 2010 (UTC)<br />
<br />
== Raycast Damage ==<br />
<br />
Hey folks,<br />
<br />
I've been trying to coalesce some of the most significant suggestions for llCastRay, and one theme that seems consistent is that weapon system makers need a way to be notified when hit by a ray. I'm thinking of two possible features:<br />
<br />
1) For integration with LL damage, it might be possible to create another parameter that takes a list of parameters (albeit with a bit more strict requirements than in primparams args due to inefficiencies in list processing). In the future, this could include a version number, but in the meantime, one possible parameter could be RC_DAMAGE which would apply a requested amount of damage to the first object hit if that object is an avatar and if the region is damage enabled, etc.<br />
<br />
2) An event, ray_impact, that the caster script could choose to trigger in impacted objects. This would, in principle, alleviate many of the security concerns around raycast-based weapons systems. In the interests of full disclosure, however, I should tell you that (a) I don't know how to create a new event (I'll have to speak to Kelly Linden) and therefore, (b), I don't know if implementing this feature would be prohibitive in terms of engineering time. But let's suppose I <i>could</i> implement this. What information would you want the receiving object to be able to obtain in this event? The fewer the better, so my first instinct would be no information (it's enough to know you were hit). Beyond that, knowing the exact location of the hit could be nice, as would knowing the UUID of the casting object (maybe?) and perhaps receiving bit of user data provided in the llCastRay call. Would that be helpful? How might you use it?<br />
<br />
Cheers,<br />
<br />
[[User:Falcon Linden|Falcon Linden]] 03:47, 6 July 2010 (UTC)<br />
<br />
:: #1 sounds excellent, though it's been notoriously difficult to get people to play fair with LL damage.<br />
<br />
:: A ray_impact event would be a godsend. The UUID of the casting object would be essential, and a hit location [and maybe hit normal] would be very useful. Ideally, an appropriate set of llDetected* functions should work inside the ray_impact event similarly to how they're used in a touch event. Might need a new one, like llDetectedRayNormal. Still, just an event with a signature like ray_impact(key id, vector pos, vector norm) would be massively useful. Let's see… I'd be using llCastRay for collision avoidance on robots, and ray_impact would make it easier for the robots to exhibit schooling behaviors. Similarly, such robots could interact with scripted objects in their environment (door controls, moveable boxes?) elegantly. Other uses… target ranges for raycast-based weapons… missile lock detection in fighter combat… assuming we could use it in attachments for impacts to the avatar, combat meters for raycast-based guns… AR-like user interfaces implemented by raycasts from a HUD [though the math for generating such rays may be rather complicated]… line-of-sight communication between objects and avatars… I'm sure there are more that I can't think of at the moment. Bottom line, adding functionality to LSL is a Very Good Thing. --[[User:Michelle Resistance|Michelle Resistance]] 17:46, 6 July 2010 (UTC)<br />
<br />
Falcon, I've been silent on this point because I don't agree with the naysayers; <tt>llCastRay</tt> is exactly what I've been needing for the combat system I'm building. For those that want to use Linden Damage, I think <tt>llTakeDamage()</tt> (perhaps accepting negative values to allow for healing) would be valuable, but beyond the scope of this project. I don't personally hold with the logic that it's marginally hard to write non-laggy chat communications, so we should expect people to write non-laggy bullets and guns. It'll require combat to be done differently, so it's not an evolutionary change, but I don't see that as a barrier.<br />
<br />
That said, if it can be done, RC_DAMAGE would be a nice thing to have. I do build my weapons to fail down to Linden damage if no supported combat system is found, and if Linden damage is enabled. <tt>ray_impact</tt> would also be nice, especially if it's only explicitly triggered; UUID, impact point, and an arbitrary integer constant sent by the ray caster would be the values I'd see as most useful. Perhaps rather than go the whole list of parameters route for RC_DAMAGE, just add another integer parameter to <tt>llCastRay</tt> that would be used differently with different flags? In any event, not having either of these would in no way dampen my enthusiasm for this feature or impact my plans for using it, assuming it gets deployed. [[User:Jack Abraham|Jack Abraham]] 19:23, 6 July 2010 (UTC)<br />
<br />
::I think that suggestion #1, or some similar functionality, would be essential if you want this function to work with the current default LL Damage system. The LL Damage system currently requires a physical collision between an avatar and an object scripted with llSetDamage(). This means that I can simply fire a bullet at an avatar and apply damage, but raycasting alone would not be able to perform any sort of damage without also requiring some sort of bullet unless you add this feature.<br />
<br />
::Suggestion #2 also sounds useful, if possible. I suspect that many people will still utilize weapon-meter comms even if you include this function, because there is still greater security there in terms of being able to limit what can do damage within a system. However, Michelle outlines many other excellent uses for including this feature. In addition to making it far easier to construct non-avatar targets, it dramatically increases the potential usage for raycasting beyond just a replacement for projectiles. I was just talking to a plane maker last night about how raycasting could make laser-guided bombs far more interesting, and while that example wouldn't require this extra feature, it does illustrate that raycasting can evolve into so many other things besides just a bullet, and so adding in the feature to detect a raycast may expand the use of raycasting into all sorts of applications beyond what any of us could envision.<br />
<br />
::As for what information might need to be passed? Jack's suggestion of adding an all-purpose integer definitely sounds like the most important. Obviously an integer would be required to set damage, and having the ability to send an integer with a raycast would also allow for expanded use outside of LL Damage. It could allow a weapons system to differentiate between raycasts of different "caliber" or allow for raycasts to broadcast a "team" number, or to differentiate between raycasts being used as "projectiles" from those being used as "lasers" or in some other sensing capacity, or a million other situations where the ability to program an object with multiple responses to a raycast would dramatically expand its utility. An integer is also the simplest piece of information that could be added, and you'll need to add it anyways if you add LL Damage functionality.<br />
<br />
::The UUID of the originating object would also be useful, as would the owner's UUID. While it may sound redundant, I wonder about situations where the owner of the originating object might not be in the region, I believe that llGetOwnerKey() may not work in those situations, right? So the owner UUID would be important. It might also be useful for llCastRay() to send a UUID of its own choosing, and here I'm thinking of how it is common in SL aviation for planes to be guest-flyable, so the owner of the object may not be the one using it. However, workarounds already exist for this with bullet-based combat systems, so maybe it's not essential. Of course, if it simply broadcast a UUID (or string) of the scriptor's choosing, that would allow whoever is scripting the object to decide whether to send the object UUID, the owner UUID, or the user's UUID, so it might be even better than automatically sending the object and owner UUIDs.<br />
<br />
::Finally, it might be useful to include the vector position of the originating point of the raycast. Not where it hits you, but where it was sent from. Granted, if the object/owner/user UUID is included, then llGetObjectDetails() might be used to get this information, but for some instinctive reason that I can't quite figure out at the moment, I feel like this might be a useful thing to add. In the end, though, if you have to include one bit of information, make it all purpose integer that could be used to determine LL Damage or passed to an event. If at the end of the day you can only pass on one piece of info, an integer would give you the most utility with the least overhead.<br />
<br />
::[[User:Jahar Aabye|Jahar Aabye]] 06:43, 7 July 2010 (UTC)<br />
<br />
<br />
:::How about the shooter just sending the info about how the shot originated (also thigns like the gun used etc) via chat and then the potential target(s) calculate whether they were hit or not and adjust their owner health points as needed? (I just thought about that approach, haven't put much thought into it)<br />
::: Btw, does everyone uses gravitiless bullets? I would expect people going for the more realistic stuff would use physical bullets that fly a ballistic trajectory... Can a ballistic arc be used instead of a straight line "ray" with raycasting? --[[User:TigroSpottystripes Katsu|TigroSpottystripes Katsu]] 06:56, 7 July 2010 (UTC)<br />
<br />
::::Tigro, in real life, a 9mm round of typical self-defense ammunition has a muzzle velocity of 1120ft/s or 340m/s. As another commenter pointed out, a 5.56 NATO round (think M16) has a muzzle velocity of about 3000ft/s or 915m/s. Those two rounds would travel a sim diagonal (362m) in 1.06 and 0.4s, respectively. During that time period, if fired horizontally, they would fall about 5.5m and about 0.79m, respectively. Sounds like a lot, except that a pistol wouldn't have a range anywhere near that large in reality (you couldn't POSSIBLY aim a pistol accurately at a target nearly 4 football fields away, at least not by hand, and not without some kind of crazy scope...not to mention that wind would slow it down substantially over that distance) and for the M16, the drop is not significant given the 350m distance being traveled. So while no, you can't use a ballistic arc instead of a straight line, think about whether you really need to. And if you discover you really do, you could always approximate it with 4 line segments. <br />
::::[[User:Falcon Linden|Falcon Linden]] 04:04, 8 July 2010 (UTC)<br />
<br />
== Get Alt-Zoom camera cursor position and surface orientation ==<br />
<br />
Here is an example I made, how to get the camera cursor position when you Alt-Zoom on any object surface with the '''llCastRay''' function.<br />
<br />
The script also calculates the surface orientation at the cursor position and rezes a prim on a top of surface. The Z-Axis of a rezed prim is aligned with the Normal vector of a surface at a given point and the X-Axis points in a way of your camera sight.<br />
<br />
To test the script make a new HUD object and put the script below into it. Also put one standard cube prim (named Object) into its inventory. Attach the HUD and Alt-Zoom to any curved surface in region, but not more than 10m far from you. Then click on the HUD and a new prim will be rezed on a top of surface where the Alt-Zoom cursor of your camera points.<br />
<br />
<lsl><br />
// <br />
// Scriptname: Get Alt-Zoom position and Surface Orentation<br />
// Version: 1.0<br />
// Date: 06.07.2010<br />
//<br />
// Description: Gets the position of the camera cursor<br />
// when a user Alt-Zumes on a surface of any object and<br />
// rezes a prim on this point and orients it with a surface<br />
//<br />
// How To: - Create a new HUD (cube), size = X=0.05 y=0.05 Z=0.05<br />
// - Put this script on it and attach it as a HUD<br />
// - Insert a standard prim (Cube 0.5m) into HUD inventory (named as Object)<br />
// - Alt-Zoom with your mouse to any object surface in the region<br />
// - Without moving your camera, click on this HUD<br />
// - You will get the camera cursor position and surface orentation<br />
// - An Object from HUD inventory will be rezed on a top of Alt-Zoomed surface<br />
// perfectly aligned with surface and with X-axis pointed to your line of sight<br />
//<br />
// Tips: To see the camera cursor, enable: Advanced->Character->Show Look At in your Advaned Menu<br />
// Rez a big sphere to make a curved surface in a region and Alt-Zoom on it. <br />
//<br />
// Notes: You must be at least 10m close to Alt-Zoom position (llRezObject() limitation)<br />
// There's no "clamping code" included to cut the rays to be inside of a region<br />
//<br />
// Creator: Teleworm Gelber<br />
//<br />
<br />
default<br />
{<br />
state_entry()<br />
{<br />
if (llGetAttached() > 0)<br />
{<br />
llRequestPermissions(llGetOwner(), PERMISSION_TRACK_CAMERA);<br />
}<br />
else<br />
{<br />
llOwnerSay("Attach me as a HUD");<br />
}<br />
}<br />
<br />
run_time_permissions(integer permissions)<br />
{<br />
llOwnerSay("Alt-Zoom on any curved surface in the region and then click me to get the Alt-Zoom cursor coordinates and an Object will be rezed there");<br />
}<br />
<br />
touch_start(integer total_number)<br />
{<br />
vector camPos; // camera position<br />
rotation camRot; // camera rotation<br />
<br />
vector rayEnd; // ray end vector<br />
<br />
vector curPos; // Alt-Zoom cursor position<br />
rotation curRot; // Point on a surface rotation (Z-axis = SurfaceNormal, X-axis = line of sight)<br />
<br />
vector fwd; // surface Forward vector<br />
vector left; // surface Left vector<br />
vector normal; // surface Normal vector<br />
<br />
list rayData; // ray cast return data<br />
<br />
if ((llGetPermissions() & PERMISSION_TRACK_CAMERA) != 0)<br />
{<br />
// getting camera location<br />
camPos = llGetCameraPos();<br />
camRot = llGetCameraRot();<br />
<br />
// Cast a ray in a line of your sight (10.0 means llRezObject() limitation)<br />
rayEnd = camPos + 10.0 * llRot2Fwd(camRot);<br />
<br />
rayData = llCastRay(camPos, rayEnd, 0, RC_GET_NORMAL);<br />
<br />
if (llList2Integer(rayData, -1) > 0) // check status code<br />
{<br />
// get the Alt-Zoom cursor position and orentation<br />
curPos = llList2Vector(rayData, 1);<br />
normal = llList2Vector(rayData, 2);<br />
<br />
// calculate axis for point oirentation<br />
left = llVecNorm(normal % llRot2Fwd(camRot));<br />
fwd = left % normal;<br />
<br />
curRot = llAxes2Rot(fwd, left, normal);<br />
<br />
llOwnerSay("Alt-Zoom Position: " + (string) curPos);<br />
llOwnerSay("Point Rotation: " + (string) curRot);<br />
<br />
// rez an Object on a top of hit surface, 0.25 means the prim center offset from surface (0.5m cube)<br />
llRezObject("Object", curPos + <0.0, 0.0, 0.25> * curRot, ZERO_VECTOR, curRot, 0);<br />
}<br />
else<br />
{<br />
llOwnerSay("Nothing hit, try again");<br />
}<br />
}<br />
else<br />
{<br />
llOwnerSay("Attach me as a HUD first");<br />
}<br />
}<br />
<br />
on_rez(integer par)<br />
{<br />
llResetScript();<br />
}<br />
}</lsl><br />
<br />
--[[User:Teleworm Gelber|Teleworm Gelber]] 23:08, 6 July 2010 (UTC)<br />
<br />
== Inaccurate (buggy) position and normal ==<br />
<br />
I don't really have time for this, ... but I tried it out with a quick script (see below)<br />
and my conclusion is that the place that is reported for the hit is very inaccurate at times.<br />
It certainly isn't equal to the physical (collision) shape of objects, for example the place<br />
another physical object would lay, or where you'd stand if you stood on top of a prim with<br />
your avatar, and often it's just near random (actually, this is clearly a bug).<br />
<br />
The script that I used in my objects is:<br />
<br />
<lsl><br />
vector center;<br />
float distance = 15.0;<br />
<br />
rez_marker(vector pos, vector normal)<br />
{<br />
llRezObject("Marker", pos, ZERO_VECTOR, llRotBetween(<0,0,1>, normal), 0);<br />
}<br />
<br />
probe(vector direction)<br />
{<br />
//llSay(0, "direction = " + (string)direction);<br />
vector start = center + llVecNorm(direction) * distance;<br />
list results = llCastRay(start, center, RC_REJECT_AGENTS|RC_REJECT_PHYSICAL|RC_REJECT_LAND, RC_GET_NORMAL);<br />
if (llList2Integer(results, -1) > 0)<br />
{<br />
//llSay(0, "llCastRay returned " + (string)results);<br />
vector pos = llList2Vector(results, 1);<br />
vector normal = llList2Vector(results, 2);<br />
rez_marker(pos, normal);<br />
}<br />
else<br />
{<br />
llSay(0, "llCastRay FAILED!");<br />
}<br />
//rez_marker(start);<br />
}<br />
<br />
init()<br />
{<br />
}<br />
<br />
default<br />
{<br />
state_entry()<br />
{<br />
init();<br />
}<br />
<br />
on_rez(integer param)<br />
{<br />
init();<br />
}<br />
<br />
touch_start(integer total_number)<br />
{<br />
if (llDetectedKey(0) != llGetOwner())<br />
return;<br />
<br />
center = llGetPos();<br />
vector direction = <1,0,0>;<br />
float alpha;<br />
for (alpha = 0.0; alpha < 360.0; alpha += 10)<br />
{<br />
vector eul = <0, 0, alpha * DEG_TO_RAD>;<br />
rotation quad = llEuler2Rot(eul);<br />
probe(direction * quad);<br />
}<br />
}<br />
}<br />
</lsl><br />
<br />
Put it in an object together with an object named "Marker".<br />
The Marker object should be a (red) sphere of size 0.1 x 0.1 x 0.01.<br />
<br />
The script will rez the Marker object on the surface of the<br />
object you put it in, with it's flat side outwards. If you test<br />
this with a cube of 10x10x10 you'll understand what is the idea :p.<br />
<br />
Next test it with a Cylinder of size 3.4 x 4 x 3.342<br />
Taper X and Y both 1.00, Top Shear X = 0.30, and Y = 0.0<br />
(the rest default)... and see the deviations.<br />
<br />
Try many more funny shaped objects to see loads and loads of<br />
bugs and inaccuracies.<br />
<br />
--[[User:Aleric Inglewood|Aleric Inglewood]] 0:55, 7 July 2010 (UTC)<br />
<br />
You know, part of me hopes you're right--and that there's nothing I can do about it. Shapes like you're describing are terrible for the physics engine (tons of triangles, some of the degenerate, etc.). That said, I'll take a look at the physics debugger we have and see what's going on tomorrow. I suspect that the physics representation just isn't quite what you think it is. We'll see. Either way, thanks for bringing it to my attention.<br />
<br />
[[User:Falcon Linden|Falcon Linden]] 03:41, 7 July 2010 (UTC)<br />
<br />
:As Teleworm points out below, the problem here is in your script, not in the llCastRay. You should check the hit list to find the hit with the UUID matching the scripted object's key and use that. You may still get more than one hit if you're near the edge of a triangle or if your shape is not convex, however.<br />
:[[User:Falcon Linden|Falcon Linden]] 04:07, 8 July 2010 (UTC)<br />
<br />
==Simple Raytracer==<br />
<br />
[[File:Snapshot_2983.png|left|256px]]<br />
I did this a few days ago, it's pretty nifty!<br />
<br />
--[[User:Moy Loon|Moy Loon]]<br />
<br />
Not just nifty, bloody awesome! Btw, notice the way the two thin cylinders show as boxes. We replace long, thin cylinders with boxes. Can you take a photo with an avatar? :)<br />
[[User:Falcon Linden|Falcon Linden]] 04:09, 8 July 2010 (UTC)<br />
<br />
[[File:Avmeshforms.png|256px]]<br />
<br />
== Visualizing rays for debugging? ==<br />
<br />
Would it be possible to have the server send to the client the exact position of the begin and end points of the ray (so the client can render the ray itself) to help with debugging? (like trying to figure out ray positioning for a complex shaped linkset that needs close rays) I imagine it would be somthing like, the client tells the server it wants the rays, then the server will send the info for all rays owned by the avatar, and the client will render them as beacon like lines that fade gradually (the fading time would be a debug setting), perhaps add a bit of animation tot he beam like those pulses for the "cheesy beacon" for TP targets and tracking people on the map, to indicate the direction of the ray. To cope with packet loss, each time the client receives ray data it will tell the server whether to continue or stop, or perhaps just keep sending the request every N seconds and if the server don't get a request for a few N seconds it stops sending the info to that client. --[[User:TigroSpottystripes Katsu|TigroSpottystripes Katsu]] 16:59, 7 July 2010 (UTC)<br />
<br />
:I wish. Sorry, that's out of the scope of this project (which is intended to require a minimum amount of development time. So far, I think I've spent <10hrs coding it, and I'm trying to keep it under 20 total. <br />
:[[User:Falcon Linden|Falcon Linden]] 04:20, 8 July 2010 (UTC)<br />
<br />
<br />
You could also just rez an object to 'visualize' it, learn about llRotBetween, and how to split things up into 10m chunks! --moyloon<br />
<br />
== Edge of sim returning usefull results ==<br />
<br />
How about if when the ray hits the edge of the sim, position will be the intersection of the ray with the edge (since it can't go past it), and the UUID will be one constant if there is another sim on the other side of the edge, and another constant if it leads into the void? --[[User:TigroSpottystripes Katsu|TigroSpottystripes Katsu]] 20:02, 7 July 2010 (UTC)<br />
<br />
Sorry, that's just a little too hacky and out of scope for this one. :) Would be interesting, though! Feel free to submit a jira for interrogating the region as to its neighboring sims. That might be a useful function.<br />
[[User:Falcon Linden|Falcon Linden]] 04:11, 8 July 2010 (UTC)<br />
<br />
:I think this is a fairly important case to include, and Tigro's suggestion seems reasonable, as the function can at least return [[NULL_KEY]] for any collision with the sim-boundary, since no object can have <code>NULL_KEY</code> as a UUID, it also identifies a form of valid collision (collided with sim-boundary). It doesn't really make sense for the scripter to have to check this themselves, specifically for objects that are tracing lines relative to themselves such as AI objects.<br />
:The whole inability of rays to cross region boundaries is turning out to be a massive headache that means rays are unsuitable for nearly all serious combat systems, we may as well have a way to handle it as simply as possible so that some ways around it can be designed. For example; a weapon could perform a ray-cast, but if the last result is <code>NULL_KEY</code> then it will immediately fire a traditional projectile instead, cutting down on most normal projectile use, but using them in situations where they are still better.<br/>-- '''[[User:Haravikk_Mistral|Haravikk]]''' <sup><small>([[User_talk:Haravikk_Mistral|talk]]|[[Special:Contributions/Haravikk_Mistral|contribs]])</small></sup> 02:43, 8 September 2011 (PDT)<br />
<br />
== Phantom getting hit? ==<br />
<br />
Could anyone confirm if phantom objects are really not being ignored please? --[[User:TigroSpottystripes Katsu|TigroSpottystripes Katsu]] 23:18, 7 July 2010 (UTC)<br />
<br />
Yes, this is a bug that I will fix when I have time. Shouldn't be too hard.<br />
[[User:Falcon Linden|Falcon Linden]] 04:11, 8 July 2010 (UTC)<br />
<br />
: Even flexies are getting hit, but the the normals seem to be messed up (in my preliminary tests it seems the normals returned for flexies all point up regardless of where you hit them) --[[User:TigroSpottystripes Katsu|TigroSpottystripes Katsu]] 05:29, 8 July 2010 (UTC)<br />
:: Flexies attached to phys linksets seem to be harder to hit (they also got a funky collision but just with the ground apparently, nothing but lucky rays and the ground seems to collide with them, i'm not 100% sure, but i think in H4 not even the ground touches physical flexies) --[[User:TigroSpottystripes Katsu|TigroSpottystripes Katsu]] 05:44, 8 July 2010 (UTC)<br />
<br />
Not hugely surprising, if phantom is getting picked up. Flexies don't have a flexible physics rep, I think it's just a box or something. I'll have to look into it, but probably not before next week. Curious, though, what about trees? (Note that a tree's physics shape is a very narrow box, so you'd have to cast right in the middle of the tree.)<br />
<br />
[[User:Falcon Linden|Falcon Linden]] 05:36, 8 July 2010 (UTC)<br />
<br />
Haha, whoops. I looked at my code and it's a one line bug. I could fix it now, but it's not critical and it wouldn't get updated on Aditi for a few days anyway. But rest assured, it should be a quick and easy one. :)<br />
[[User:Falcon Linden|Falcon Linden]] 05:49, 8 July 2010 (UTC)<br />
<br />
:Would it be possible to add a checkbox or a setting that scripts can set to keep flexies colliding with the ground when desired? I've jsut made a random toy that it's kinda fun to watch that without flexies colliding with ground but nothing else wouldn't work quite the same (i'm asking for a somthign liek a checkbox/hidden switch because i can imagine that if this behavior isn't present in H4 some stuff might break if it's kept). No biggie if it has to be fixed though. --[[User:TigroSpottystripes Katsu|TigroSpottystripes Katsu]] 07:04, 8 July 2010 (UTC)<br />
<br />
<br />
<br />
:::This reminds me of one existing (Agni) edge case that might be useful to clear up with this. Currently if an avatar sits on an object, and that object then sets VolumeDetect to TRUE, the physics engine sets the avatar to phantom, and it does not register any hits on the avatar, even to the point of rendering the avatar invulnerable with regards to LL Damage. I had not thought to test this with RayCasting, but I am wondering what the intended effect will be in terms of how rays will interact with these phantom avatars. For additional information, see [http://jira.secondlife.com/browse/SVC-1253 SVC-1253] which has sort of lingered in limbo, probably because there are more important things to fix. However, if the raycasting code is still being written, it'd be nice to prevent this sort of unintended behavior before it even begins.<br />
:::[[User:Jahar Aabye|Jahar Aabye]] 03:27, 9 July 2010 (UTC)<br />
<br />
<br />
:::The sitting-phantom glitch with llVolumeDetect already has some odd behaviors, if you enable physics on the linkset. When physical, the avatars behave something like tiny points of solid material, snagging on objects that the linkset passes through. It's very odd. I suppose I should bring some example code around and shoot rays at it, an' see what happens?<br />
:::--[[User:Michelle Resistance|Michelle Resistance]] 16:19, 13 July 2010 (UTC)<br />
<br />
== Some good news for llCastRay ==<br />
<br />
I was playing with the script from Aleric Inglewood and tried to figure out what causes this strange inaccurate positions and normals. And I figured out that the main reason is the Marker size and shape and not the physic engine. <br />
<br />
In the example of Cylinder of size 3.4 x 4 x 3.342, the ray hits a Marker which was previously rezed one step before and not the surface of the cylinder. That is the reason, why were Normals wrong oriented. I modify the script in such a way that I numbered all Markers with llSetText.<br />
<br />
The second problem is inaccurate position. A marker is always placed about 3-5 cm '''above''' a surface, and not exactly on it on a flat surface. This can be seen on a cube object. On a sphere, this error is smaller. And in a shape of this deformed cylinder sometimes markers appears below surface and becomes invisible, but never more than 5cm.<br />
<br />
To correct the Aleric experiment, just make a smaller marker. And when all markers are rezed, resize the cylinder to become little smaller to see all markers. If you zoom with your camera very close, you can see that all markers follow the orientation of polygones that define the object shape.<br />
<br />
--[[User:Teleworm Gelber|Teleworm Gelber]] 23:40, 7 July 2010 (UTC)<br />
<br />
Good catch. I came to the same conclusion about Aleric's script, but I cheated (I have a way of visualizing the raycasts and the whole physics scene :). <br />
<br />
As for the inaccurate position, it's not inaccurate per se. It's just not what you expect. Most shapes in the physics engine (anything that isn't a perfect cylinder or perfect sphere, as I recall) has an additional radius of 5 or 10cm (I can never remember which). This is why if you stack physical boxes they'll have a gap between them. We use raycasts for sitting, but we specifically account for the radius in that code and in a few other places (like foot IK). There are a few other idiosyncracies around raycast results. For example, for most shape a ray parallel to its surface will not return a hit, nor will a ray terminating exactly at its surface or a ray originating inside the shape (unless it's a concave shape made of triangles, in which case the same holds true, but it's the individual triangle the ray begins inside that won't be hit). <br />
<br />
[[User:Falcon Linden|Falcon Linden]] 04:18, 8 July 2010 (UTC)<br />
<br />
The 10cm difference can be a problem for a system I have been working on for a long time now. With a lot of collision detection and Avatar Sensors, I have a system that causes the Avatar to behave differently physics-wise when stepping onto certain named surfaces. Currently, the problem is the collision detection system is unreliable when objects are real close together. It detects one or the other, and there is no way to determine which the avatar is standing on. I am hoping llCastRay is better, but it still leaves problems because of the invisible "extra height" of every prim. If a prim is underground, but only slightly, collision still detects the underground prim, despite the avatar only colliding with the actual ground. This occurs up to 1/4 a meter distance between the two vertically. If llCastRay has the same problem, there will still be too many workarounds to fix it. With that said, llCastRay is still something I wish to see completed. It's imperative for reducing sim lag, since llCastRay can take the place of 3 or 4 functions (one a repeating sensor event) in my script, and probably in many other scripter's scripts as well.<br />
<br />
[[User:Da Chrome|Da Chrome]] 16:47, 3 May 2011 (UTC)<br />
<br />
== Can we have this on the maingrid pretty please? ==<br />
<br />
I know this is experimental etc, but would it be possible to port the ray code to a sim version avaible on the maingrid and offer a sandbox sim with this hybrid version so we can play with ray with our main invs, live groups, chatting with friends inworld etc? --[[User:TigroSpottystripes Katsu|TigroSpottystripes Katsu]] 00:19, 8 July 2010 (UTC)<br />
<br />
Sorry, no. We're not set up for doing that sort of thing. We can bring your agni inventory over to Aditi (contact Oskar), but you'll lose anything you currently have on Aditi.<br />
[[User:Falcon Linden|Falcon Linden]] 04:21, 8 July 2010 (UTC)<br />
<br />
:I know, the beta grid inventory is one way copy of the main grid inv, everything gets overwritten when it's refreshed; i would rather not have to keep exporting the stuff i make there when i want to keep them though. --[[User:TigroSpottystripes Katsu|TigroSpottystripes Katsu]] 07:09, 8 July 2010 (UTC)<br />
<br />
== Just saying TY ==<br />
<br />
TY ;-) Will be cool. Keep it up Falcon.<br />
<br />
== just letting you know ==<br />
<br />
I'll be out of town this week, won't be able to read the stuff here nor log in to test stuff, cya. --[[User:TigroSpottystripes Katsu|TigroSpottystripes Katsu]] 20:57, 10 July 2010 (UTC)<br />
<br />
== Cast Ray vs. Ray Cast ==<br />
<br />
The function name proposed is "llCastRay" but the constants start "RC" as in "Ray Cast". Would make sense to have them be consistent (as in "CR"). It's annoying keeping [[llMessageLinked]] and [[link_message]] straight. -- '''[[User:Strife_Onizuka|Strife]]''' <sup><small>([[User talk:Strife_Onizuka|talk]]|[[Special:Contributions/Strife_Onizuka|contribs]])</small></sup> 16:40, 15 July 2010 (UTC)<br />
<br />
:I second that motion. I'm hoping this functionality is introduced and however it comes will be better than not coming at all but, while the opportunity exists to craft it to be as clean and user friendly as possible, that opportunity should be taken. Although this seems like a tiny issue (link_message vs llMessageLinked OR llSetLinkPrimitiveParamsFast *fingers gasp for breath* (although at least it wasn't llSetLinkPrimitiveParametersFast)) there is no good argument in favor of making function or event names insensible whereas there are good arguments in favor of them being simple and easy to write and remember. Now is the time to get that right. Still hugely in favor of the functionality though so if you MUST call it something complex and irritating, go right ahead ;-) -- '''[[User:Fred_Gandt|Fred Gandt]]''' <sup><small>([[User talk:Fred_Gandt|talk]]|[[Special:Contributions/Fred_Gandt|contribs]])</small></sup> 07:13, 17 July 2010 (UTC)<br />
<br />
Hey guys,<br />
<br />
The logic is that the method, llCastRay, is a verb phrase ("cast a ray"), whereas the parameters are noun/adjective phrases ("Ray Cast Reject Agents", "Ray Cast Reject Terrain"). Does that make sense to you?<br />
[[User:Falcon Linden|Falcon Linden]] 06:39, 19 July 2010 (UTC)<br />
<br />
::Hey Falcon :-)<br />
<br />
:Grammatically correct it may be but, fiddly. Muscle memory etc. llCastRay(CR_summit_summit) just flows better. It's really only the _summit_summit that matters at the end of the day. If there were flags that were ''BOTH'' RC_ ''AND'' CR_ (depending on grammatical doobrywotsits) then cool; but, if there will only be ''EITHER'' CR_ ''OR'' RC_ I for one would prefer to go along with the CR_ simply so I don't need to think about my old English teachers in the middle of writing a statement. *not terribly concerned but, interested* -- '''[[User:Fred_Gandt|Fred Gandt]]''' <sup><small>([[User talk:Fred_Gandt|talk]]|[[Special:Contributions/Fred_Gandt|contribs]])</small></sup> 10:35, 19 July 2010 (UTC)<br />
<br />
:: I like the gramaticly correct approach, saves time when reading a script, and once you get used to it it flows as smoothly as anything else. It somtimes brings a smile to my face when i realise what i'm writting makes sense even if i didn't understand what the words make happen under the hood. And the more consistent LSL is the better, it already goes the gramaticly correct route elsewhere, so it would be expected it would also do it here. --[[User:TigroSpottystripes Katsu|TigroSpottystripes Katsu]] 20:48, 19 July 2010 (UTC)<br />
<br />
:::Tigro...An example of LSL being grammatically correct elsewhere would be, what? Perhaps the well known functions llGiveFolderOfInventoryListed or llSendMessageToLinkInSet?<br />
::::Falcon (since I'm already here)...I was thinking that since the world at large (when thinking about ray-casting) thinks of Ray-Casting rather than Casting-Rays it would prolly be even simpler to name the function llRayCast. *shrugs* TBH, whatever the parts end up being called it's how they work that matters most. Awesome of you to be trying to get this out. Hear's (now) quietly hoping. -- '''[[User:Fred_Gandt|Fred Gandt]]''' <sup><small>([[User talk:Fred_Gandt|talk]]|[[Special:Contributions/Fred_Gandt|contribs]])</small></sup> 04:02, 20 July 2010 (UTC)<br />
::::: llMessageLinked isn't gramaticly correct?<br />
<br />
== ray_impact event vs. http ==<br />
<br />
I've been thinking about the asserted need for a ray_impact event to determine if you've been hit by a raycast. Babbage suggested that instead of creating a new ray_impact event (which is trickier than any of us might like), the same goals could be accomplished using the existing HTTP url system. The idea was that you'd set up a system as follows for securely communicating the results of the ray cast:<br />
<br />
1) Users wear a hit detection script that acquires an HTTP-in URL and stores it in its description. <br />
2) For weapons builders, you provide a copy, no-mod (and thus unreadable) script (call it a "firing script") that has a link_message event that the weapon builders' scripts can use to talk to it. This script also contains a secret key known to the hit detection scripts.<br />
3) The weapon script sends a link message to the firing script with the requested start/end position of the ray. The firing script (which is secure because it was written by the system creator) then casts a ray (if the start/end points are allowed based on game rules). If it detects a hit, it gets the target's hit detection url from the target's description and sends an HTTP POST with the details, including a secret code to verify authenticity.<br />
<br />
What would prevent this from being a viable alternative to a ray_impact event? (Obviously, it generalizes to other uses equally well.)<br />
If you think it will be too slow or have another fault, could you code up a simple, testable example?<br />
<br />
Thanks!<br />
<br />
:Something similar could be done using llRegionSay by sending the message on a frequently changing, random channel. The synchronization on channel would be performed by llRegionSay'ing a new random channel number periodically, with the number encrypted using a key shared by all interested/authorized scripts. This would seem a lot simpler/faster than the HTTP idea.<br />
<br />
::I think a ray_impact would be a useful event, but by no means necessary. There's any number of ways to securely communicate script to script using chat, http, reading one another's descriptions, carrier pigeon, etc., with llSHA1String or llMD5String and a password providing authentication. If ray_impact is any trouble, drop the idea; don't let it stand in the way of getting us llCastRay. It would be simpler to update existing combat meters using a new event, I think, but I don't think that should be a barrier. [[User:Jack Abraham|Jack Abraham]] 07:23, 22 July 2010 (UTC)<br />
<br />
== Change Reject constants to be inclusive ==<br />
Many, if not all other, LL calls use constants OR'd together in a positive sense to change a scripts' behavior.<br />
This is the only function where I have seen constants used to reduce what the function does.<br />
<br />
I'd suggest changing the RC_REJECT constants by eliminating the _REJECT_ portion and also adding a new constant, something along the lines of RC_ALL.<br />
<br />
A "normal" call would have the ALL constant unless you only wanted a subset of actions, in which case your OR together the constants you need.<br />
<br />
What do people think? [[User:Jonathan Yap|Jonathan Yap]] 10:01am, 24 July 2010 (UTC)<br />
<br />
:Although unusual (this is just my opinion) rejection rather than inclusion seems like a perfectly reasonable way around things. I wonder if it might be more efficient too. Analogy: Compact discs: When a CD has bonus tracks that are often disruptive when listening to an otherwise complete listening experience, it is typical to avoid being disturbed after the album is finished that we need to ''include'' all the album tracks in a programmed playlist before starting the playback. I have often wished that I could ''exclude'' the few bonus tracks instead. I would go so far as suggesting that bonus tracks should be (in what seems an illogical fashion) the first tracks indexed on the CD so that no playlist programming is required at all; We simply start playback at track 4 to avoid playing the 3 bonus tracks. So although unusual and unexpected, an alternative way might be more efficient and simpler to use.<br />
::This however is not a compact disc so, my greatest concern is with how well it works and how efficient it is as code. If there is NO difference in efficiency at all between rejection and inclusion, for the sake of continuity I would certainly agree with [[User:Jonathan Yap|Jonathan]] insofar that the ''normal'' way to construct a function by ''inclusive'' constants would be preferable. -- '''[[User:Fred_Gandt|Fred Gandt]]''' <sup><small>([[User talk:Fred_Gandt|talk]]|[[Special:Contributions/Fred_Gandt|contribs]])</small></sup> 08:26, 25 July 2010 (UTC)<br />
:::I agree with Jonathan and Fred on this, as there is always the possibility that llCastRay may detect new types in future, and by building an exclusive filter you may suddenly start detecting objects you don't expect to as a result. It is much better for the function to simply return what you ask for, rather than returning everything you ask not to return, as it is a much more tightly controlled result that way.<br/>-- '''[[User:Haravikk_Mistral|Haravikk]]''' <sup><small>([[User_talk:Haravikk_Mistral|talk]]|[[Special:Contributions/Haravikk_Mistral|contribs]])</small></sup> 11:09, 22 October 2010 (UTC)<br />
<br />
== Optimizing Simulations ==<br />
<br />
Well, I got quite a few ideas that surround this issue, and I have tried to narrow it doesn't to a simple concept that describes a pattern how to use functionality, like llCastRay(), to optimization simulations. I blogged more details here: [http://icyspherical.blogspot.com/2010/07/optimizing-simulations-with-basic.html Icesphere Blog]. Let's not confuse this with a common ray-tracer. I want the client end to contact a prim on the simulator to demonstrate the basic pattern. The prim just needs to cast rays and send data back to the client. The client-side fills in the details. This first phase would only need to get a rough scene layout. Close objects probably can be gathered with a scanner and some further objects can be done with llCastRay() (can't cross sims yet, but someday maybe). Hopefully, use http client/server methods to communicate with detected objects.<br />
<br />
Now with that basics above, scripts added into detected objects could further describe details of the scene through client/server methods. I've seen other LSL raytracers, that didn't use llCastRay(), that used scripts to store "material" data and thought... cool!<br />
<br />
Posted some vulgar code here: [[User:Dzonatas_Sol/HttpCastRayLLSD]] [[User:Dzonatas Sol|Dzonatas Sol]] 05:52, 28 July 2010 (UTC)<br />
<br />
== Possibility of a "Fast" trace ==<br />
<br />
Hi Falcon.<br />
<br />
ty ty ty ty ty ty :D (Now that I got that off my chest :p)<br />
<br />
I've got a bit of a suggestion, is it possible to add a llCastRayFast which only determines if there is something within the filter that's in the way between point A and point B.<br />
<br />
E.g. xyz avatar wants to go to sleep but a requirement to goto sleep in a hud is that the avatar is sheltered from the elements, the script does a trace looking to see if the avatar has a clear shot at the sky or not, if not the avatar is under cover.<br />
<br />
I really hope the hands of god (LL) allow this to make it into the maingrid.<br />
<br />
Look forward to catching you on the test grid :)<br />
<br />
Cheers,<br />
Lastro<br />
<br />
edit: Also see my user page for some code I've done, which works how I would expect it to (appart from it detecting the target object)<br />
<br />
Another idea would be the ability to do a ray trace between two object/agent/etc UUIDs. --[[User:Lastro Greenwood|Lastro Greenwood]] 00:54, 7 August 2010 (UTC)<br />
<br />
== Any updates? ==<br />
<br />
I haven't been around much, any news regarding this? Falcon hasn't been sacked too, has he? o.o --[[User:TigroSpottystripes Katsu|TigroSpottystripes Katsu]] 20:26, 26 September 2010 (UTC)<br />
:Hi, Falcon is still among the living Lindens but he is working on other projects like mesh. llCastRay is "[[User:Andrew Linden/Office_Hours/2010 09 10#msg_200|shelved until further notice, unfortunately]]." --[[User:Cerise Sorbet|Cerise Sorbet]] 23:17, 26 September 2010 (UTC)<br />
::IMO this should be given more priority than mesh import. --[[User:TigroSpottystripes Katsu|TigroSpottystripes Katsu]] 00:12, 27 September 2010 (UTC)<br />
:::Well Mesh import is a big important project so I wouldn't say that. But it's odd that the scripting team can't be working on it, as efficient scripts and script limits are their domain, and that seems to be the main hold-up on the function right now. Given the huge, complex workarounds to create scripted AI without this function it certainly comes under script efficiency, as I have pathing objects that use four or five scripts to give some semblance of accuracy, when this single function would eliminate all of them.<br/>-- '''[[User:Haravikk_Mistral|Haravikk]]''' <sup><small>([[User_talk:Haravikk_Mistral|talk]]|[[Special:Contributions/Haravikk_Mistral|contribs]])</small></sup> 11:23, 22 October 2010 (UTC)<br />
<br />
== Redesign of llCastRay()? ==<br />
<br />
I'm curious as to why this function requires a start and end point rather than describing a true ray like so:<br />
<lsl>list llCastRay(vector origin, vector direction, float range, list options);</lsl><br />
<br />
Quite simply the two vectors should describe the origin point (start) and direction of the ray, it's then up to the function to decide whether to process until <code>range</code> is reached, or if a region boundary is hit (whichever occurs first). A range of 0.0 would describe an infinite ray, in which case it will only stop upon hitting the maximum number of unfiltered objects, or a region boundary. Preferably the ray should continue a short-distance into the next region rather than halting immediately upon a boundary, the standard overlap is around 20m I believe?<br/>-- '''[[User:Haravikk_Mistral|Haravikk]]''' <sup><small>([[User_talk:Haravikk_Mistral|talk]]|[[Special:Contributions/Haravikk_Mistral|contribs]])</small></sup> 11:06, 22 October 2010 (UTC)<br />
<br />
<br />
<br />
<br />
list castray(vector origin, vector normal, float distance, list options){<br />
return llCastRay(origin,origin+normal*distance,list options);<br />
}<br />
It's easier in my opinion, to have a start and stop, instead of start, normal, and distance, aswell as I'm sure most other people would think the same way, But, that's a wrapper for how you'd want it.<br />
<br />
--[[User:Moy Loon|Moy Loon]] 17:50, 22 October 2010 (UTC)<br />
<br />
:Problem is that it lacks a way to properly describe infinity. I suppose if we know that the ray can't go beyond the region then a range of 16536.0 or some other large value is fine, but it seems a lot simpler to be able to use the normal/direction vector. I mean you could even simplify it further by removing the origin point and assuming the ray is always cast from the scripted prim's centre, though an origin may be especially useful. It's just that with the normal you could do the following:<br />
<lsl>// What can I see?<br />
llCastRay(llGetPos(), llRot2Fwd(llGetRot()), 50.0, []);</lsl><br />
This seems a simple, and likely very common use-case of the function. Likewise it may be desirable to have the filter as a formal part of the function, rather than under options, and just use the same constants, so that I could more specifically do:<br />
<lsl>// Who can I see?<br />
llCastRay(llGetPos(), llRot2Fwd(llGetRot()), 50.0, AGENT, []);</lsl><br />
Or possibly even do the same with the maximum number of values returned, as the filter and the maximum are the two that are needed most, list-based options should be restricted to things that are additional, rather than fundamental to typical usage of the function. But in any event, to me this seems a lot simpler, as other you have to do:<br />
<lsl>// Who can I see?<br />
vector pos = llGetPos();<br />
llCastRay(pos, pos + (llRot2Fwd(llGetRot()) * 50.0), [RC_REJECT_TYPES, RC_REJECT_PHYSICAL | RC_REJECT_NONPHYSICAL | RC_REJECT_LAND]);</lsl><br />
<br />
Hell, the whole set-up of the function is a bit bewildering, I've posted a function that I believe would be a lot cleaner/more-usable and consistent, and you can find it [[User:Haravikk Mistral/LlCastRay|here]].<br/>-- '''[[User:Haravikk_Mistral|Haravikk]]''' <sup><small>([[User_talk:Haravikk_Mistral|talk]]|[[Special:Contributions/Haravikk_Mistral|contribs]])</small></sup> 12:17, 23 October 2010 (UTC)<br />
<br />
:What I really love is how the Lindens working on this function seem to just love ignoring all the issues I've been trying to raise with the design of it. Now we're just rushing towards releasing a function that barely resembles an LSL call, and does just about everything it needs to backwards. With no true control over the output this function is pretty much useless for any of the cases I'd want to use it for, as I'll need to do complex list manipulation in order to sort the results. Does no-one but me care that this function seems like a bad joke? It has all the functionality we need, and have wanted since day one of scripting in SL, and yet delivered in a package that makes no sense in the slightest.<br/>-- '''[[User:Haravikk_Mistral|Haravikk]]''' <sup><small>([[User_talk:Haravikk_Mistral|talk]]|[[Special:Contributions/Haravikk_Mistral|contribs]])</small></sup> 04:54, 6 July 2011 (PDT)<br />
<br />
== llCastRay for Vehicle's wheels suspension? ==<br />
<br />
I'm still disturbed from the day you suggested it, Falcon. While llCastRay itself is a great idea, but it bear no good logical use for vehicle suspensions system. You know I didn't have to hesitate to say no, I knew right off the bat that it was a bad idea.<br />
<br />
There are ways to track height of on-coming prims and land slope to clench its wheels in a single frame before collision happens. This is requiring to scan the path at every physic frames and more. You also need to make calculation how deep the "bump" is and throw suspension's reaction force up the car as a jump or "damping" shock. However... llCastRay can not help with physic collision when the wheels are trying to push outward to raise the car up. Moving wheels via llSetLinkPrimParam (or the fast version as well) would clip through solid object within the first few physic frames, later Havok engine try to resolve by pushing out the wheel, some times result in getting stuck into the ground or objects it drives on top of. It happens on a tiny smooth bump, causing a dramatic physic motion interruption, even come to a full stop without being fully stuck into the road. I've had done this similar setup with collision event and sensor. I spent two years researching a better way to handle vehicle suspension with all the LSL code and complex physic algorithms I could use.<br />
<br />
Vehicle suspension system need much more to work with, but it would be pretty darn silly to let Havok's vehicle library go to waste without any script's delaying the collision event in frames between.<br />
My bigger concern is having Linden Lab (or you, Falcon, for that matter) use llCastRay as a "work around" excuse not to provide better suspension/motorized system. I'm not demanding to give us Havok's suspension system right at this minute, but be aware how poorly dealt it has been.<br />
<br />
Keep up the good work; I'm sure I'll find more uses for llCastRay. --[[Image:Nacon-tag.jpg]] '''[[User:Vincent_Nacon|₪]]''' 23:19, 11 February 2011 (PST)<br />
<br />
:I don't think he meant wheels with suspension, but solid wheels that work realisticly, only proving thrust when in contact with the ground (or anything else) --[[User:TigroSpottystripes Katsu|TigroSpottystripes Katsu]] 12:46, 6 May 2011 (PDT)<br />
<br />
::If the wheels were made flexible paths (so they're phantom within a non-phantom linked set) then you could still simulate the visual effect of suspension if you really wanted, while invisible guide prims control the actual physical motion.<br/>-- '''[[User:Haravikk_Mistral|Haravikk]]''' <sup><small>([[User_talk:Haravikk_Mistral|talk]]|[[Special:Contributions/Haravikk_Mistral|contribs]])</small></sup> 13:18, 8 May 2011 (PDT)<br />
<br />
== Simplification function for use. ==<br />
<br />
<source lang="lsl2"><br />
list ray(vector s, vector e)<br />
{<br />
return llCastRay(s,e,<br />
[<br />
RC_REJECT_TYPES,<br />
0<br />
//RC_REJECT_AGENTS<br />
//|RC_REJECT_PHYSICAL<br />
//|RC_REJECT_NONPHYSICAL<br />
//|RC_REJECT_LAND<br />
,<br />
RC_DATA_FLAGS,<br />
0<br />
//RC_GET_NORMAL<br />
//|RC_GET_ROOT_KEY<br />
//|RC_GET_LINK_NUM<br />
,<br />
RC_MAX_HITS, 1,<br />
RC_DETECT_PHANTOM,FALSE <br />
]);<br />
}<br />
</source><br />
[[User:Draconis Neurocam|Draconis Neurocam]] 10:19, 8 April 2011 (PDT)<br />
<br />
== Where can i find a list of sims currently aware of this command? ==<br />
<br />
I've been away for some time, trying to come back now, but the Oatmeals that used to recognize the commands aren't doing it anymore, where can i find an updated list of sims where i can play with llCastRay right now? --[[User:TigroSpottystripes Katsu|TigroSpottystripes Katsu]] 12:43, 6 May 2011 (PDT)<br />
<br />
the mesh sims on betagrid seem to support it well<br />
--[[User:Vagabond Carter|Vagabond Carter]] 16:47, 2 July 2011 (PDT)<br />
<br />
== making use of the normal ==<br />
<br />
after some experimentation on betagrid I've found the following handy:<br />
<pre><br />
to turn a normal into a rotation (for rezzing portals/decals etc)<br />
vector norm = (the normal retunrd by llCastRay() );<br />
rotation hitrot = llRotBetween(ZERO_ROTATION , norm);<br />
</pre><br />
--[[User:Vagabond Carter|Vagabond Carter]] 16:15, 2 July 2011 (PDT)<br />
<br />
== Pre-Release? ==<br />
<br />
Shouldn't the document be tagged with "|mode=pre-release"? Considering the fact that it's not currently "activated"?<br />
<br />
--[[User:Ayamo Nozaki|Ayamo Nozaki]] 12:21, 7 September 2011 (PDT)<br />
<br />
== Ray cast for creating an in-world display ==<br />
<br />
In my recent edit I removed the mention under ideas for uses of creating an in-world display object. My reason for doing so is that this simply isn't possible to do with ray-cast, as the ray-cast doesn't return a colour, and you cannot query face-colours for arbitrary objects, and cannot gain colour information for textures. Therefore, to do this in LSL only you would need a script in every single object that you might possibly collide with, and hard-coded colour values for every texture (potentially every texture co-ordinate) in order to get any useful colour from them. The alternative would be to use a bot, however the bot itself wouldn't benefit at all from the addition of llCastRay, as it can simply perform true visual ray-casting instead, which would return a far more accurate result, more efficiently.<br />
<br />
Sorry, it just isn't the right type of ray for that particular application!<br/>-- '''[[User:Haravikk_Mistral|Haravikk]]''' <sup><small>([[User_talk:Haravikk_Mistral|talk]]|[[Special:Contributions/Haravikk_Mistral|contribs]])</small></sup> 13:40, 7 September 2011 (PDT)<br />
<br />
:Seems arbritary. Just because you lack any ideas to improvise in the situation doesn't mean others won't. It's not absolutely essential to have knowledge of textures and colours of every pixel in the world to make a decent render. See the renders above on this page by Moy Loon. It is true that is a bit of a novelty toy but still a vital example of applying raycasts for a potential purpose, as this sort of thing is usually otherwise impossible without involving external programs, such as bots and custom clients. Finding example uses for raycasts is extremely vital for imploring scripters to find creative ways to use it. Raycasts are extremely cool devices for gaining knowledge of an environment for really interesting uses. It's important we list here what real examples we know of. Otherwise people will think its' only use is for shooting bullets in FPS shooters. --[[User:Nexii Malthus|<span style="color: #bbb; text-shadow:-1px -1px #ddd, 1px 1px #888;">Nexii Malthus</span>]] 21:14, 7 September 2011 (PDT)<br />
<br />
::If they'd care to post a description of how it's done then maybe there is something I've completely missed, but the rays involved are ones within the physics engine, and the simulator has almost no actual knowledge of the visual information represented within a scene, and like I say it's currently impossible for a ray-casting object to acquire colour information for every object that its rays collide with, not without those objects being known and prepared beforehand (either containing scripts, or named in such a way as to describe their visual properties, e.g - reflective, red, etc.), or using a bot (which can do the whole thing without llCastRay anyway, and a lot more effectively). I've been scripting in LSL for a long time now, and while llCastRay() allows us to grab objects more easily, it doesn't add any new capabilities that make visual ray-casting any easier in practise, except perhaps visual distance, it's still no easier to get actual visual information from it though.<br />
<br />
::Visual distance is certainly useful for AI effects, as you can use a ray-cast for finding out which object is actually visibly closest, but that's already noted. I simply can't find a single way that this feature can allow visual ray-tracing as anything other than a novelty for prepared scenes, that can just as easily use a static image, since you can't ray-trace arbitrary objects, for example if an avatar popped into the scene. If we want to create useful images of in-world items, then bots taking screenshots, or performing the ray-tracing without LSL scripts, are the best methods, if it's a sought-after feature then really we need something more feasible, like exposing the mechanism that sims use to generate their map-tiles, such that we can use it to take scripted snapshots. As far as examples go, we may as well have llSensor() encouraging scripters to use sensors to map out the location of every avatar in-world; it's do-able, but one of the last things anyone should be doing with that feature.<br/>-- '''[[User:Haravikk_Mistral|Haravikk]]''' <sup><small>([[User_talk:Haravikk_Mistral|talk]]|[[Special:Contributions/Haravikk_Mistral|contribs]])</small></sup> 02:35, 8 September 2011 (PDT)<br />
<br />
== Ray-Casting Across Region Boundaries ==<br />
<br />
Okay, so I've been trying to come up with a good mechanism for ray-casting across region boundaries. I don't think it's actually too hard, but it will require a simulator combat system which performs the actual ray-casting, on behalf of the weapons. This isn't a bad thing actually, as it can be used to provide additional features to prevent abusive weapons. Basically the set-up is something like:<br />
<br />
* Each simulator will have an object in at least one of its corner, next to a corresponding object in each neighbouring sim. So for a grid of 9-sims (3 x 3), the central sim would have an object in each corner, the side sims would have two objects each in each corner on the side neighbouring the central sim, and the corner sims will have one object in the corner closest to the central sim.<br />
* These objects will open private chat-channels with one another, using whisper or say (or target say if it works on region-edges?). They will also open a global listen on a standard channel for the combat system.<br />
* When an avatar fires a weapon, the weapon will communicate on the standard channel a description of its ray, using region say.<br />
* The objects within the simulator will hear this message (ideally, if a sim contains multiple objects, all but the nearest will discard the message for performance).<br />
* The object responding to the message will trace the portion of the line that lies within the simulator.<br />
** If a result is returned, then the attack is resolved.<br />
** If no results are returned, then the attack is passed on to any neighbouring sim in the correct direction, using the appropriate private channel to communicate across the sim-border.<br />
*** The neighbouring sim will then calculate a new line-segment, and test for any impacts within its region.<br />
<br />
This mechanism can actually be much faster than any projectiles, as transmitting chat across region boundaries is a lot faster than transferring an object of any type. The main risk is when it comes to large-scale combat, as too much activity could lag the combat objects, though this is essentially no different from the current sources of lag, and should be lower overall anyway. Script limits would probably help with a lot of this (the impact of laggy avatars would be reduced).<br />
<br />
However, this particular use of ray-casting actually favours the origin + normal + range method of describing the ray, as it can fully describe a line spanning multiple region, with only a single co-ordinate being re-calculated (which can be done trivially using the origin + (normal * range) method).<br/>-- '''[[User:Haravikk_Mistral|Haravikk]]''' <sup><small>([[User_talk:Haravikk_Mistral|talk]]|[[Special:Contributions/Haravikk_Mistral|contribs]])</small></sup> 05:44, 16 September 2011 (PDT)<br />
<br />
== Controlled explosions ==<br />
<br />
While reading {{JIRA|SCR-203}} it occurred to me that using this and [[llSetKeyframedAnimation]] you could mimic an object explosion without using physics, maybe. -- '''[[User:Strife_Onizuka|Strife]]''' <sup><small>([[User talk:Strife_Onizuka|talk]]|[[Special:Contributions/Strife_Onizuka|contribs]])</small></sup> 11:39, 20 September 2011 (PDT)<br />
<br />
== Imaging Examples ==<br />
<br />
I've been experimenting with displays that create an image of objects and avatars in front of it, by casting rays from the position of each "pixel" on the display.<br />
<br />
The first version had a resolution of 15 x 15 and used 226 prims. It calculated the distance from the start of the cast to the hit point, and used that to scale the color of each prim in grayscale.<br />
<br />
The next version used prism type prims to have 5 faces per prim, like what the 10-character XYText uses, which allowed it to have a resolution of 35 x 35 and used 246 prims.<br />
<br />
The next version displayed every prim in the scene with a unique color, based on its UUID, and the version after that scaled the color from lightest to darkest based on distance.<br />
<br />
[[Image:Ray_cast_example_01.png|250px]][[Image:Ray_cast_example_02.png|250px]][[Image:Ray_cast_example_04.png|250px]][[Image:Ray_cast_example_05.png|250px]]<br />
<br />
I tested the latest color version at a sandbox in order to combine 24 of them into an image with a resolution of 210 x 140, which used 5904 prims.<br />
<br />
[[Image:Ray_cast_example_07.png|250px]][[Image:Ray_cast_example_10.png|250px]][[Image:Ray_cast_example_11.png|250px]]<br />
<br />
These images show the difference between standing and sitting using this method:<br />
<br />
[[Image:Ray_cast_example_20.png|250px]][[Image:Ray_cast_example_21.png|250px]][[Image:Ray_cast_example_22.png|250px]][[Image:Ray_cast_example_23.png|250px]]<br />
<br />
My next step is to send data gathered at a higher resolution to a webserver, and have it processed into a real image. After that, it should be easier to experiment with creating perspective (right now it's like a 2-dimensional mirror). I was able to get distance shading around an object with the later monochrome version, because it calculated the scale for each panel based on the longest hit for each panel (which also made the scaling vary wildly between panels).<br />
<br />
[[Image:Ray_cast_example_25.png|250px]][[Image:Ray_cast_example_24.png|250px]]<br />
<br />
It seemed like the only way to coordinate distance shading between multiple panels would be to have a separate object manage the panels with a complicated message system. So after I started with color, I based the scaling on a max distance of 256 so that all the panels would have the same distance shading. I think it might be possible to base an object's individual pixel shading on the minimum and maximum distance from the same object, after shading the whole object based on how far it is. I'll be able to try that as well, after success with the web processing. Eventually it should only require having a single prim rezzed in-world.<br />
<br />
[[User:Sayrah Parx|Sayrah Parx]] 08:09, 25 September 2011 (PDT)<br />
<br />
:For depth, could you not simply assume a value at first, say 0m to 5,000m for consistency, since it shouldn't normally be possible to detect anything further away than this. This way, after you've cast all the required rays, all you need to do is take the min and max values and scale each pixel to the correct values using.<br/>-- '''[[User:Haravikk_Mistral|Haravikk]]''' <sup><small>([[User_talk:Haravikk_Mistral|talk]]|[[Special:Contributions/Haravikk_Mistral|contribs]])</small></sup> 08:40, 25 September 2011 (PDT)<br />
<br />
::The problem is that the min and max values are guaranteed to be different for each panel, unless every ray from every panel hits the same flat object and the object isn't rotated. I decided that it wasn't practical to worry about that, because even a single panel has 246 prims. So I'm glad that it works for a proof of concept, but the goal should be to remove the need for that many prims anyway.<br />
<br />
::[[User:Sayrah Parx|Sayrah Parx]] 21:40, 25 September 2011 (PDT)<br />
<br />
This is 700 x 350 and took 10 hours and 17 minutes with a single scanner:<br />
<br />
[[Image:Ray_cast_example_26.png|250px]]<br />
<br />
[[User:Sayrah Parx|Sayrah Parx]] 20:18, 26 September 2011 (PDT)<br />
<br />
== Highlighting ==<br />
<br />
I added the following to the bottom of the keywords.ini file under the appsettings folder inside the installation folder of the Phoenix viewer (i would expect it would work with other viewers pretty much just the same but i won't be testing) and now it highlights the stuff and got a hovertip explaining stuff and the keywords are present in the dropdown, i just copypasted from some of the text from the wiki page, and didn't really work much on it, it was just a small rushed job; the 3 numbers after "word" are the RGB color components of the highlighting, in the 0.0-1.0 range; seems you can even edit and save that file without closing the client and it will read the new values next time you open a script editor window, so it should be easy to tweak it to match whatever skin you are using.<br />
<br />
<code><pre><br />
<nowiki>#Raycasting stuff<br />
<br />
#Command<br />
[word .6, .0, 1.0]<br />
llCastRay list llCastRay( vector start, vector end, list options );:Cast a ray from start to end and report collision data for intersections with objects Returns a list of strided values with an additional integer status_code on the end. Each stride consists of two mandatory values {key uuid, vector position} and possibly some optional values {integer link_number, vector normal} see RC_DATA_FLAGS for details. The status_code if it is negative is an error code, otherwise it is the number of hits (and strides) returned.<br />
#CONSTANTS<br />
[word 1.0, .3, 0.0]<br />
RCERR_UNKNOWN The raycast failed for an unspecified reason. Please submit a bug report.<br />
RCERR_SIM_PERF_LOW The raycast failed because simulator performance is low. Wait a while and then try again.:If possible reduce the scene complexity.<br />
RCERR_CAST_TIME_EXCEEDED The raycast failed because the parcel or agent has exceeded the maximum time allowed for raycasting. \nThis resource pool is continually replenished, so waiting a few frames and retrying is likely to succeed.<br />
RC_REJECT_TYPES Parameter: [ integer filter ] default [0]:Mask used to ignore specific types of objects (and avatars). filter is a bitwise-or combination of the following constants: RC_REJECT_AGENTS, RC_REJECT_PHYSICAL, RC_REJECT_NONPHYSICAL, and RC_REJECT_LAND<br />
RC_DATA_FLAGS Parameter: [ integer flags ] default [0]:flags is a bitwise-or combination of: RC_GET_NORMAL, RC_GET_ROOT_KEY, and RC_GET_LINK_NUM. These select whether you want link numbers and hit normals in your results list. By default, you will get the UUID ('key') of the exact child prim hit. If instead you want the key of the root prim, set RC_GET_ROOT_KEY. A terrain hit will register as NULL_KEY<br />
RC_MAX_HITS Parameter: [ integer max_hits ] default [1]:Maximum number of hits to return. Maximum value is 256. To avoid performance issues, keep it small.<br />
RC_DETECT_PHANTOM Parameter: [ boolean detect_phantom ] [FALSE]:Set to TRUE (or nonzero) to detect phantom AND volume detect objects. It is not possible to detect only phantom objects or only volume detect objects. If set to TRUE, phantom and volume detect objects will always be detected, even if RC_REJECT_NONPHYSICAL and RC_REJECT_PHYSICAL are set in RC_REJECT_TYPES.<br />
RC_REJECT_AGENTS<br />
RC_REJECT_PHYSICAL<br />
RC_REJECT_NONPHYSICAL<br />
RC_REJECT_LAND<br />
RC_GET_NORMAL<br />
RC_GET_ROOT_KEY<br />
RC_GET_LINK_NUM<br />
</nowiki></pre></code><br />
--[[User:TigroSpottystripes Katsu|TigroSpottystripes Katsu]] 03:43, 2 October 2011 (PDT)<br />
:Of course, backup the file before doing any changes jsut in case, i'm not responsible for any damages etc etc. --[[User:TigroSpottystripes Katsu|TigroSpottystripes Katsu]] 03:44, 2 October 2011 (PDT)<br />
<br />
<br />
:Thanks for sharing this, I've been looking for a way to add the new things to [[Snowglobe]] for a while now. It works perfectly. I used .5, .1, .3 and .1, .1, .5 for the functions and constants respectively.<br />
<br />
:[[User:Sayrah Parx|Sayrah Parx]] 04:54, 2 October 2011 (PDT)</div>Draconis Neurocamhttps://wiki.secondlife.com/w/index.php?title=Neurocam_Particle_Engine&diff=1196273Neurocam Particle Engine2015-04-25T21:50:40Z<p>Draconis Neurocam: </p>
<hr />
<div><br />
<source lang="lsl2"> <br />
//Written By Draconis Neurocam<br />
//You are free:<br />
// * to Share — to copy, distribute and transmit the work<br />
// * to Remix — to adapt the work<br />
//Under the following conditions:<br />
// *<br />
// Attribution. You must attribute the work in the manner specified by the author or licensor (but not in any way that suggests that they endorse you or your use of the work). <br />
// Attribute this work:<br />
// What does "Attribute this work" mean?<br />
// The page you came from contained embedded licensing metadata, including how the creator wishes to be attributed for re-use. You can use the HTML here to cite the work. <br />
// Doing so will also include metadata on your page so that others can find the original work as well. <br />
// * For any reuse or distribution, you must make clear to others the license terms of this work. The best way to do this is with a link to this web page.<br />
// * Any of the above conditions can be waived if you get permission from the copyright holder.<br />
// * Nothing in this license impairs or restricts the author's moral rights.<br />
//http://creativecommons.org/licenses/by/3.0/<br />
<br />
float burst_radius = 1.0;<br />
float angle_begin = PI_BY_TWO;<br />
float angle_end = PI_BY_TWO;<br />
key target = "";<br />
<br />
vector start_color = <0.5,0.0,1.0>;<br />
vector end_color = <0.0,0.0,0.0>;<br />
float start_alpha = 1.0;<br />
float end_alpha = 0.1;<br />
vector start_scale = <0.5,0.5,0.5>;<br />
vector end_scale = <1.0,1.0,1.0>;<br />
key texture = "dcab6cc4-172f-e30d-b1d0-f558446f20d4";<br />
float start_glow = 0.0;<br />
float end_glow = 0.0;<br />
<br />
float source_max_age = 0.0;<br />
float particle_max_age = 2.0;<br />
float burst_rate = 0.02;<br />
integer burst_particle_count = 2;<br />
<br />
vector acceleration = <0.0,1.0,1.0>;<br />
vector omega = <2.0,0.0,0.0>;<br />
float speed_min = 1.0;<br />
float speed_max = 1.0;<br />
<br />
Particles()<br />
{<br />
llParticleSystem([<br />
<br />
//System Behaviour<br />
PSYS_PART_FLAGS, <br />
//PSYS_PART_BOUNCE_MASK <br />
PSYS_PART_EMISSIVE_MASK <br />
//| PSYS_PART_FOLLOW_SRC_MASK <br />
| PSYS_PART_FOLLOW_VELOCITY_MASK <br />
| PSYS_PART_INTERP_COLOR_MASK <br />
| PSYS_PART_INTERP_SCALE_MASK <br />
//| PSYS_PART_RIBBON_MASK <br />
//| PSYS_PART_TARGET_LINEAR_MASK <br />
//| PSYS_PART_TARGET_POS_MASK <br />
//| PSYS_PART_WIND_MASK<br />
,<br />
<br />
//System Presentation<br />
PSYS_SRC_PATTERN,<br />
//PSYS_SRC_PATTERN_ANGLE<br />
//PSYS_SRC_PATTERN_ANGLE_CONE<br />
//PSYS_SRC_PATTERN_ANGLE_CONE_EMPTY<br />
PSYS_SRC_PATTERN_DROP<br />
//PSYS_SRC_PATTERN_EXPLODE<br />
,<br />
<br />
PSYS_SRC_BURST_RADIUS, burst_radius,<br />
//PSYS_SRC_INNERANGLE, angle_begin, //Either or<br />
//PSYS_SRC_OUTERANGLE, angle_end,<br />
PSYS_SRC_ANGLE_BEGIN, angle_begin, //Either or<br />
PSYS_SRC_ANGLE_END, angle_end,<br />
PSYS_SRC_TARGET_KEY, target,<br />
<br />
//Particle appearance<br />
PSYS_PART_START_COLOR, start_color,<br />
PSYS_PART_END_COLOR, end_color,<br />
PSYS_PART_START_ALPHA, start_alpha,<br />
PSYS_PART_END_ALPHA, end_alpha,<br />
PSYS_PART_START_SCALE, start_scale,<br />
PSYS_PART_END_SCALE, end_scale,<br />
PSYS_SRC_TEXTURE, texture,<br />
PSYS_PART_START_GLOW, start_glow,<br />
PSYS_PART_END_GLOW, end_glow,<br />
<br />
//Particle Blending<br />
PSYS_PART_BLEND_FUNC_SOURCE,<br />
//PSYS_PART_BF_ONE<br />
//PSYS_PART_BF_ZERO<br />
//PSYS_PART_BF_DEST_COLOR<br />
//PSYS_PART_BF_SOURCE_COLOR<br />
//PSYS_PART_BF_ONE_MINUS_DEST_COLOR<br />
//PSYS_PART_BF_ONE_MINUS_SOURCE_COLOR<br />
PSYS_PART_BF_SOURCE_ALPHA<br />
//PSYS_PART_BF_ONE_MINUS_SOURCE_ALPHA<br />
,<br />
PSYS_PART_BLEND_FUNC_DEST,<br />
//PSYS_PART_BF_ONE<br />
//PSYS_PART_BF_ZERO<br />
//PSYS_PART_BF_DEST_COLOR<br />
//PSYS_PART_BF_SOURCE_COLOR<br />
//PSYS_PART_BF_ONE_MINUS_DEST_COLOR<br />
//PSYS_PART_BF_ONE_MINUS_SOURCE_COLOR<br />
//PSYS_PART_BF_SOURCE_ALPHA<br />
PSYS_PART_BF_ONE_MINUS_SOURCE_ALPHA<br />
,<br />
<br />
//Particle Flow<br />
PSYS_SRC_MAX_AGE, source_max_age,<br />
PSYS_PART_MAX_AGE, particle_max_age,<br />
PSYS_SRC_BURST_RATE, burst_rate,<br />
PSYS_SRC_BURST_PART_COUNT, burst_particle_count, <br />
<br />
//Particle Motion<br />
PSYS_SRC_ACCEL, acceleration,<br />
PSYS_SRC_OMEGA, omega,<br />
PSYS_SRC_BURST_SPEED_MIN, speed_min,<br />
PSYS_SRC_BURST_SPEED_MAX, speed_max<br />
<br />
]);<br />
}<br />
<br />
default <br />
{<br />
state_entry()<br />
{<br />
Particles();<br />
}<br />
}<br />
</source></div>Draconis Neurocamhttps://wiki.secondlife.com/w/index.php?title=User:Draconis_Neurocam&diff=1196272User:Draconis Neurocam2015-04-25T21:49:58Z<p>Draconis Neurocam: </p>
<hr />
<div>Salutations, I am Draconis Neurocam.<br />
<br />
My goal is to make things better to the best of my ability.<br />
<br />
This place is something I dreamed would exist as a child, and now since it does, I love being a part of it.<br />
<br />
What most people never actually realize is how powerful what we have at our fingertips is.<br />
<br />
I take this as an extension of real life, and not something separate.<br />
----<br />
[http://twitter.com/Neurocam_ @Neurocam_]<br />
<source lang="lsl2"><br />
//Written by Nomad Padar one of the most genius people I have ever known<br />
vector int2vec(integer n) {<br />
//0zyx ZZZZ ZZZZ ZZZZ YYYY YYYY XXXX XXXX<br />
return <n&0xFF, (n>>8)&0xFF, ((n>>16)&0xFF)> + <((n&0x10000000)!=0)*.5,((n&0x20000000)!=0)*.5,((n&0x40000000)!=0)*.5>;<br />
}<br />
integer vec2int(vector v) {<br />
integer x = (integer)(v.x);<br />
integer y = (integer)(v.y);<br />
integer z = (integer)(v.z);<br />
integer out;<br />
<br />
//Rounds to 0, .5, or 1.0<br />
float delta = v.x-x;<br />
if((delta>.25) && (delta<.75)) out += 0x10000000;<br />
else if(delta>.75) out += 0x1;<br />
delta = v.y-y;<br />
if((delta>.25) && (delta<.75)) out += 0x20000000;<br />
else if(delta>.75) out += 0x100;<br />
delta = v.z-z;<br />
if((delta>.25) && (delta<.75)) out += 0x40000000;<br />
else if(delta>.75) out += 0x10000;<br />
out += x+(y<<8)+(z<<16);<br />
return out;<br />
}<br />
default<br />
{<br />
touch_start(integer total_number)<br />
{<br />
integer param = vec2int(llGetPos());<br />
llSay(0, (string)param);<br />
llSay(0, (string)int2vec(param));<br />
}<br />
}<br />
<br />
</source><br />
<br />
<source lang="lsl2"><br />
SetLinkPosLocal2Root(integer linknum,vector offset)<br />
{<br />
llSetLinkPrimitiveParamsFast(linknum, [PRIM_POSITION, (llList2Vector(llGetLinkPrimitiveParams(linknum, [PRIM_POS_LOCAL]),0))+offset]);<br />
}<br />
</source><br />
<br />
<source lang="lsl2"><br />
<value,maxvalue - value,0> / maxvalue<br />
<br />
<1.0-health,health*health,0.0><br />
</source><br />
<br />
<source lang="lsl2"><br />
llGetPos() + <1,0,0>*llGetRot()<br />
</source><br />
<br />
<source lang="lsl2"><br />
list ray(vector s, vector e)<br />
{<br />
return llCastRay(s,e,<br />
[<br />
RC_REJECT_TYPES,<br />
0<br />
//RC_REJECT_AGENTS<br />
//|RC_REJECT_PHYSICAL<br />
//|RC_REJECT_NONPHYSICAL<br />
//|RC_REJECT_LAND<br />
,<br />
RC_DATA_FLAGS,<br />
0<br />
//RC_GET_NORMAL<br />
//|RC_GET_ROOT_KEY<br />
//|RC_GET_LINK_NUM<br />
,<br />
RC_MAX_HITS, 1,<br />
RC_DETECT_PHANTOM,FALSE <br />
]);<br />
}<br />
</source><br />
<source lang="lsl2"><br />
//forwards loop through n<br />
(i=(i+1)%n)<br />
//backwards loop through n<br />
(i=(n+i-1)%n)<br />
</source><br />
{{skills<br />
|Architect=*<br />
|Builder=*<br />
|Machinima=<br />
|Scenographer=<br />
|Scripter=*<br />
|SLogistician=*<br />
|Terraformer=<br />
|}}<br />
{{Tweeter}}<br />
{{ISO 639-3/cat-speaking|eng}}</div>Draconis Neurocamhttps://wiki.secondlife.com/w/index.php?title=User:Draconis_Neurocam&diff=1196271User:Draconis Neurocam2015-04-25T21:47:46Z<p>Draconis Neurocam: </p>
<hr />
<div>Salutations, I am Draconis Neurocam.<br />
<br />
My goal is to make things better to the best of my ability.<br />
<br />
This place is something I dreamed would exist as a child, and now since it does, I love being a part of it.<br />
<br />
What most people never actually realize is how powerful what we have at our fingertips is.<br />
<br />
I take this as an extension of real life, and not something separate.<br />
----<br />
[http://twitter.com/Neurocam_ @Neurocam_]<br />
<pre><br />
//Written by Nomad Padar one of the most genius people I have ever known<br />
vector int2vec(integer n) {<br />
//0zyx ZZZZ ZZZZ ZZZZ YYYY YYYY XXXX XXXX<br />
return <n&0xFF, (n>>8)&0xFF, ((n>>16)&0xFF)> + <((n&0x10000000)!=0)*.5,((n&0x20000000)!=0)*.5,((n&0x40000000)!=0)*.5>;<br />
}<br />
integer vec2int(vector v) {<br />
integer x = (integer)(v.x);<br />
integer y = (integer)(v.y);<br />
integer z = (integer)(v.z);<br />
integer out;<br />
<br />
//Rounds to 0, .5, or 1.0<br />
float delta = v.x-x;<br />
if((delta>.25) && (delta<.75)) out += 0x10000000;<br />
else if(delta>.75) out += 0x1;<br />
delta = v.y-y;<br />
if((delta>.25) && (delta<.75)) out += 0x20000000;<br />
else if(delta>.75) out += 0x100;<br />
delta = v.z-z;<br />
if((delta>.25) && (delta<.75)) out += 0x40000000;<br />
else if(delta>.75) out += 0x10000;<br />
out += x+(y<<8)+(z<<16);<br />
return out;<br />
}<br />
default<br />
{<br />
touch_start(integer total_number)<br />
{<br />
integer param = vec2int(llGetPos());<br />
llSay(0, (string)param);<br />
llSay(0, (string)int2vec(param));<br />
}<br />
}<br />
<br />
</pre><br />
<br />
<pre><br />
SetLinkPosLocal2Root(integer linknum,vector offset)<br />
{<br />
llSetLinkPrimitiveParamsFast(linknum, [PRIM_POSITION, (llList2Vector(llGetLinkPrimitiveParams(linknum, [PRIM_POS_LOCAL]),0))+offset]);<br />
}<br />
</pre><br />
<br />
<pre><br />
<value,maxvalue - value,0> / maxvalue<br />
<br />
<1.0-health,health*health,0.0><br />
</pre><br />
<br />
<pre><br />
llGetPos() + <1,0,0>*llGetRot()<br />
</pre><br />
<br />
<pre><br />
list ray(vector s, vector e)<br />
{<br />
return llCastRay(s,e,<br />
[<br />
RC_REJECT_TYPES,<br />
0<br />
//RC_REJECT_AGENTS<br />
//|RC_REJECT_PHYSICAL<br />
//|RC_REJECT_NONPHYSICAL<br />
//|RC_REJECT_LAND<br />
,<br />
RC_DATA_FLAGS,<br />
0<br />
//RC_GET_NORMAL<br />
//|RC_GET_ROOT_KEY<br />
//|RC_GET_LINK_NUM<br />
,<br />
RC_MAX_HITS, 1,<br />
RC_DETECT_PHANTOM,FALSE <br />
]);<br />
}<br />
</pre><br />
<pre><br />
//forwards loop through n<br />
(i=(i+1)%n)<br />
//backwards loop through n<br />
(i=(n+i-1)%n)<br />
</pre><br />
{{skills<br />
|Architect=*<br />
|Builder=*<br />
|Machinima=<br />
|Scenographer=<br />
|Scripter=*<br />
|SLogistician=*<br />
|Terraformer=<br />
|}}<br />
{{Tweeter}}<br />
{{ISO 639-3/cat-speaking|eng}}</div>Draconis Neurocamhttps://wiki.secondlife.com/w/index.php?title=Neurocam_Particle_Engine&diff=1196270Neurocam Particle Engine2015-04-25T21:46:06Z<p>Draconis Neurocam: </p>
<hr />
<div><br />
<pre> <br />
//Written By Draconis Neurocam<br />
//You are free:<br />
// * to Share — to copy, distribute and transmit the work<br />
// * to Remix — to adapt the work<br />
//Under the following conditions:<br />
// *<br />
// Attribution. You must attribute the work in the manner specified by the author or licensor (but not in any way that suggests that they endorse you or your use of the work). <br />
// Attribute this work:<br />
// What does "Attribute this work" mean?<br />
// The page you came from contained embedded licensing metadata, including how the creator wishes to be attributed for re-use. You can use the HTML here to cite the work. <br />
// Doing so will also include metadata on your page so that others can find the original work as well. <br />
// * For any reuse or distribution, you must make clear to others the license terms of this work. The best way to do this is with a link to this web page.<br />
// * Any of the above conditions can be waived if you get permission from the copyright holder.<br />
// * Nothing in this license impairs or restricts the author's moral rights.<br />
//http://creativecommons.org/licenses/by/3.0/<br />
<br />
float burst_radius = 1.0;<br />
float angle_begin = PI_BY_TWO;<br />
float angle_end = PI_BY_TWO;<br />
key target = "";<br />
<br />
vector start_color = <0.5,0.0,1.0>;<br />
vector end_color = <0.0,0.0,0.0>;<br />
float start_alpha = 1.0;<br />
float end_alpha = 0.1;<br />
vector start_scale = <0.5,0.5,0.5>;<br />
vector end_scale = <1.0,1.0,1.0>;<br />
key texture = "dcab6cc4-172f-e30d-b1d0-f558446f20d4";<br />
float start_glow = 0.0;<br />
float end_glow = 0.0;<br />
<br />
float source_max_age = 0.0;<br />
float particle_max_age = 2.0;<br />
float burst_rate = 0.02;<br />
integer burst_particle_count = 2;<br />
<br />
vector acceleration = <0.0,1.0,1.0>;<br />
vector omega = <2.0,0.0,0.0>;<br />
float speed_min = 1.0;<br />
float speed_max = 1.0;<br />
<br />
Particles()<br />
{<br />
llParticleSystem([<br />
<br />
//System Behaviour<br />
PSYS_PART_FLAGS, <br />
//PSYS_PART_BOUNCE_MASK <br />
PSYS_PART_EMISSIVE_MASK <br />
//| PSYS_PART_FOLLOW_SRC_MASK <br />
| PSYS_PART_FOLLOW_VELOCITY_MASK <br />
| PSYS_PART_INTERP_COLOR_MASK <br />
| PSYS_PART_INTERP_SCALE_MASK <br />
//| PSYS_PART_RIBBON_MASK <br />
//| PSYS_PART_TARGET_LINEAR_MASK <br />
//| PSYS_PART_TARGET_POS_MASK <br />
//| PSYS_PART_WIND_MASK<br />
,<br />
<br />
//System Presentation<br />
PSYS_SRC_PATTERN,<br />
//PSYS_SRC_PATTERN_ANGLE<br />
//PSYS_SRC_PATTERN_ANGLE_CONE<br />
//PSYS_SRC_PATTERN_ANGLE_CONE_EMPTY<br />
PSYS_SRC_PATTERN_DROP<br />
//PSYS_SRC_PATTERN_EXPLODE<br />
,<br />
<br />
PSYS_SRC_BURST_RADIUS, burst_radius,<br />
//PSYS_SRC_INNERANGLE, angle_begin, //Either or<br />
//PSYS_SRC_OUTERANGLE, angle_end,<br />
PSYS_SRC_ANGLE_BEGIN, angle_begin, //Either or<br />
PSYS_SRC_ANGLE_END, angle_end,<br />
PSYS_SRC_TARGET_KEY, target,<br />
<br />
//Particle appearance<br />
PSYS_PART_START_COLOR, start_color,<br />
PSYS_PART_END_COLOR, end_color,<br />
PSYS_PART_START_ALPHA, start_alpha,<br />
PSYS_PART_END_ALPHA, end_alpha,<br />
PSYS_PART_START_SCALE, start_scale,<br />
PSYS_PART_END_SCALE, end_scale,<br />
PSYS_SRC_TEXTURE, texture,<br />
PSYS_PART_START_GLOW, start_glow,<br />
PSYS_PART_END_GLOW, end_glow,<br />
<br />
//Particle Blending<br />
PSYS_PART_BLEND_FUNC_SOURCE,<br />
//PSYS_PART_BF_ONE<br />
//PSYS_PART_BF_ZERO<br />
//PSYS_PART_BF_DEST_COLOR<br />
//PSYS_PART_BF_SOURCE_COLOR<br />
//PSYS_PART_BF_ONE_MINUS_DEST_COLOR<br />
//PSYS_PART_BF_ONE_MINUS_SOURCE_COLOR<br />
PSYS_PART_BF_SOURCE_ALPHA<br />
//PSYS_PART_BF_ONE_MINUS_SOURCE_ALPHA<br />
,<br />
PSYS_PART_BLEND_FUNC_DEST,<br />
//PSYS_PART_BF_ONE<br />
//PSYS_PART_BF_ZERO<br />
//PSYS_PART_BF_DEST_COLOR<br />
//PSYS_PART_BF_SOURCE_COLOR<br />
//PSYS_PART_BF_ONE_MINUS_DEST_COLOR<br />
//PSYS_PART_BF_ONE_MINUS_SOURCE_COLOR<br />
//PSYS_PART_BF_SOURCE_ALPHA<br />
PSYS_PART_BF_ONE_MINUS_SOURCE_ALPHA<br />
,<br />
<br />
//Particle Flow<br />
PSYS_SRC_MAX_AGE, source_max_age,<br />
PSYS_PART_MAX_AGE, particle_max_age,<br />
PSYS_SRC_BURST_RATE, burst_rate,<br />
PSYS_SRC_BURST_PART_COUNT, burst_particle_count, <br />
<br />
//Particle Motion<br />
PSYS_SRC_ACCEL, acceleration,<br />
PSYS_SRC_OMEGA, omega,<br />
PSYS_SRC_BURST_SPEED_MIN, speed_min,<br />
PSYS_SRC_BURST_SPEED_MAX, speed_max<br />
<br />
]);<br />
}<br />
<br />
default <br />
{<br />
state_entry()<br />
{<br />
Particles();<br />
}<br />
}<br />
</pre></div>Draconis Neurocamhttps://wiki.secondlife.com/w/index.php?title=Neurocam_Particle_Engine&diff=1196269Neurocam Particle Engine2015-04-25T18:50:19Z<p>Draconis Neurocam: </p>
<hr />
<div><br />
<code> <br />
//Written By Draconis Neurocam<br />
<br />
//You are free:<br />
<br />
// * to Share — to copy, distribute and transmit the work<br />
// * to Remix — to adapt the work<br />
<br />
<br />
//Under the following conditions:<br />
<br />
// *<br />
<br />
// Attribution. You must attribute the work in the manner specified by the author or licensor (but not in any way that suggests that they endorse you or your use of the work).<br />
<br />
// Attribute this work:<br />
// What does "Attribute this work" mean?<br />
// The page you came from contained embedded licensing metadata, including how the creator wishes to be attributed for re-use. You can use the HTML here to cite the work. <br />
// Doing so will also include metadata on your page so that others can find the original work as well.<br />
<br />
// * For any reuse or distribution, you must make clear to others the license terms of this work. The best way to do this is with a link to this web page.<br />
// * Any of the above conditions can be waived if you get permission from the copyright holder.<br />
// * Nothing in this license impairs or restricts the author's moral rights.<br />
//http://creativecommons.org/licenses/by/3.0/<br />
<br />
<br />
<br />
float burst_radius = 1.0;<br />
float angle_begin = PI_BY_TWO;<br />
float angle_end = PI_BY_TWO;<br />
key target = "";<br />
<br />
vector start_color = <0.5,0.0,1.0>;<br />
vector end_color = <0.0,0.0,0.0>;<br />
float start_alpha = 1.0;<br />
float end_alpha = 0.1;<br />
vector start_scale = <0.5,0.5,0.5>;<br />
vector end_scale = <1.0,1.0,1.0>;<br />
key texture = "dcab6cc4-172f-e30d-b1d0-f558446f20d4";<br />
float start_glow = 0.0;<br />
float end_glow = 0.0;<br />
<br />
float source_max_age = 0.0;<br />
float particle_max_age = 2.0;<br />
float burst_rate = 0.02;<br />
integer burst_particle_count = 2;<br />
<br />
vector acceleration = <0.0,1.0,1.0>;<br />
vector omega = <2.0,0.0,0.0>;<br />
float speed_min = 1.0;<br />
float speed_max = 1.0;<br />
<br />
Particles()<br />
{<br />
llParticleSystem([<br />
<br />
//System Behaviour<br />
PSYS_PART_FLAGS, <br />
//PSYS_PART_BOUNCE_MASK <br />
PSYS_PART_EMISSIVE_MASK <br />
//| PSYS_PART_FOLLOW_SRC_MASK <br />
| PSYS_PART_FOLLOW_VELOCITY_MASK <br />
| PSYS_PART_INTERP_COLOR_MASK <br />
| PSYS_PART_INTERP_SCALE_MASK <br />
//| PSYS_PART_RIBBON_MASK <br />
//| PSYS_PART_TARGET_LINEAR_MASK <br />
//| PSYS_PART_TARGET_POS_MASK <br />
//| PSYS_PART_WIND_MASK<br />
,<br />
<br />
//System Presentation<br />
PSYS_SRC_PATTERN,<br />
//PSYS_SRC_PATTERN_ANGLE<br />
//PSYS_SRC_PATTERN_ANGLE_CONE<br />
//PSYS_SRC_PATTERN_ANGLE_CONE_EMPTY<br />
PSYS_SRC_PATTERN_DROP<br />
//PSYS_SRC_PATTERN_EXPLODE<br />
,<br />
<br />
PSYS_SRC_BURST_RADIUS, burst_radius,<br />
//PSYS_SRC_INNERANGLE, angle_begin, //Either or<br />
//PSYS_SRC_OUTERANGLE, angle_end,<br />
PSYS_SRC_ANGLE_BEGIN, angle_begin, //Either or<br />
PSYS_SRC_ANGLE_END, angle_end,<br />
PSYS_SRC_TARGET_KEY, target,<br />
<br />
//Particle appearance<br />
PSYS_PART_START_COLOR, start_color,<br />
PSYS_PART_END_COLOR, end_color,<br />
PSYS_PART_START_ALPHA, start_alpha,<br />
PSYS_PART_END_ALPHA, end_alpha,<br />
PSYS_PART_START_SCALE, start_scale,<br />
PSYS_PART_END_SCALE, end_scale,<br />
PSYS_SRC_TEXTURE, texture,<br />
PSYS_PART_START_GLOW, start_glow,<br />
PSYS_PART_END_GLOW, end_glow,<br />
<br />
//Particle Blending<br />
PSYS_PART_BLEND_FUNC_SOURCE,<br />
//PSYS_PART_BF_ONE<br />
//PSYS_PART_BF_ZERO<br />
//PSYS_PART_BF_DEST_COLOR<br />
//PSYS_PART_BF_SOURCE_COLOR<br />
//PSYS_PART_BF_ONE_MINUS_DEST_COLOR<br />
//PSYS_PART_BF_ONE_MINUS_SOURCE_COLOR<br />
PSYS_PART_BF_SOURCE_ALPHA<br />
//PSYS_PART_BF_ONE_MINUS_SOURCE_ALPHA<br />
,<br />
PSYS_PART_BLEND_FUNC_DEST,<br />
//PSYS_PART_BF_ONE<br />
//PSYS_PART_BF_ZERO<br />
//PSYS_PART_BF_DEST_COLOR<br />
//PSYS_PART_BF_SOURCE_COLOR<br />
//PSYS_PART_BF_ONE_MINUS_DEST_COLOR<br />
//PSYS_PART_BF_ONE_MINUS_SOURCE_COLOR<br />
//PSYS_PART_BF_SOURCE_ALPHA<br />
PSYS_PART_BF_ONE_MINUS_SOURCE_ALPHA<br />
,<br />
<br />
//Particle Flow<br />
PSYS_SRC_MAX_AGE, source_max_age,<br />
PSYS_PART_MAX_AGE, particle_max_age,<br />
PSYS_SRC_BURST_RATE, burst_rate,<br />
PSYS_SRC_BURST_PART_COUNT, burst_particle_count, <br />
<br />
//Particle Motion<br />
PSYS_SRC_ACCEL, acceleration,<br />
PSYS_SRC_OMEGA, omega,<br />
PSYS_SRC_BURST_SPEED_MIN, speed_min,<br />
PSYS_SRC_BURST_SPEED_MAX, speed_max<br />
<br />
]);<br />
}<br />
<br />
default <br />
{<br />
state_entry()<br />
{<br />
Particles();<br />
}<br />
}<br />
</code></div>Draconis Neurocamhttps://wiki.secondlife.com/w/index.php?title=User:Draconis_Neurocam&diff=1187941User:Draconis Neurocam2014-02-28T11:51:05Z<p>Draconis Neurocam: </p>
<hr />
<div>Salutations, I am Draconis Neurocam.<br />
<br />
My goal is to make things better to the best of my ability.<br />
<br />
This place is something I dreamed would exist as a child, and now since it does, I love being a part of it.<br />
<br />
What most people never actually realize is how powerful what we have at our fingertips is.<br />
<br />
I take this as an extension of real life, and not something separate.<br />
----<br />
[http://twitter.com/Neurocam_ @Neurocam_]<br />
<lsl><br />
//Written by Nomad Padar one of the most genius people I have ever known<br />
vector int2vec(integer n) {<br />
//0zyx ZZZZ ZZZZ ZZZZ YYYY YYYY XXXX XXXX<br />
return <n&0xFF, (n>>8)&0xFF, ((n>>16)&0xFF)> + <((n&0x10000000)!=0)*.5,((n&0x20000000)!=0)*.5,((n&0x40000000)!=0)*.5>;<br />
}<br />
integer vec2int(vector v) {<br />
integer x = (integer)(v.x);<br />
integer y = (integer)(v.y);<br />
integer z = (integer)(v.z);<br />
integer out;<br />
<br />
//Rounds to 0, .5, or 1.0<br />
float delta = v.x-x;<br />
if((delta>.25) && (delta<.75)) out += 0x10000000;<br />
else if(delta>.75) out += 0x1;<br />
delta = v.y-y;<br />
if((delta>.25) && (delta<.75)) out += 0x20000000;<br />
else if(delta>.75) out += 0x100;<br />
delta = v.z-z;<br />
if((delta>.25) && (delta<.75)) out += 0x40000000;<br />
else if(delta>.75) out += 0x10000;<br />
out += x+(y<<8)+(z<<16);<br />
return out;<br />
}<br />
default<br />
{<br />
touch_start(integer total_number)<br />
{<br />
integer param = vec2int(llGetPos());<br />
llSay(0, (string)param);<br />
llSay(0, (string)int2vec(param));<br />
}<br />
}<br />
<br />
</lsl><br />
<br />
<lsl><br />
SetLinkPosLocal2Root(integer linknum,vector offset)<br />
{<br />
llSetLinkPrimitiveParamsFast(linknum, [PRIM_POSITION, (llList2Vector(llGetLinkPrimitiveParams(linknum, [PRIM_POS_LOCAL]),0))+offset]);<br />
}<br />
</lsl><br />
<br />
<lsl><br />
<value,maxvalue - value,0> / maxvalue<br />
<br />
<1.0-health,health*health,0.0><br />
</lsl><br />
<br />
<lsl><br />
llGetPos() + <1,0,0>*llGetRot()<br />
</lsl><br />
<br />
<lsl><br />
list ray(vector s, vector e)<br />
{<br />
return llCastRay(s,e,<br />
[<br />
RC_REJECT_TYPES,<br />
0<br />
//RC_REJECT_AGENTS<br />
//|RC_REJECT_PHYSICAL<br />
//|RC_REJECT_NONPHYSICAL<br />
//|RC_REJECT_LAND<br />
,<br />
RC_DATA_FLAGS,<br />
0<br />
//RC_GET_NORMAL<br />
//|RC_GET_ROOT_KEY<br />
//|RC_GET_LINK_NUM<br />
,<br />
RC_MAX_HITS, 1,<br />
RC_DETECT_PHANTOM,FALSE <br />
]);<br />
}<br />
</lsl><br />
<lsl><br />
//forwards loop through n<br />
(i=(i+1)%n)<br />
//backwards loop through n<br />
(i=(n+i-1)%n)<br />
</lsl><br />
{{skills<br />
|Architect=*<br />
|Builder=*<br />
|Machinima=<br />
|Scenographer=<br />
|Scripter=*<br />
|SLogistician=*<br />
|Terraformer=<br />
|}}<br />
{{Tweeter}}<br />
{{ISO 639-3/cat-speaking|eng}}</div>Draconis Neurocamhttps://wiki.secondlife.com/w/index.php?title=User_talk:Draconis_Neurocam&diff=1182221User talk:Draconis Neurocam2013-10-06T21:47:44Z<p>Draconis Neurocam: /* Neurocam Particle Engine: */</p>
<hr />
<div>== [[Neurocam Particle Engine]]: ==<br />
Hi, it seems you haven't noticed that [[PSYS_SRC_INNERANGLE]] and [[PSYS_SRC_OUTERANGLE]] have been deprecated. Please refer to the [[llParticleSystem]] or [[llLinkParticleSystem]] pages for further notes regarding why they have been deprecated and which variables replace them.<br><br />
I removed the two lines from your code on the [[Neurocam Particle Engine]] page, since you already had included setting the values for the constant variables replacing the two deprecated ones (without knowing?).<br><br />
One more thing, if you don't manually add linebreaks within the lsl tags, they wont happen at all. So for future posts, you might want to add them for better readability (on mobile and/or older lower resolution screens).<br><br />
Cheers! -- [[User:Kireji Haiku|Kireji Haiku]] 06:17, 4 October 2013 (PDT)<br />
<br />
The "Deprecated" options change the axis the particles exist on the prim, which can be really useful, I left it there for a reason. [[User:Draconis Neurocam|Draconis Neurocam]] 14:47, 6 October 2013 (PDT)</div>Draconis Neurocamhttps://wiki.secondlife.com/w/index.php?title=Neurocam_Particle_Engine&diff=1182220Neurocam Particle Engine2013-10-06T21:43:53Z<p>Draconis Neurocam: Undo revision 1182167 by Kireji Haiku (Talk) I wanted it like this</p>
<hr />
<div><lsl> <br />
//Written By Draconis Neurocam<br />
<br />
//You are free:<br />
<br />
// * to Share — to copy, distribute and transmit the work<br />
// * to Remix — to adapt the work<br />
<br />
<br />
//Under the following conditions:<br />
<br />
// *<br />
<br />
// Attribution. You must attribute the work in the manner specified by the author or licensor (but not in any way that suggests that they endorse you or your use of the work).<br />
<br />
// Attribute this work:<br />
// What does "Attribute this work" mean?<br />
// The page you came from contained embedded licensing metadata, including how the creator wishes to be attributed for re-use. You can use the HTML here to cite the work. <br />
// Doing so will also include metadata on your page so that others can find the original work as well.<br />
<br />
// * For any reuse or distribution, you must make clear to others the license terms of this work. The best way to do this is with a link to this web page.<br />
// * Any of the above conditions can be waived if you get permission from the copyright holder.<br />
// * Nothing in this license impairs or restricts the author's moral rights.<br />
//http://creativecommons.org/licenses/by/3.0/<br />
<br />
<br />
<br />
float burst_radius = 1.0;<br />
float angle_begin = PI_BY_TWO;<br />
float angle_end = PI_BY_TWO;<br />
key target = "";<br />
<br />
vector start_color = <0.5,0.0,1.0>;<br />
vector end_color = <0.0,0.0,0.0>;<br />
float start_alpha = 1.0;<br />
float end_alpha = 0.1;<br />
vector start_scale = <0.5,0.5,0.5>;<br />
vector end_scale = <1.0,1.0,1.0>;<br />
key texture = "dcab6cc4-172f-e30d-b1d0-f558446f20d4";<br />
float start_glow = 0.0;<br />
float end_glow = 0.0;<br />
<br />
float source_max_age = 0.0;<br />
float particle_max_age = 2.0;<br />
float burst_rate = 0.02;<br />
integer burst_particle_count = 2;<br />
<br />
vector acceleration = <0.0,1.0,1.0>;<br />
vector omega = <2.0,0.0,0.0>;<br />
float speed_min = 1.0;<br />
float speed_max = 1.0;<br />
<br />
Particles()<br />
{<br />
llParticleSystem([<br />
<br />
//System Behaviour<br />
PSYS_PART_FLAGS, <br />
//PSYS_PART_BOUNCE_MASK <br />
PSYS_PART_EMISSIVE_MASK <br />
//| PSYS_PART_FOLLOW_SRC_MASK <br />
| PSYS_PART_FOLLOW_VELOCITY_MASK <br />
| PSYS_PART_INTERP_COLOR_MASK <br />
| PSYS_PART_INTERP_SCALE_MASK <br />
//| PSYS_PART_RIBBON_MASK <br />
//| PSYS_PART_TARGET_LINEAR_MASK <br />
//| PSYS_PART_TARGET_POS_MASK <br />
//| PSYS_PART_WIND_MASK<br />
,<br />
<br />
//System Presentation<br />
PSYS_SRC_PATTERN,<br />
//PSYS_SRC_PATTERN_ANGLE<br />
//PSYS_SRC_PATTERN_ANGLE_CONE<br />
//PSYS_SRC_PATTERN_ANGLE_CONE_EMPTY<br />
PSYS_SRC_PATTERN_DROP<br />
//PSYS_SRC_PATTERN_EXPLODE<br />
,<br />
<br />
PSYS_SRC_BURST_RADIUS, burst_radius,<br />
//PSYS_SRC_INNERANGLE, angle_begin, //Either or<br />
//PSYS_SRC_OUTERANGLE, angle_end,<br />
PSYS_SRC_ANGLE_BEGIN, angle_begin, //Either or<br />
PSYS_SRC_ANGLE_END, angle_end,<br />
PSYS_SRC_TARGET_KEY, target,<br />
<br />
//Particle appearance<br />
PSYS_PART_START_COLOR, start_color,<br />
PSYS_PART_END_COLOR, end_color,<br />
PSYS_PART_START_ALPHA, start_alpha,<br />
PSYS_PART_END_ALPHA, end_alpha,<br />
PSYS_PART_START_SCALE, start_scale,<br />
PSYS_PART_END_SCALE, end_scale,<br />
PSYS_SRC_TEXTURE, texture,<br />
PSYS_PART_START_GLOW, start_glow,<br />
PSYS_PART_END_GLOW, end_glow,<br />
<br />
//Particle Blending<br />
PSYS_PART_BLEND_FUNC_SOURCE,<br />
//PSYS_PART_BF_ONE<br />
//PSYS_PART_BF_ZERO<br />
//PSYS_PART_BF_DEST_COLOR<br />
//PSYS_PART_BF_SOURCE_COLOR<br />
//PSYS_PART_BF_ONE_MINUS_DEST_COLOR<br />
//PSYS_PART_BF_ONE_MINUS_SOURCE_COLOR<br />
PSYS_PART_BF_SOURCE_ALPHA<br />
//PSYS_PART_BF_ONE_MINUS_SOURCE_ALPHA<br />
,<br />
PSYS_PART_BLEND_FUNC_DEST,<br />
//PSYS_PART_BF_ONE<br />
//PSYS_PART_BF_ZERO<br />
//PSYS_PART_BF_DEST_COLOR<br />
//PSYS_PART_BF_SOURCE_COLOR<br />
//PSYS_PART_BF_ONE_MINUS_DEST_COLOR<br />
//PSYS_PART_BF_ONE_MINUS_SOURCE_COLOR<br />
//PSYS_PART_BF_SOURCE_ALPHA<br />
PSYS_PART_BF_ONE_MINUS_SOURCE_ALPHA<br />
,<br />
<br />
//Particle Flow<br />
PSYS_SRC_MAX_AGE, source_max_age,<br />
PSYS_PART_MAX_AGE, particle_max_age,<br />
PSYS_SRC_BURST_RATE, burst_rate,<br />
PSYS_SRC_BURST_PART_COUNT, burst_particle_count, <br />
<br />
//Particle Motion<br />
PSYS_SRC_ACCEL, acceleration,<br />
PSYS_SRC_OMEGA, omega,<br />
PSYS_SRC_BURST_SPEED_MIN, speed_min,<br />
PSYS_SRC_BURST_SPEED_MAX, speed_max<br />
<br />
]);<br />
}<br />
<br />
default <br />
{<br />
state_entry()<br />
{<br />
Particles();<br />
}<br />
}<br />
</lsl></div>Draconis Neurocamhttps://wiki.secondlife.com/w/index.php?title=Neurocam_Particle_Engine&diff=1182159Neurocam Particle Engine2013-10-04T07:41:38Z<p>Draconis Neurocam: </p>
<hr />
<div><lsl> <br />
//Written By Draconis Neurocam<br />
<br />
//You are free:<br />
<br />
// * to Share — to copy, distribute and transmit the work<br />
// * to Remix — to adapt the work<br />
<br />
<br />
//Under the following conditions:<br />
<br />
// *<br />
<br />
// Attribution. You must attribute the work in the manner specified by the author or licensor (but not in any way that suggests that they endorse you or your use of the work).<br />
<br />
// Attribute this work:<br />
// What does "Attribute this work" mean?<br />
// The page you came from contained embedded licensing metadata, including how the creator wishes to be attributed for re-use. You can use the HTML here to cite the work. <br />
// Doing so will also include metadata on your page so that others can find the original work as well.<br />
<br />
// * For any reuse or distribution, you must make clear to others the license terms of this work. The best way to do this is with a link to this web page.<br />
// * Any of the above conditions can be waived if you get permission from the copyright holder.<br />
// * Nothing in this license impairs or restricts the author's moral rights.<br />
//http://creativecommons.org/licenses/by/3.0/<br />
<br />
<br />
<br />
float burst_radius = 1.0;<br />
float angle_begin = PI_BY_TWO;<br />
float angle_end = PI_BY_TWO;<br />
key target = "";<br />
<br />
vector start_color = <0.5,0.0,1.0>;<br />
vector end_color = <0.0,0.0,0.0>;<br />
float start_alpha = 1.0;<br />
float end_alpha = 0.1;<br />
vector start_scale = <0.5,0.5,0.5>;<br />
vector end_scale = <1.0,1.0,1.0>;<br />
key texture = "dcab6cc4-172f-e30d-b1d0-f558446f20d4";<br />
float start_glow = 0.0;<br />
float end_glow = 0.0;<br />
<br />
float source_max_age = 0.0;<br />
float particle_max_age = 2.0;<br />
float burst_rate = 0.02;<br />
integer burst_particle_count = 2;<br />
<br />
vector acceleration = <0.0,1.0,1.0>;<br />
vector omega = <2.0,0.0,0.0>;<br />
float speed_min = 1.0;<br />
float speed_max = 1.0;<br />
<br />
Particles()<br />
{<br />
llParticleSystem([<br />
<br />
//System Behaviour<br />
PSYS_PART_FLAGS, <br />
//PSYS_PART_BOUNCE_MASK <br />
PSYS_PART_EMISSIVE_MASK <br />
//| PSYS_PART_FOLLOW_SRC_MASK <br />
| PSYS_PART_FOLLOW_VELOCITY_MASK <br />
| PSYS_PART_INTERP_COLOR_MASK <br />
| PSYS_PART_INTERP_SCALE_MASK <br />
//| PSYS_PART_RIBBON_MASK <br />
//| PSYS_PART_TARGET_LINEAR_MASK <br />
//| PSYS_PART_TARGET_POS_MASK <br />
//| PSYS_PART_WIND_MASK<br />
,<br />
<br />
//System Presentation<br />
PSYS_SRC_PATTERN,<br />
//PSYS_SRC_PATTERN_ANGLE<br />
//PSYS_SRC_PATTERN_ANGLE_CONE<br />
//PSYS_SRC_PATTERN_ANGLE_CONE_EMPTY<br />
PSYS_SRC_PATTERN_DROP<br />
//PSYS_SRC_PATTERN_EXPLODE<br />
,<br />
<br />
PSYS_SRC_BURST_RADIUS, burst_radius,<br />
//PSYS_SRC_INNERANGLE, angle_begin, //Either or<br />
//PSYS_SRC_OUTERANGLE, angle_end,<br />
PSYS_SRC_ANGLE_BEGIN, angle_begin, //Either or<br />
PSYS_SRC_ANGLE_END, angle_end,<br />
PSYS_SRC_TARGET_KEY, target,<br />
<br />
//Particle appearance<br />
PSYS_PART_START_COLOR, start_color,<br />
PSYS_PART_END_COLOR, end_color,<br />
PSYS_PART_START_ALPHA, start_alpha,<br />
PSYS_PART_END_ALPHA, end_alpha,<br />
PSYS_PART_START_SCALE, start_scale,<br />
PSYS_PART_END_SCALE, end_scale,<br />
PSYS_SRC_TEXTURE, texture,<br />
PSYS_PART_START_GLOW, start_glow,<br />
PSYS_PART_END_GLOW, end_glow,<br />
<br />
//Particle Blending<br />
PSYS_PART_BLEND_FUNC_SOURCE,<br />
//PSYS_PART_BF_ONE<br />
//PSYS_PART_BF_ZERO<br />
//PSYS_PART_BF_DEST_COLOR<br />
//PSYS_PART_BF_SOURCE_COLOR<br />
//PSYS_PART_BF_ONE_MINUS_DEST_COLOR<br />
//PSYS_PART_BF_ONE_MINUS_SOURCE_COLOR<br />
PSYS_PART_BF_SOURCE_ALPHA<br />
//PSYS_PART_BF_ONE_MINUS_SOURCE_ALPHA<br />
,<br />
PSYS_PART_BLEND_FUNC_DEST,<br />
//PSYS_PART_BF_ONE<br />
//PSYS_PART_BF_ZERO<br />
//PSYS_PART_BF_DEST_COLOR<br />
//PSYS_PART_BF_SOURCE_COLOR<br />
//PSYS_PART_BF_ONE_MINUS_DEST_COLOR<br />
//PSYS_PART_BF_ONE_MINUS_SOURCE_COLOR<br />
//PSYS_PART_BF_SOURCE_ALPHA<br />
PSYS_PART_BF_ONE_MINUS_SOURCE_ALPHA<br />
,<br />
<br />
//Particle Flow<br />
PSYS_SRC_MAX_AGE, source_max_age,<br />
PSYS_PART_MAX_AGE, particle_max_age,<br />
PSYS_SRC_BURST_RATE, burst_rate,<br />
PSYS_SRC_BURST_PART_COUNT, burst_particle_count, <br />
<br />
//Particle Motion<br />
PSYS_SRC_ACCEL, acceleration,<br />
PSYS_SRC_OMEGA, omega,<br />
PSYS_SRC_BURST_SPEED_MIN, speed_min,<br />
PSYS_SRC_BURST_SPEED_MAX, speed_max<br />
<br />
]);<br />
}<br />
<br />
default <br />
{<br />
state_entry()<br />
{<br />
Particles();<br />
}<br />
}<br />
</lsl></div>Draconis Neurocamhttps://wiki.secondlife.com/w/index.php?title=Neurocam_Particle_Engine&diff=1182158Neurocam Particle Engine2013-10-04T06:59:06Z<p>Draconis Neurocam: Updated to the new particle options</p>
<hr />
<div><lsl> <br />
//Written By Draconis Neurocam<br />
<br />
//You are free:<br />
<br />
// * to Share — to copy, distribute and transmit the work<br />
// * to Remix — to adapt the work<br />
<br />
<br />
//Under the following conditions:<br />
<br />
// *<br />
<br />
// Attribution. You must attribute the work in the manner specified by the author or licensor (but not in any way that suggests that they endorse you or your use of the work).<br />
<br />
// Attribute this work:<br />
// What does "Attribute this work" mean?<br />
// The page you came from contained embedded licensing metadata, including how the creator wishes to be attributed for re-use. You can use the HTML here to cite the work. <br />
// Doing so will also include metadata on your page so that others can find the original work as well.<br />
<br />
// * For any reuse or distribution, you must make clear to others the license terms of this work. The best way to do this is with a link to this web page.<br />
// * Any of the above conditions can be waived if you get permission from the copyright holder.<br />
// * Nothing in this license impairs or restricts the author's moral rights.<br />
//http://creativecommons.org/licenses/by/3.0/<br />
<br />
<br />
<br />
float burst_radius = 1.0;<br />
float angle_begin = PI_BY_TWO;<br />
float angle_end = PI_BY_TWO;<br />
key target = "";<br />
<br />
vector start_color = <0.5,0.0,1.0>;<br />
vector end_color = <0.0,0.0,0.0>;<br />
float start_alpha = 1.0;<br />
float end_alpha = 0.1;<br />
vector start_scale = <0.5,0.5,0.5>;<br />
vector end_scale = <1.0,1.0,1.0>;<br />
key texture = "dcab6cc4-172f-e30d-b1d0-f558446f20d4";<br />
float start_glow = 0.0;<br />
float end_glow = 0.0;<br />
<br />
float source_max_age = 0.0;<br />
float particle_max_age = 2.0;<br />
float burst_rate = 0.02;<br />
integer burst_particle_count = 2;<br />
<br />
vector acceleration = <0.0,1.0,1.0>;<br />
vector omega = <2.0,0.0,0.0>;<br />
float speed_min = 1.0;<br />
float speed_max = 1.0;<br />
<br />
Particles()<br />
{<br />
llParticleSystem([<br />
<br />
//System Behaviour<br />
PSYS_PART_FLAGS, <br />
//PSYS_PART_BOUNCE_MASK <br />
PSYS_PART_EMISSIVE_MASK <br />
//| PSYS_PART_FOLLOW_SRC_MASK <br />
| PSYS_PART_FOLLOW_VELOCITY_MASK <br />
| PSYS_PART_INTERP_COLOR_MASK <br />
| PSYS_PART_INTERP_SCALE_MASK <br />
//| PSYS_PART_RIBBON_MASK <br />
//| PSYS_PART_TARGET_LINEAR_MASK <br />
//| PSYS_PART_TARGET_POS_MASK <br />
//| PSYS_PART_WIND_MASK<br />
,<br />
<br />
//System Presentation<br />
PSYS_SRC_PATTERN,<br />
//PSYS_SRC_PATTERN_ANGLE<br />
//PSYS_SRC_PATTERN_ANGLE_CONE<br />
//PSYS_SRC_PATTERN_ANGLE_CONE_EMPTY<br />
PSYS_SRC_PATTERN_DROP<br />
//PSYS_SRC_PATTERN_EXPLODE<br />
,<br />
<br />
PSYS_SRC_BURST_RADIUS, burst_radius,<br />
//PSYS_SRC_INNERANGLE, angle_begin, //Either or<br />
//PSYS_SRC_OUTERANGLE, angle_end,<br />
PSYS_SRC_ANGLE_BEGIN, angle_begin, //Either or<br />
PSYS_SRC_ANGLE_END, angle_end,<br />
PSYS_SRC_TARGET_KEY, target,<br />
<br />
//Particle appearance<br />
PSYS_PART_START_COLOR, start_color,<br />
PSYS_PART_END_COLOR, end_color,<br />
PSYS_PART_START_ALPHA, start_alpha,<br />
PSYS_PART_END_ALPHA, end_alpha,<br />
PSYS_PART_START_SCALE, start_scale,<br />
PSYS_PART_END_SCALE, end_scale,<br />
PSYS_SRC_TEXTURE, texture,<br />
PSYS_PART_START_GLOW, start_glow,<br />
PSYS_PART_END_GLOW, end_glow,<br />
<br />
//Particle Blending<br />
PSYS_PART_BLEND_FUNC_SOURCE,<br />
//PSYS_PART_BF_ONE,<br />
//PSYS_PART_BF_ZERO,<br />
//PSYS_PART_BF_DEST_COLOR,<br />
//PSYS_PART_BF_SOURCE_COLOR, <br />
//PSYS_PART_BF_ONE_MINUS_DEST_COLOR, <br />
//PSYS_PART_BF_ONE_MINUS_SOURCE_COLOR, <br />
PSYS_PART_BF_SOURCE_ALPHA,<br />
//PSYS_PART_BF_ONE_MINUS_SOURCE_ALPHA,<br />
PSYS_PART_BLEND_FUNC_DEST,<br />
//PSYS_PART_BF_ONE,<br />
//PSYS_PART_BF_ZERO,<br />
//PSYS_PART_BF_DEST_COLOR,<br />
//PSYS_PART_BF_SOURCE_COLOR, <br />
//PSYS_PART_BF_ONE_MINUS_DEST_COLOR, <br />
//PSYS_PART_BF_ONE_MINUS_SOURCE_COLOR, <br />
//PSYS_PART_BF_SOURCE_ALPHA,<br />
PSYS_PART_BF_ONE_MINUS_SOURCE_ALPHA,<br />
<br />
//Particle Flow<br />
PSYS_SRC_MAX_AGE, source_max_age,<br />
PSYS_PART_MAX_AGE, particle_max_age,<br />
PSYS_SRC_BURST_RATE, burst_rate,<br />
PSYS_SRC_BURST_PART_COUNT, burst_particle_count, <br />
<br />
//Particle Motion<br />
PSYS_SRC_ACCEL, acceleration,<br />
PSYS_SRC_OMEGA, omega,<br />
PSYS_SRC_BURST_SPEED_MIN, speed_min,<br />
PSYS_SRC_BURST_SPEED_MAX, speed_max<br />
<br />
]);<br />
}<br />
<br />
default <br />
{<br />
state_entry()<br />
{<br />
Particles();<br />
}<br />
}<br />
</lsl></div>Draconis Neurocamhttps://wiki.secondlife.com/w/index.php?title=Content_Creation/Mesh_Import_User_Group&diff=1167245Content Creation/Mesh Import User Group2012-05-14T19:24:51Z<p>Draconis Neurocam: </p>
<hr />
<div>{{User Group Page<br />
|purpose=<br />
Currently topics are focused on anything related to the mesh import project. Feature requests, bug reports, design feedback, questions, comments, or example content are welcome.<br />
<br />
Priority will be given to topics that are posted in advance and are relevant to the goals of the office hour. Feel free to include relevant links to JIRA or wiki pages. <br />
<br />
<br />
<br clear="all"/><br />
{{Navbox/Mesh|project}}<br />
|date-time= <br />
Mondays at Noon in Pacific time (SL standard time)<br />
<br />
|location= <br />
[http://maps.secondlife.com/secondlife/Borrowdale/79/225/32 Borrowdale on AGNI]<br />
<br />
|team=<br />
Nyx Linden, Runitai Linden, and occasional other guest lindens. Please contact one of us if you are unsure if your topic is relevant or appropriate.<br />
|agenda=<br />
<br><br><br />
<br />
<br />
Please add topics below '''prior to 11:50 AM'''. Also, please put your SL name down so we can follow up if we have questions. Thanks!<br />
<br />
Enter agenda items here (with name, please)<br />
# Any news on Bake Fail and the Runway Project Viewer? [[User:Nalates Urriah|Nalates Urriah]] 13:36, 10 May 2012 (PDT)<br />
# What's the latest on attachment point offsetting recognition in the uploader? [[User:Tiberious Neruda|Tiberious Neruda]]<br />
# What high priority changes are nearing completion that you can talk about? [[User:Draconis Neurocam|Draconis Neurocam]] 12:24, 14 May 2012 (PDT)<br />
# your topic here! End with 3 or 4 ~ to add your name or name and date<br />
<br />
|archive=<br />
{{:Content_Creation,_Mesh_Import_User_Group/Archive}}<br />
}}<br />
[[Category:Mesh]]</div>Draconis Neurocamhttps://wiki.secondlife.com/w/index.php?title=Transaction_result&diff=1165950Transaction result2012-04-19T22:28:30Z<p>Draconis Neurocam: </p>
<hr />
<div>{{LSL_Event<br />
|inject-1={{LSL Function/avatar|llTransferLindenDollars_destination|nc=*}}<br />
{{#vardefine:p_llTransferLindenDollars_amount_desc|Value greater than zero.}}<br />
|event_id=34|event_delay<br />
|event=transaction_result<br />
|p1_type=key|p1_name=id|p1_desc=matches the return of the {{LSLGC|Transfer|llTransfer*}} function|p1_hover=matches the return of the llTransfer* function<br />
|p2_type=integer |p2_name=success|p2_desc=[[TRUE]] if the transfer succeeded otherwise [[FALSE]].<br />
|p3_type=string|p3_name=data|p3_desc=On successful transactions this will contain a [[llCSV2List|CSV]] of information pertaining to the transaction. In failure, a string will be returned matching one of the error tags below.<br />
|event_desc=Triggered when task receives asynchronous data<br />
|constants=<br />
{{{!}} {{Prettytable|style=margin-top:0;}}<br />
{{!}}- {{Hl2}}<br />
! {{LSLGC|Transfer|llTransfer*}} Function<br />
----<br />
''{{LSL Param|data}}'' CSV Contents<br />
! Error Tag (Returned from data)<br />
! Error Tag Description<br />
{{!}}-<br />
{{!}} rowspan=10 {{!}} {{HoverLink|key|key that matches id of transaction_result event}}&nbsp;[[llTransferLindenDollars]](&nbsp;[[key]]&nbsp;{{LSL Param|llTransferLindenDollars_destination|destination}}, [[integer]]&nbsp;{{LSL Param|llTransferLindenDollars_amount|amount}}&nbsp;)<br />
----<br />
[&nbsp;[[key]]&nbsp;{{LSL Param|llTransferLindenDollars_destination|destination}}, [[integer]]&nbsp;{{LSL Param|llTransferLindenDollars_amount|amount}}&nbsp;]<br />
{{!}} LINDENDOLLAR_INSUFFICIENTFUNDS<br />
{{!}} The source agent does not have enough L$ for the transfer<br />
{{!}}-<br />
{{!}} LINDENDOLLAR_ENTITYDOESNOTEXIST<br />
{{!}} The destination UUID is not a valid agent.<br />
{{!}}-<br />
{{!}} LINDENDOLLAR_BADCLOCKSKEW<br />
{{!}} There is bad clock skew between the sim host and the L$ service<br />
{{!}}-<br />
{{!}} INVALID_AGENT<br />
{{!}} Destination agent is not a valid UUID<br />
{{!}}-<br />
{{!}} INVALID_AMOUNT<br />
{{!}} Amount is <= 0<br />
{{!}}-<br />
{{!}} THROTTLED<br />
{{!}} The scripted L$ throttle was hit for this object owner.<br />
{{!}}-<br />
{{!}} MISSING_PERMISSION_DEBIT<br />
{{!}} The script does not have [[PERMISSION_DEBIT|debit permission]]<br />
{{!}}-<br />
{{!}} GROUP_OWNED<br />
{{!}} The object is group owned and thus can't give money<br />
{{!}}-<br />
{{!}} TRANSFERS_DISABLED<br />
{{!}} L$ transfers are disabled in the region<br />
{{!}}-<br />
{{!}} EXPIRED<br />
{{!}} The simulator timed out waiting for a response from the back-end service.<br />
{{!}}-<br />
{{!}} SERVICE_ERROR<br />
{{!}} There was an error connecting to the back-end service<br />
{{!}}-<br />
{{!}}}<br />
|history=<br />
* New LSL event: [[transaction_result]](key id, integer success, string data)<br />
*: This event is triggered from an {{LSLGC|Transfer|llTransfer*}} call (currently only [[llTransferLindenDollars]]).<br />
** id: matches the return value of the {{LSLGC|Transfer|llTransfer*}} call and if the transaction was a success will match the 'transaction id' shown in transaction history on secondlife.com<br />
** success: [[TRUE]] if the transfer succeeded otherwise [[FALSE]].<br />
** data: On successful transactions will contain a CSV of destination ID and amount transferred. In failure cases it will contain an error tag on failure.<br />
* Error Tags for [[llTransferLindenDollars]]:<br />
** LINDENDOLLAR_ENTITYDOESNOTEXIST - The destination UUID is not a valid agent.<br />
** LINDENDOLLAR_INSUFFICIENTFUNDS - The source agent does not have enough L$ for the transfer<br />
** INVALID_AGENT - Destination agent is not a valid UUID<br />
** INVALID_AMOUNT - Amount is <= 0<br />
** THROTTLED - The scripted L$ throttle was hit for this object owner.<br />
** MISSING_PERMISSION_DEBIT - The script does not have debit permission<br />
** GROUP_OWNED - The object is group owned and thus can't give money<br />
** TRANSFERS_DISABLED - L$ transfers are disabled in the region<br />
** EXPIRED - The simulator timed out waiting for a response from the back-end service.<br />
** SERVICE_ERROR - There was an error connecting to the back-end service<br />
|caveats<br />
|examples<br />
|helpers<br />
|also_header<br />
|also_events<br />
|also_functions<br />
|also_articles<br />
|also_footer<br />
|notes=* released 3-Dec-2011<br />
|mode<br />
|deprecated<br />
|cat1=Transfer<br />
|cat2<br />
|cat3<br />
|cat4<br />
}}</div>Draconis Neurocamhttps://wiki.secondlife.com/w/index.php?title=User:Draconis_Neurocam&diff=1165331User:Draconis Neurocam2012-04-09T03:18:28Z<p>Draconis Neurocam: </p>
<hr />
<div>Salutations, I am Draconis Neurocam.<br />
<br />
My goal is to make things better to the best of my ability.<br />
<br />
This place is something I dreamed would exist as a child, and now since it does, I love being a part of it.<br />
<br />
What most people never actually realize is how powerful what we have at our fingertips is.<br />
<br />
I take this as an extension of real life, and not something separate.<br />
----<br />
[http://twitter.com/Neurocam_ @Neurocam_]<br />
<lsl><br />
//Written by Nomad Padar one of the most genius people I have ever known<br />
vector int2vec(integer n) {<br />
//0zyx ZZZZ ZZZZ ZZZZ YYYY YYYY XXXX XXXX<br />
return <n&0xFF, (n>>8)&0xFF, ((n>>16)&0xFF)> + <((n&0x10000000)!=0)*.5,((n&0x20000000)!=0)*.5,((n&0x40000000)!=0)*.5>;<br />
}<br />
integer vec2int(vector v) {<br />
integer x = (integer)(v.x);<br />
integer y = (integer)(v.y);<br />
integer z = (integer)(v.z);<br />
integer out;<br />
<br />
//Rounds to 0, .5, or 1.0<br />
float delta = v.x-x;<br />
if((delta>.25) && (delta<.75)) out += 0x10000000;<br />
else if(delta>.75) out += 0x1;<br />
delta = v.y-y;<br />
if((delta>.25) && (delta<.75)) out += 0x20000000;<br />
else if(delta>.75) out += 0x100;<br />
delta = v.z-z;<br />
if((delta>.25) && (delta<.75)) out += 0x40000000;<br />
else if(delta>.75) out += 0x10000;<br />
out += x+(y<<8)+(z<<16);<br />
return out;<br />
}<br />
default<br />
{<br />
touch_start(integer total_number)<br />
{<br />
integer param = vec2int(llGetPos());<br />
llSay(0, (string)param);<br />
llSay(0, (string)int2vec(param));<br />
}<br />
}<br />
<br />
</lsl><br />
<br />
<lsl><br />
SetLinkPosLocal2Root(integer linknum,vector offset)<br />
{<br />
llSetLinkPrimitiveParamsFast(linknum, [PRIM_POSITION, (llList2Vector(llGetLinkPrimitiveParams(linknum, [PRIM_POS_LOCAL]),0))+offset]);<br />
}<br />
</lsl><br />
<br />
<lsl><br />
<value,maxvalue - value,0> / maxvalue<br />
</lsl><br />
<br />
<lsl><br />
llGetPos() + <1,0,0>*llGetRot()<br />
</lsl><br />
<br />
<lsl><br />
list ray(vector s, vector e)<br />
{<br />
return llCastRay(s,e,<br />
[<br />
RC_REJECT_TYPES,<br />
0<br />
//RC_REJECT_AGENTS<br />
//|RC_REJECT_PHYSICAL<br />
//|RC_REJECT_NONPHYSICAL<br />
//|RC_REJECT_LAND<br />
,<br />
RC_DATA_FLAGS,<br />
0<br />
//RC_GET_NORMAL<br />
//|RC_GET_ROOT_KEY<br />
//|RC_GET_LINK_NUM<br />
,<br />
RC_MAX_HITS, 1,<br />
RC_DETECT_PHANTOM,FALSE <br />
]);<br />
}<br />
</lsl><br />
<lsl><br />
//forwards loop through n<br />
(i=(i+1)%n)<br />
//backwards loop through n<br />
(i=(n+i-1)%n)<br />
</lsl><br />
{{skills<br />
|Architect=*<br />
|Builder=*<br />
|Machinima=<br />
|Scenographer=<br />
|Scripter=*<br />
|SLogistician=*<br />
|Terraformer=<br />
|}}<br />
{{Tweeter}}<br />
{{ISO 639-3/cat-speaking|eng}}</div>Draconis Neurocamhttps://wiki.secondlife.com/w/index.php?title=User:Draconis_Neurocam&diff=1164769User:Draconis Neurocam2012-03-28T01:40:20Z<p>Draconis Neurocam: </p>
<hr />
<div>Salutations, I am Draconis Neurocam.<br />
<br />
My goal is to make things better to the best of my ability.<br />
<br />
This place is something I dreamed would exist as a child, and now since it does, I love being a part of it.<br />
<br />
What most people never actually realize is how powerful what we have at our fingertips is.<br />
<br />
I take this as an extension of real life, and not something separate.<br />
----<br />
[http://twitter.com/Neurocam_ @Neurocam_]<br />
<lsl><br />
//Written by Nomad Padar one of the most genius people I have ever known<br />
vector int2vec(integer n) {<br />
//0zyx ZZZZ ZZZZ ZZZZ YYYY YYYY XXXX XXXX<br />
return <n&0xFF, (n>>8)&0xFF, ((n>>16)&0xFF)> + <((n&0x10000000)!=0)*.5,((n&0x20000000)!=0)*.5,((n&0x40000000)!=0)*.5>;<br />
}<br />
integer vec2int(vector v) {<br />
integer x = (integer)(v.x);<br />
integer y = (integer)(v.y);<br />
integer z = (integer)(v.z);<br />
integer out;<br />
<br />
//Rounds to 0, .5, or 1.0<br />
float delta = v.x-x;<br />
if((delta>.25) && (delta<.75)) out += 0x10000000;<br />
else if(delta>.75) out += 0x1;<br />
delta = v.y-y;<br />
if((delta>.25) && (delta<.75)) out += 0x20000000;<br />
else if(delta>.75) out += 0x100;<br />
delta = v.z-z;<br />
if((delta>.25) && (delta<.75)) out += 0x40000000;<br />
else if(delta>.75) out += 0x10000;<br />
out += x+(y<<8)+(z<<16);<br />
return out;<br />
}<br />
default<br />
{<br />
touch_start(integer total_number)<br />
{<br />
integer param = vec2int(llGetPos());<br />
llSay(0, (string)param);<br />
llSay(0, (string)int2vec(param));<br />
}<br />
}<br />
<br />
</lsl><br />
<br />
<lsl><br />
SetLinkPosLocal2Root(integer linknum,vector offset)<br />
{<br />
llSetLinkPrimitiveParamsFast(linknum, [PRIM_POSITION, (llList2Vector(llGetLinkPrimitiveParams(linknum, [PRIM_POS_LOCAL]),0))+offset]);<br />
}<br />
</lsl><br />
<br />
<lsl><br />
<value,maxvalue - value,0> / maxvalue<br />
</lsl><br />
<br />
<lsl><br />
list ray(vector s, vector e)<br />
{<br />
return llCastRay(s,e,<br />
[<br />
RC_REJECT_TYPES,<br />
0<br />
//RC_REJECT_AGENTS<br />
//|RC_REJECT_PHYSICAL<br />
//|RC_REJECT_NONPHYSICAL<br />
//|RC_REJECT_LAND<br />
,<br />
RC_DATA_FLAGS,<br />
0<br />
//RC_GET_NORMAL<br />
//|RC_GET_ROOT_KEY<br />
//|RC_GET_LINK_NUM<br />
,<br />
RC_MAX_HITS, 1,<br />
RC_DETECT_PHANTOM,FALSE <br />
]);<br />
}<br />
</lsl><br />
<lsl><br />
//forwards loop through n<br />
(i=(i+1)%n)<br />
//backwards loop through n<br />
(i=(n+i-1)%n)<br />
</lsl><br />
{{skills<br />
|Architect=*<br />
|Builder=*<br />
|Machinima=<br />
|Scenographer=<br />
|Scripter=*<br />
|SLogistician=*<br />
|Terraformer=<br />
|}}<br />
{{Tweeter}}<br />
{{ISO 639-3/cat-speaking|eng}}</div>Draconis Neurocamhttps://wiki.secondlife.com/w/index.php?title=Content_Creation/Mesh_Import_User_Group&diff=1164657Content Creation/Mesh Import User Group2012-03-26T18:22:29Z<p>Draconis Neurocam: </p>
<hr />
<div>{{User Group Page<br />
|purpose=<br />
Currently topics are focused on anything related to the mesh import project. Feature requests, bug reports, design feedback, questions, comments, or example content are welcome.<br />
<br />
Priority will be given to topics that are posted in advance and are relevant to the goals of the office hour. Feel free to include relevant links to JIRA or wiki pages. <br />
<br />
<br />
<br clear="all"/><br />
{{Navbox/Mesh|project}}<br />
|date-time= <br />
Mondays at Noon in Pacific time (SL standard time)<br />
<br />
|location= <br />
[http://maps.secondlife.com/secondlife/Borrowdale/79/225/32 Borrowdale on AGNI]<br />
<br />
|team=<br />
Nyx Linden, Runitai Linden, and occasional other guest lindens. Please contact one of us if you are unsure if your topic is relevant or appropriate.<br />
|agenda=<br />
<br><br><br />
<br />
<br />
Please add topics below '''prior to 11:50 AM'''. Also, please put your SL name down so we can follow up if we have questions. Thanks!<br />
<br />
Enter agenda items here (with name, please)<br />
# Not a question, but major thanks for implementing the transparent rigged mesh fix in such a way it broke absolutely zero content. [Tiberious]<br />
# Increase the default rendervolumeLODFactor setting from the current 1.25 to 6 [Tray Guisse]<br />
# Add your topic here!<br />
<br />
|archive=<br />
{{:Content_Creation,_Mesh_Import_User_Group/Archive}}<br />
}}<br />
[[Category:Mesh]]</div>Draconis Neurocamhttps://wiki.secondlife.com/w/index.php?title=Content_Creation/Mesh_Import_User_Group&diff=1164655Content Creation/Mesh Import User Group2012-03-26T18:10:11Z<p>Draconis Neurocam: </p>
<hr />
<div>{{User Group Page<br />
|purpose=<br />
Currently topics are focused on anything related to the mesh import project. Feature requests, bug reports, design feedback, questions, comments, or example content are welcome.<br />
<br />
Priority will be given to topics that are posted in advance and are relevant to the goals of the office hour. Feel free to include relevant links to JIRA or wiki pages. <br />
<br />
<br />
<br clear="all"/><br />
{{Navbox/Mesh|project}}<br />
|date-time= <br />
Mondays at Noon in Pacific time (SL standard time)<br />
<br />
|location= <br />
[http://maps.secondlife.com/secondlife/Borrowdale/79/225/32 Borrowdale on AGNI]<br />
<br />
|team=<br />
Nyx Linden, Runitai Linden, and occasional other guest lindens. Please contact one of us if you are unsure if your topic is relevant or appropriate.<br />
|agenda=<br />
<br><br><br />
<br />
<br />
Please add topics below '''prior to 11:50 AM'''. Also, please put your SL name down so we can follow up if we have questions. Thanks!<br />
<br />
Enter agenda items here (with name, please)<br />
# Not a question, but major thanks for implementing the transparent rigged mesh fix in such a way it broke absolutely zero content. [Tiberious]<br />
# Increase the default rendervolumeLODFactor setting from the current 1.25 to 6 [Tray Guisse]<br />
# Add a way to make the bounds of the object appear larger than the actual object, IE a way make very tiny models that scale properly. [[User:Draconis Neurocam|Draconis Neurocam]] 11:10, 26 March 2012 (PDT)<br />
# Add your topic here!<br />
<br />
|archive=<br />
{{:Content_Creation,_Mesh_Import_User_Group/Archive}}<br />
}}<br />
[[Category:Mesh]]</div>Draconis Neurocamhttps://wiki.secondlife.com/w/index.php?title=Template:ViewerDevelopmentInstallers&diff=1164537Template:ViewerDevelopmentInstallers2012-03-22T20:35:09Z<p>Draconis Neurocam: changed snowstorm to integration so the details page works for all current builds</p>
<hr />
<div><includeonly><br />
{{ColorBox|Latest Development Viewers:|<br />[http://automated-builds-secondlife-com.s3.amazonaws.com/hg/repo/snowstorm_viewer-development/arch/CYGWIN/quicklink.html Windows]&nbsp;&#124;&nbsp;[http://automated-builds-secondlife-com.s3.amazonaws.com/hg/repo/snowstorm_viewer-development/arch/Darwin/quicklink.html Macintosh]&nbsp;&#124;&nbsp;[http://automated-builds-secondlife-com.s3.amazonaws.com/hg/repo/snowstorm_viewer-development/arch/Linux/quicklink.html Linux]{{#ifeq: {{{showdetails|1}}} | 1 | <hr/><small>[http://automated-builds-secondlife-com.s3.amazonaws.com/hg/repo/integration_viewer-development/latest.html Details for these builds] (build logs, included changesets)</small>|}}}}<br />
</includeonly><br />
<noinclude><br />
<br />
With the parameter <tt>showdetails=1</tt> (which is the default):<br />
<br />
{{ViewerDevelopmentInstallers}}<br />
<br />
With the parameter <tt>showdetails=0</tt>:<br />
<br />
{{ViewerDevelopmentInstallers|showdetails=0}}<br />
<br />
</noinclude></div>Draconis Neurocamhttps://wiki.secondlife.com/w/index.php?title=Template:LSL_Constants/PrimitiveParams&diff=1160785Template:LSL Constants/PrimitiveParams2012-01-09T10:18:18Z<p>Draconis Neurocam: added link target</p>
<hr />
<div><noinclude>{{multi-lang}}</noinclude>{{#if:<br />
{{:PRIM_NAME|{{{1|}}}}}<br />
{{:PRIM_DESC|{{{1|}}}}}<br />
{{:PRIM_COLOR|{{{1|}}}}}<br />
{{:PRIM_GLOW|{{{1|}}}}}<br />
{{:PRIM_TEXTURE|{{{1|}}}}}<br />
{{:PRIM_TEXT|{{{1|}}}}}<br />
{{:PRIM_FULLBRIGHT|{{{1|}}}}}<br />
{{:PRIM_TEXGEN|{{{1|}}}}}<br />
{{:PRIM_BUMP_SHINY|{{{1|}}}}}<br />
{{:PRIM_MATERIAL|{{{1|}}}}}<br />
{{:PRIM_TYPE|{{{1|}}}}}<br />
{{:PRIM_TYPE_BOX|{{{1|}}}}}<br />
{{:PRIM_TYPE_SCULPT|{{{1|}}}}}<br />
{{:PRIM_PHANTOM|{{{1|}}}}}<br />
{{:PRIM_TEMP_ON_REZ|{{{1|}}}}}<br />
{{:PRIM_PHYSICS|{{{1|}}}}}<br />
{{:PRIM_SIZE|{{{1|}}}}}<br />
{{:PRIM_POSITION|{{{1|}}}}}<br />
{{:PRIM_POS_LOCAL|{{{1|}}}}}<br />
{{:PRIM_ROTATION|{{{1|}}}}}<br />
{{:PRIM_ROT_LOCAL|{{{1|}}}}}<br />
{{:PRIM_FLEXIBLE|{{{1|}}}}}<br />
{{:PRIM_POINT_LIGHT|{{{1|}}}}}<br />
{{:PRIM_OMEGA|{{{1|}}}}}<br />
{{:PRIM_LINK_TARGET|{{{1|}}}}}<br />
{{:PRIM_PHYSICS_SHAPE_TYPE|{{{1|}}}}}<br />
{{:PRIM_PHYSICS_MATERIAL|{{{1|}}}}}<br />
<br />
{{#ifeq:{{{1|set}}}|set|{{#vardefine:caveats|{{#var:caveats}}<br />
* [[PRIM_PHANTOM]], [[PRIM_PHYSICS]] and [[PRIM_TEMP_ON_REZ]] applies to the entire object (linkset).<br />
* Values may drift, become truncated or be range limited. Some limits are applied by the client during deserialization before rendering, others are applied by the simulator before storing the values.<br />
** When testing [[vector]]s and [[rotation]]s use [[llVecDist]] and [[llAngleBetween]] (respectively) to perform fuzzy tests.}}}}<br />
<br />
{{LSL_Function/color|color}}<br />
{{LSL_Function/alpha|alpha}}<br />
{{LSL_Function/boolean|boolean}}<br />
{{LSL_Function/face|face|flag|!footer=*|returns=nothing.}}<br />
<br />
}}{{#ifeq:{{{1|<noinclude>set</noinclude>}}}|set|<br />
{{{!}} class="sortable" {{Prettytable|style=margin: 0px 0px 10px 1pt;}}<br />
{{!}}- {{Hl2}}<br />
! class="sortable" {{!}}Flag<br />
! class="sortable" title="Value" style="cursor: help;" {{!}}<span style="border-bottom: 1px dotted;">V</span><br />
! class="sortable" {{!}}Description<br />
! class="unsortable" {{!}}Usage<br />
{{!}}-<br />
{{!}} [[#PRIM_NAME|PRIM_NAME]]<br />
{{!}} 27<br />
{{!}} Sets the prim's name.<br />
{{!}} [&nbsp;{{#var:name_const}}, [[string]]&nbsp;{{LSL Param|name}}&nbsp;]<br />
{{!}}-<br />
{{!}} [[#PRIM_DESC|PRIM_DESC]]<br />
{{!}} 28<br />
{{!}} Sets the prim's description.<br />
{{!}} [&nbsp;{{#var:desc_const}}, [[string]]&nbsp;{{LSL Param|description}}&nbsp;]<br />
{{!}}-<br />
{{!}} [[#PRIM_TYPE|PRIM_TYPE]]<br />
{{!}} 9<br />
{{!}} Sets the prim's shape.<br />
{{!}} [&nbsp;{{#var:type_const}}, [[integer]]&nbsp;{{HoverText|flag|PRIM_TYPE_* flag}}&nbsp;]&nbsp;+ {{HoverLink|#PRIM_TYPE_flag_parameters|Additional parameters required by the flag|flag_parameters}}<br />
{{!}}-<br />
{{!}} [[#PRIM_LINK_TARGET|PRIM_LINK_TARGET]]<br />
{{!}} 34<br />
{{!}} Sets the next linknumber to use in the linkset.<br />
{{!}} [&nbsp;{{#var:link_target_const}}[[integer]]&nbsp;{{LSL Param|link_target}}&nbsp;]<br />
{{!}}-<br />
{{!}} [[#PRIM_PHYSICS_SHAPE_TYPE|PRIM_PHYSICS_SHAPE_TYPE]]<br />
{{!}} 30<br />
{{!}} Sets the prim's physics shape type.<br />
{{!}} [&nbsp;{{#var:physics_shape_type_const}}, [[integer]]&nbsp;{{LSL Param|pstype|type}}&nbsp;]<br />
{{!}}-<br />
{{!}} [[#PRIM_MATERIAL|PRIM_MATERIAL]]<br />
{{!}} 2<br />
{{!}} Sets the prim's material.<br />
{{!}} [&nbsp;{{#var:material_const}}, [[integer]]&nbsp;{{HoverText|flag|PRIM_MATERIAL_* flag}}&nbsp;]<br />
{{!}}-<br />
{{!}} [[#PRIM_PHYSICS_MATERIAL|PRIM_PHYSICS_MATERIAL]]<br />
{{!}} 31<br />
{{!}} Sets the prim's physics material properties.<br />
{{!}} [&nbsp;{{#var:physics_material_const}}, [[integer]]&nbsp;{{LSL Param|material_bits}}, [[float]]&nbsp;{{LSL Param|gravity_multiplier}}, [[float]]&nbsp;{{LSL Param|restitution}}, [[float]]&nbsp;{{LSL Param|friction}}, [[float]]&nbsp;{{LSL Param|density}}&nbsp;]<br />
{{!}}-<br />
{{!}} [[#PRIM_PHYSICS|PRIM_PHYSICS]]<br />
{{!}} 3<br />
{{!}} Sets the object's physics status.<br />
{{!}} [&nbsp;{{#var:physics_const}}, [[integer]]&nbsp;{{LSL Param|boolean}}&nbsp;]<br />
{{!}}-<br />
{{!}} [[#PRIM_TEMP_ON_REZ|PRIM_TEMP_ON_REZ]]<br />
{{!}} 4<br />
{{!}} Sets the object's {{LSLGC|Temporary|temporary}} attribute.<br />
{{!}} [&nbsp;{{#var:temponrez_const}}, [[integer]]&nbsp;{{LSL Param|boolean}}&nbsp;]<br />
{{!}}-<br />
{{!}} [[#PRIM_PHANTOM|PRIM_PHANTOM]]<br />
{{!}} 5<br />
{{!}} Sets the object's phantom status.<br />
{{!}} [&nbsp;{{#var:phantom_const}}, [[integer]]&nbsp;{{LSL Param|boolean}}&nbsp;]<br />
{{!}}-<br />
{{!}} [[#PRIM_POSITION|PRIM_POSITION]]<br />
{{!}} 6<br />
{{!}} Sets the prim's position.<br />
{{!}} [&nbsp;{{#var:position_const}}, [[vector]]&nbsp;{{LSL Param|position{{{1|}}}|position}}&nbsp;]<br />
{{!}}-<br />
{{!}} [[#PRIM_POS_LOCAL|PRIM_POS_LOCAL]]<br />
{{!}} 33<br />
{{!}} Sets the prim's local position. <br />
{{!}} [&nbsp;{{#var:pos_local_const}}, [[vector]]&nbsp;{{LSL Param|position{{{1|}}}|position}}&nbsp;]<br />
{{!}}-<br />
{{!}} [[#PRIM_ROTATION|PRIM_ROTATION]]<br />
{{!}} 8<br />
{{!}} Sets the prim's global rotation.<br />
{{!}} [&nbsp;{{#var:rotation_const}}, [[rotation]]&nbsp;{{LSL Param|rot}}&nbsp;]<br />
{{!}}-<br />
{{!}} [[#PRIM_ROT_LOCAL|PRIM_ROT_LOCAL]]<br />
{{!}} 29<br />
{{!}} Sets the prim's local rotation.<br />
{{!}} [&nbsp;{{#var:rot_local_const}}, [[rotation]]&nbsp;{{LSL Param|rot}}&nbsp;]<br />
{{!}}-<br />
{{!}} [[#PRIM_SIZE|PRIM_SIZE]]<br />
{{!}} 7<br />
{{!}} Sets the prim's size.<br />
{{!}} [&nbsp;{{#var:size_const}}, [[vector]]&nbsp;{{LSL Param|size}}&nbsp;]<br />
{{!}}-<br />
{{!}} [[#PRIM_TEXTURE|PRIM_TEXTURE]]<br />
{{!}} 17<br />
{{!}} Sets the prim's texture attributes.<br />
{{!}} [&nbsp;{{#var:texture_const}}, [[integer]]&nbsp;{{LSL Param|face}}, [[string]]&nbsp;{{LSL Param|texture}}, [[vector]]&nbsp;{{LSL Param|repeats}}, [[vector]]&nbsp;{{LSL Param|offsets}}, [[float]]&nbsp;{{LSL Param|rotation_in_radians}}&nbsp;]<br />
{{!}}-<br />
{{!}} [[#PRIM_TEXT|PRIM_TEXT]]<br />
{{!}} 26<br />
{{!}} Sets the prim's floating text.<br />
{{!}} [&nbsp;{{#var:text_const}}, [[string]]&nbsp;{{LSL Param|text}}, [[vector]]&nbsp;{{LSL Param|color}}, [[float]]&nbsp;{{LSL Param|alpha}}&nbsp;]<br />
{{!}}-<br />
{{!}} [[#PRIM_COLOR|PRIM_COLOR]]<br />
{{!}} 18<br />
{{!}} Sets the face's color.<br />
{{!}} [&nbsp;{{#var:color_const}}, [[integer]]&nbsp;{{LSL Param|face}}, [[vector]]&nbsp;{{LSL Param|color}}, [[float]]&nbsp;{{LSL Param|alpha}}&nbsp;]<br />
{{!}}-<br />
{{!}} [[#PRIM_BUMP_SHINY|PRIM_BUMP_SHINY]]<br />
{{!}} 19<br />
{{!}} Sets the face's shiny & bump.<br />
{{!}} [&nbsp;{{#var:bumpshiny_const}}, [[integer]]&nbsp;{{LSL Param|face}}, [[integer]]&nbsp;{{LSL Param|shiny}}, [[integer]]&nbsp;{{LSL Param|bump}}&nbsp;]<br />
{{!}}-<br />
{{!}} [[#PRIM_POINT_LIGHT|PRIM_POINT_LIGHT]]<br />
{{!}} 23<br />
{{!}} Sets the prim as a point light.<br />
{{!}} [&nbsp;{{#var:light_const}}, [[integer]]&nbsp;{{LSL Param|boolean}}, [[vector]]&nbsp;{{LSL Param|color}}, [[float]]&nbsp;{{LSL Param|intensity}}, [[float]]&nbsp;{{LSL Param|radius}}, [[float]]&nbsp;{{LSL Param|falloff}}&nbsp;]<br />
{{!}}-<br />
{{!}} [[#PRIM_FULLBRIGHT|PRIM_FULLBRIGHT]]<br />
{{!}} 20<br />
{{!}} Sets the face's full bright flag.<br />
{{!}} [&nbsp;{{#var:fullbright_const}}, [[integer]]&nbsp;{{LSL Param|face}}, [[integer]]&nbsp;{{LSL Param|boolean}}&nbsp;]<br />
{{!}}-<br />
{{!}} [[#PRIM_FLEXIBLE|PRIM_FLEXIBLE]]<br />
{{!}} 21<br />
{{!}} Sets the prim as flexible.<br />
{{!}} [&nbsp;{{#var:flexible_const}}, [[integer]]&nbsp;{{LSL Param|boolean}}, [[integer]]&nbsp;{{LSL Param|softness}}, [[float]]&nbsp;{{LSL Param|flex_float|gravity}}, [[float]]&nbsp;{{LSL Param|flex_float|friction}}, [[float]]&nbsp;{{LSL Param|flex_float|wind}}, [[float]]&nbsp;{{LSL Param|flex_float|tension}}, [[vector]]&nbsp;{{LSL Param|force}}&nbsp;]<br />
{{!}}-<br />
{{!}} [[#PRIM_TEXGEN|PRIM_TEXGEN]]<br />
{{!}} 22<br />
{{!}} Sets the face's texture mode.<br />
{{!}} [&nbsp;{{#var:texgen_const}}, [[integer]]&nbsp;{{LSL Param|face}}, [[integer]]&nbsp;{{HoverText|type|PRIM_TEXGEN_* flag}}&nbsp;]<br />
{{!}}-<br />
{{!}} [[#PRIM_GLOW|PRIM_GLOW]]<br />
{{!}} 25<br />
{{!}} Sets the face's glow attribute.<br />
{{!}} [&nbsp;{{#var:glow_const}}, [[integer]]&nbsp;{{LSL Param|face}}, [[float]]&nbsp;{{LSL Param|intensity}}&nbsp;]<br />
{{!}}-<br />
{{!}} [[#PRIM_OMEGA|PRIM_OMEGA]]<br />
{{!}} 32<br />
{{!}} Makes the object spin at the specified axis and rate.<br />
{{!}} [&nbsp;{{#var:omega_const}}, [[vector]]&nbsp;{{LSL Param|axis}}, [[float]]&nbsp;{{LSL Param|spinrate}}, [[float]]&nbsp;{{LSL Param|gain}}&nbsp;]<br />
{{!}}-<br />
{{!}} [[#PRIM_CAST_SHADOWS|PRIM_CAST_SHADOWS]]<br />
{{!}} 24<br />
{{!}} Sets the prim's cast shadow attribute. ('''DEPRECATED''')<br />
{{!}} [&nbsp;{{LSL Const|PRIM_CAST_SHADOWS|integer|24}}, [[integer]]&nbsp;{{LSL Param|boolean}}&nbsp;]<br />
{{!}}-<br />
{{!}} [[#PRIM_TYPE_LEGACY|PRIM_TYPE_LEGACY]]<br />
{{!}} 1<br />
{{!}} Sets the prim's shape (legacy mode, '''DEPRECATED''').<br />
{{!}} [&nbsp;1, [[integer]]&nbsp;{{HoverText|flag|PRIM_TYPE_* flag}}&nbsp;]&nbsp;+ {{HoverLink|#PRIM_TYPE_LEGACY_flag_parameters|Additional parameters required by the flag|flag_parameters}} <br />
{{!}}} }}<br />
{{{!}} {{Prettytable|style=margin: 0px 0px 10px 1pt;}} {{#switch:{{NAMESPACE}}|Template=|User=|{{LSLC|Light}}}}<br />
{{!}}- {{Hl2}}<br />
! colspan="2" {{!}} Parameter<br />
! colspan="2" {{!}} {{GetSet|{{{1|}}}|Return&nbsp;Values|Additional&nbsp;Parameters}}<br />
! colspan="6" {{!}} Description<br />
{{!}}-<br />
{{LSL ConstTB|PRIM_NAME|integer|27|b=[&nbsp;|e=&nbsp;]|s1=id="PRIM_NAME"}}<br />
{{!}} colspan="5" {{!}} [ [[string]]&nbsp;{{LSL Param|name}}&nbsp;]<br />
{{!}} colspan="3" {{!}} Name: {{GetSet|{{{1|}}}|[[llGetObjectName]]|[[llSetObjectName]]}}<br />
{{!}}-<br />
{{LSL ConstTB|PRIM_DESC|integer|28|b=[&nbsp;|e=&nbsp;]|s1=id="PRIM_DESC"}}<br />
{{!}} colspan="5" {{!}} [ [[string]]&nbsp;{{LSL Param|description}}&nbsp;]<br />
{{!}} colspan="3" {{!}} Description: {{GetSet|{{{1|}}}|[[llGetObjectDesc]]|[[llSetObjectDesc]]}}<br />
{{!}}-<br />
{{LSL ConstTB|PRIM_TYPE|integer|9|b=[&nbsp;|e=&nbsp;]|s=rowspan="21"|s1=id="PRIM_TYPE"}}<br />
{{!}} colspan="2" {{!}} [ [[integer]]&nbsp;{{HoverText|flag|PRIM_TYPE_* flag}}&nbsp;]<br />
{{!}} colspan="6" {{!}} {{GetSet|{{{1|}}}|Gets|Sets}} the prim shape.<br />
{{!}}-<br />
{{LSL Constants/PrimitiveParams/type|{{{1|}}}}}<br />
{{!}}- style="background-color: rgba(0, 0, 0, 0.1);" <br />
{{!}} colspan="10" {{!}}<br />
{{!}}-<br />
{{LSL ConstTB|PRIM_PHYSICS_SHAPE_TYPE|integer|30|b=[&nbsp;|e=&nbsp;]|s=rowspan="5"|s1=id="PRIM_PHYSICS_SHAPE_TYPE"}}<br />
{{!}} colspan="2" {{!}} [ [[integer]]&nbsp;{{LSL Param|pstype|type}}&nbsp;]<br />
{{!}} colspan="6" {{!}} {{GetSet|{{{1|}}}|Gets|Sets}} the prim's physics shape type.<br />
{{!}}-<br />
{{#var:physics_shape_type_rows}}<br />
{{!}}-<br />
{{LSL ConstTB|PRIM_MATERIAL|integer|2|b=[&nbsp;|e=&nbsp;]|s=rowspan="10"|s1=id="PRIM_MATERIAL"}}<br />
{{!}} colspan="2" {{!}} [ [[integer]]&nbsp;{{LSL Param|material}}&nbsp;]<br />
{{!}} colspan="6" {{!}} {{GetSet|{{{1|}}}|Gets|Sets}} the prim's material. The material determines the default [[llCollisionSound|collision sound]] & [[llCollisionSprite|sprite]].<br />
{{!}}-<br />
{{LSL Constants/PrimitiveParams/materials}}<br />
{{!}}-<br />
{{LSL ConstTB|PRIM_PHYSICS_MATERIAL|integer|31|b=[&nbsp;|e=&nbsp;]|s=rowspan="6"|s1=id="PRIM_PHYSICS_SHAPE_TYPE"}}<br />
{{!}} colspan="5" {{!}} [ [[integer]]&nbsp;{{LSL Param|material_bits}}, [[float]]&nbsp;{{LSL Param|gravity_multiplier}}, [[float]]&nbsp;{{LSL Param|restitution}}, [[float]]&nbsp;{{LSL Param|friction}}, [[float]]&nbsp;{{LSL Param|density}}&nbsp;]<br />
{{!}} colspan="3" {{!}} Physics material properties {{GetSet|{{{1|}}}|[[llGetPhysicsMaterial]]|[[llSetPhysicsMaterial]]}}<br />
{{!}}-<br />
{{#var:physics_material_rows}}<br />
{{!}}-<br />
{{LSL ConstTB|PRIM_PHYSICS|integer|3|b=[&nbsp;|e=&nbsp;]|s1=id="PRIM_PHYSICS"}}<br />
{{!}} colspan="5" {{!}} [ [[integer]]&nbsp;{{LSL Param|boolean}}&nbsp;]<br />
{{!}} colspan="3" {{!}} Physics status {{GetSet|{{{1|}}}|[[llGetStatus]]|[[llSetStatus]]}}<br />
{{!}}-<br />
{{LSL ConstTB|PRIM_TEMP_ON_REZ|integer|4|b=[&nbsp;|e=&nbsp;]|s1=id="PRIM_TEMP_ON_REZ"}}<br />
{{!}} colspan="5" {{!}} [ [[integer]]&nbsp;{{LSL Param|boolean}}&nbsp;]<br />
{{!}} colspan="3" {{!}} {{LSLGC|Temporary}} attribute<br />
{{!}}-<br />
{{LSL ConstTB|PRIM_PHANTOM|integer|5|b=[&nbsp;|e=&nbsp;]|s1=id="PRIM_PHANTOM"}}<br />
{{!}} colspan="5" {{!}} [ [[integer]]&nbsp;{{LSL Param|boolean}}&nbsp;]<br />
{{!}} colspan="3" {{!}} Phantom status {{GetSet|{{{1|}}}|[[llGetStatus]]|[[llSetStatus]]}}<br />
{{!}}-<br />
{{LSL ConstTB|PRIM_POSITION|integer|6|b=[&nbsp;|e=&nbsp;]|s1=id="PRIM_POSITION"}}<br />
{{!}} colspan="5" {{!}} [ [[vector]]&nbsp;{{LSL Param|position{{{1|}}}|position}}&nbsp;]<br />
{{!}} colspan="3" {{!}} Position, {{GetSet|{{{1|}}}|[[llGetPos]]|[[llSetPos]]}}<br />
{{!}}-<br />
{{LSL ConstTB|PRIM_POS_LOCAL|integer|33|b=[&nbsp;|e=&nbsp;]|s1=id="PRIM_POS_LOCAL"}}<br />
{{!}} colspan="5" {{!}} [ [[vector]]&nbsp;{{LSL Param|position{{{1|}}}|position}}&nbsp;]<br />
{{!}} colspan="3" {{!}} Local position, {{GetSet|{{{1|}}}|[[llGetLocalPos]]|[[llSetPos]]}}<br />
{{!}}-<br />
{{LSL ConstTB|PRIM_ROTATION|integer|8|b=[&nbsp;|e=&nbsp;]|s1=id="PRIM_ROTATION"}}<br />
{{!}} colspan="5" {{!}} [ [[rotation]]&nbsp;{{LSL Param|rot}}&nbsp;]<br />
{{!}} colspan="3" {{!}} Global rotation, {{GetSet|{{{1|}}}|[[llGetRot]]|[[llSetRot]] (broken for child prims)}}<br />
{{!}}-<br />
{{LSL ConstTB|PRIM_ROT_LOCAL|integer|29|b=[&nbsp;|e=&nbsp;]|s1=id="PRIM_ROT_LOCAL"}}<br />
{{!}} colspan="5" {{!}} [ [[rotation]]&nbsp;{{LSL Param|rot}}&nbsp;]<br />
{{!}} colspan="3" {{!}} Local rotation, {{GetSet|{{{1|}}}|[[llGetLocalRot]]|[[llSetLocalRot]]}}<br />
{{!}}-<br />
{{LSL ConstTB|PRIM_SIZE|integer|7|b=[&nbsp;|e=&nbsp;]|s1=id="PRIM_SIZE"}}<br />
{{!}} colspan="5" {{!}} [ [[vector]]&nbsp;{{LSL Param|size}}&nbsp;]<br />
{{!}} colspan="3" {{!}} Size, {{GetSet|{{{1|}}}|[[llGetScale]]|[[llSetScale]]}}<br />
{{!}}-<br />
{{LSL ConstTB|PRIM_TEXTURE|integer|17|b=[&nbsp;|e=, [[integer]]&nbsp;{{LSL Param|face}}&nbsp;]|s1=id="PRIM_TEXTURE"}}<br />
{{!}} colspan="5" {{!}} [ [[string]]&nbsp;{{LSL Param|texture}}, [[vector]]&nbsp;{{LSL Param|repeats}}, [[vector]]&nbsp;{{LSL Param|offsets}}, [[float]]&nbsp;{{LSL Param|rotation_in_radians}}&nbsp;]<br />
{{!}} colspan="3" {{!}}<br />
{{{!}} style="background-color:#F9F9F9;"<br />
{{!}}{{!}}{{LSLGC|Texture}}: {{!}}{{!}} {{#ifeq:{{{1|get}}}|get|[[llGetTexture]]}} {{!}}{{!}} {{#ifeq:{{{1|set}}}|set|[[llSetTexture]]}}<br />
{{!}}-<br />
{{!!}}Repeats: {{!}}{{!}} {{#ifeq:{{{1|get}}}|get|[[llGetTextureScale]]}} {{!}}{{!}} {{#ifeq:{{{1|set}}}|set|[[llScaleTexture]]}}<br />
{{!}}-<br />
{{!!}}Offset: {{!}}{{!}} {{#ifeq:{{{1|get}}}|get|[[llGetTextureOffset]]}} {{!}}{{!}} {{#ifeq:{{{1|set}}}|set|[[llOffsetTexture]]}}<br />
{{!}}-<br />
{{!!}}Rotation: {{!}}{{!}} {{#ifeq:{{{1|get}}}|get|[[llGetTextureRot]]}} {{!}}{{!}} {{#ifeq:{{{1|set}}}|set|[[llRotateTexture]]}}<br />
{{!}}}<br />
{{!}}-<br />
{{LSL ConstTB|PRIM_TEXT|integer|26|b=[&nbsp;|e=&nbsp;]|s1=id="PRIM_TEXT"}}<br />
{{!}} colspan="5" {{!}} [ [[string]]&nbsp;{{LSL Param|text}}, [[vector]]&nbsp;{{LSL Param|color}}, [[float]]&nbsp;{{LSL Param|alpha}}&nbsp;]<br />
{{!}} colspan="3" {{!}} Floating Text: {{GetSet|{{{1|}}}|NA|[[llSetText]]}}<br />
{{!}}-<br />
{{LSL ConstTB|PRIM_COLOR|integer|18|b=[&nbsp;|e=, [[integer]]&nbsp;{{LSL Param|face}}&nbsp;]|s1=id="PRIM_COLOR"}}<br />
{{!}} colspan="5" {{!}} [ [[vector]]&nbsp;{{LSL Param|color}}, [[float]]&nbsp;{{LSL Param|alpha}}&nbsp;]<br />
{{!}} colspan="3" {{!}} <br />
{{{!}} style="background-color:#F9F9F9;"<br />
{{!!}}{{LSLGC|Alpha}}: {{!}}{{!}} {{#ifeq:{{{1|get}}}|get|[[llGetAlpha]]}} {{!}}{{!}} {{#ifeq:{{{1|set}}}|set|[[llSetAlpha]]}}<br />
{{!}}-<br />
{{!!}}{{LSLGC|Color}}: {{!}}{{!}} {{#ifeq:{{{1|get}}}|get|[[llGetColor]]}} {{!}}{{!}} {{#ifeq:{{{1|set}}}|set|[[llSetColor]]}}<br />
{{!}}}<br />
{{!}}-<br />
{{LSL ConstTB|PRIM_BUMP_SHINY|integer|19|b=[&nbsp;|e=, [[integer]]&nbsp;{{LSL Param|face}}&nbsp;]|s=rowspan="25"|s1=id="PRIM_BUMP_SHINY"}}<br />
{{!}} colspan="5" {{!}} [&nbsp;[[integer]]&nbsp;{{LSL Param|shiny}}, [[integer]]&nbsp;{{LSL Param|bump}}&nbsp;]<br />
{{!}} colspan="3" {{!}}<br />
{{!}}-<br />
{{LSL_Constants/PrimitiveParams/bumpshiny}}<br />
{{!}}-<br />
{{LSL ConstTB|PRIM_FULLBRIGHT|integer|20|b=[&nbsp;|e=, [[integer]]&nbsp;{{LSL Param|face}}&nbsp;]|s1=id="PRIM_FULLBRIGHT"}}<br />
{{!}} colspan="5" {{!}} [ [[integer]]&nbsp;{{LSL Param|boolean}}&nbsp;]<br />
{{!}} colspan="3" {{!}} <br />
{{!}}-<br />
{{LSL ConstTB|PRIM_FLEXIBLE|integer|21|b=[&nbsp;|e=&nbsp;]|s1=id="PRIM_FLEXIBLE"}}<br />
{{!}} colspan="5" {{!}} [ [[integer]]&nbsp;{{LSL Param|boolean}}, [[integer]]&nbsp;{{LSL Param|softness}}, [[float]]&nbsp;{{LSL Param|flex_float|gravity}}, [[float]]&nbsp;{{LSL Param|flex_float|friction}}, [[float]]&nbsp;{{LSL Param|flex_float|wind}}, [[float]]&nbsp;{{LSL Param|flex_float|tension}}, [[vector]]&nbsp;{{LSL Param|force}}&nbsp;]<br />
{{!}} colspan="3" {{!}} <br />
{{!}}-<br />
{{LSL ConstTB|PRIM_TEXGEN|integer|22|b=[&nbsp;|e=, [[integer]]&nbsp;{{LSL Param|face}}&nbsp;]|s=rowspan="4"|s1=id="PRIM_TEXGEN"}}<br />
{{!}} colspan="5" {{!}} [ [[integer]]&nbsp;{{LSL Param|tg_type|mode}}&nbsp;]<br />
{{!}} colspan="3" {{!}} <br />
{{!}}-<br />
{{LSL Constants/PrimitiveParams/texgen}}<br />
{{!}}-<br />
{{LSL ConstTB|PRIM_POINT_LIGHT|integer|23|b=[&nbsp;|e=&nbsp;]|s1=id="PRIM_POINT_LIGHT"}}<br />
{{!}} colspan="5" {{!}} [ [[integer]]&nbsp;{{LSL Param|boolean}}, [[vector]]&nbsp;{{LSL Param|color}}, [[float]]&nbsp;{{LSL Param|intensity}}, [[float]]&nbsp;{{LSL Param|radius}}, [[float]]&nbsp;{{LSL Param|falloff}}&nbsp;]<br />
{{!}} colspan="3" {{!}} <br />
{{!}}-<br />
{{LSL ConstTB|PRIM_GLOW|integer|25|b=[&nbsp;|e=, [[integer]]&nbsp;{{LSL Param|face}}&nbsp;]|s1=id="PRIM_GLOW"}}<br />
{{!}} colspan="5" {{!}} [ [[float]]&nbsp;{{LSL Param|intensity}}&nbsp;]<br />
{{!}} colspan="3" {{!}} <br />
{{!}}-<br />
{{LSL ConstTB|PRIM_OMEGA|integer|32|b=[&nbsp;|e=&nbsp;]|s1=id="PRIM_OMEGA"}}<br />
{{!}} colspan="5" {{!}} [&nbsp;[[vector]]&nbsp;{{LSL Param|axis}}, [[float]]&nbsp;{{LSL Param|spinrate}}, [[float]]&nbsp;{{LSL Param|gain}}&nbsp;]<br />
{{!}} colspan="4" {{!}} [[llTargetOmega]]<br />
{{!}}-<br />
{{LSL ConstTB|PRIM_CAST_SHADOWS|integer|24|b=[&nbsp;<s>|e=</s>&nbsp;]|s1=id="PRIM_CAST_SHADOWS"}}<br />
{{!}} colspan="2" {{!}} [ [[integer]]&nbsp;{{LSL Param|boolean}}&nbsp;]<br />
{{!}} colspan="6" {{!}} '''DEPRECATED''': Shadow casting for the primitive<br />
{{!}}-<br />
{{#ifeq:{{{1|set}}}|set|<br />
{{!}} rowspan="8" id="PRIM_TYPE_LEGACY"{{!}} [ 1 ]<br/><s>{{LSL Const|PRIM_TYPE_LEGACY|integer|1|nolink=*}}</s><br />
{{!}} rowspan="8" {{!}} {{#var:value}}<br />
{{!}} colspan="8" {{!}} [ [[integer]]&nbsp;{{HoverText|flag|PRIM_TYPE_* flag}}, paramaters ]<br />
{{!}}-<br />
! colspan="2" {{!}} {{HoverText|flag|PRIM_TYPE_* flag}} Constants<br />
! colspan="6" id="PRIM_TYPE_LEGACY_flag_parameters"{{!}} Flag Parameters<br />
{{!}}-<br />
{{LSL ConstTB|PRIM_TYPE_BOX|integer|0}}<br />
{{!}} colspan="6" {{!}} [ [[vector]]&nbsp;{{LSL Param|cut}}, [[float]]&nbsp;{{LSL Param|hollow}}, [[float]]&nbsp;{{LSL Param|twist_end}}, [[vector]]&nbsp;{{LSL Param|top_size}}, [[vector]]&nbsp;{{LSL Param|top_shear}}&nbsp;]<br />
{{!}}-<br />
{{LSL ConstTB|PRIM_TYPE_CYLINDER|integer|1}}<br />
{{!}} colspan="6" {{!}} [ [[vector]]&nbsp;{{LSL Param|cut}}, [[float]]&nbsp;{{LSL Param|hollow}}, [[float]]&nbsp;{{LSL Param|twist_end}}, [[vector]]&nbsp;{{LSL Param|top_size}}, [[vector]]&nbsp;{{LSL Param|top_shear}}&nbsp;]<br />
{{!}}-<br />
{{LSL ConstTB|PRIM_TYPE_PRISM|integer|2}}<br />
{{!}} colspan="6" {{!}} [ [[vector]]&nbsp;{{LSL Param|cut}}, [[float]]&nbsp;{{LSL Param|hollow}}, [[float]]&nbsp;{{LSL Param|twist_end}}, [[vector]]&nbsp;{{LSL Param|top_size}}, [[vector]]&nbsp;{{LSL Param|top_shear}}&nbsp;]<br />
{{!}}-<br />
{{LSL ConstTB|PRIM_TYPE_SPHERE|integer|3}}<br />
{{!}} colspan="6" {{!}} [ [[vector]]&nbsp;{{LSL Param|cut}}, [[float]]&nbsp;{{LSL Param|hollow}}, [[vector]]&nbsp;{{LSL Param|cut|dimple}}&nbsp;]<br />
{{!}}-<br />
{{LSL ConstTB|PRIM_TYPE_TORUS|integer|4}}<br />
{{!}} colspan="6" {{!}} [ [[vector]]&nbsp;{{LSL Param|cut}}, [[float]]&nbsp;{{LSL Param|hollow}}, [[float]]&nbsp;{{LSL Param|twist_end}}, [[float]]&nbsp;{{LSL Param|hole_size_y}}, [[vector]]&nbsp;{{LSL Param|top_shear}}, [[vector]]&nbsp;{{LSL Param|cut|advanced_cut}}&nbsp;]<br />
{{!}}-<br />
{{LSL ConstTB|PRIM_TYPE_TUBE|integer|5}}<br />
{{!}} colspan="6" {{!}} [ [[vector]]&nbsp;{{LSL Param|cut}}, [[float]]&nbsp;{{LSL Param|hollow}}, [[float]]&nbsp;{{LSL Param|twist_end}}, [[float]]&nbsp;{{LSL Param|topshear_x}}&nbsp;]<br />
}}<br />
{{!}}-<br />
{{!}}}<br />
<noinclude><br />
<div id="box"><br />
== Caveats ==<br />
<div style="padding: 0.5em;"><br />
{{#var:caveats}}<br />
</div></div><br />
</noinclude></div>Draconis Neurocamhttps://wiki.secondlife.com/w/index.php?title=User:Draconis_Neurocam&diff=1160784User:Draconis Neurocam2012-01-09T09:04:59Z<p>Draconis Neurocam: </p>
<hr />
<div>Salutations, I am Draconis Neurocam.<br />
<br />
My goal is to make things better to the best of my ability.<br />
<br />
This place is something I dreamed would exist as a child, and now since it does, I love being a part of it.<br />
<br />
What most people never actually realize is how powerful what we have at our fingertips is.<br />
<br />
I take this as an extension of real life, and not something separate.<br />
----<br />
[http://twitter.com/Neurocam_ @Neurocam_]<br />
<lsl><br />
//Written by Nomad Padar one of the most genius people I have ever known<br />
vector int2vec(integer n) {<br />
//0zyx ZZZZ ZZZZ ZZZZ YYYY YYYY XXXX XXXX<br />
return <n&0xFF, (n>>8)&0xFF, ((n>>16)&0xFF)> + <((n&0x10000000)!=0)*.5,((n&0x20000000)!=0)*.5,((n&0x40000000)!=0)*.5>;<br />
}<br />
integer vec2int(vector v) {<br />
integer x = (integer)(v.x);<br />
integer y = (integer)(v.y);<br />
integer z = (integer)(v.z);<br />
integer out;<br />
<br />
//Rounds to 0, .5, or 1.0<br />
float delta = v.x-x;<br />
if((delta>.25) && (delta<.75)) out += 0x10000000;<br />
else if(delta>.75) out += 0x1;<br />
delta = v.y-y;<br />
if((delta>.25) && (delta<.75)) out += 0x20000000;<br />
else if(delta>.75) out += 0x100;<br />
delta = v.z-z;<br />
if((delta>.25) && (delta<.75)) out += 0x40000000;<br />
else if(delta>.75) out += 0x10000;<br />
out += x+(y<<8)+(z<<16);<br />
return out;<br />
}<br />
default<br />
{<br />
touch_start(integer total_number)<br />
{<br />
integer param = vec2int(llGetPos());<br />
llSay(0, (string)param);<br />
llSay(0, (string)int2vec(param));<br />
}<br />
}<br />
<br />
</lsl><br />
<br />
<lsl><br />
SetLinkPosLocal2Root(integer linknum,vector offset)<br />
{<br />
llSetLinkPrimitiveParamsFast(linknum, [PRIM_POSITION, ((llList2Vector(llGetLinkPrimitiveParams(linknum, [PRIM_POSITION]),0) - llGetPos())/llGetRot())+offset]);<br />
}<br />
</lsl><br />
<br />
<lsl><br />
<value,maxvalue - value,0> / maxvalue<br />
</lsl><br />
<br />
<lsl><br />
list ray(vector s, vector e)<br />
{<br />
return llCastRay(s,e,<br />
[<br />
RC_REJECT_TYPES,<br />
0<br />
//RC_REJECT_AGENTS<br />
//|RC_REJECT_PHYSICAL<br />
//|RC_REJECT_NONPHYSICAL<br />
//|RC_REJECT_LAND<br />
,<br />
RC_DATA_FLAGS,<br />
0<br />
//RC_GET_NORMAL<br />
//|RC_GET_ROOT_KEY<br />
//|RC_GET_LINK_NUM<br />
,<br />
RC_MAX_HITS, 1,<br />
RC_DETECT_PHANTOM,FALSE <br />
]);<br />
}<br />
</lsl><br />
<lsl><br />
//forwards loop through n<br />
(i=(i+1)%n)<br />
//backwards loop through n<br />
(i=(n+i-1)%n)<br />
</lsl><br />
{{skills<br />
|Architect=*<br />
|Builder=*<br />
|Machinima=<br />
|Scenographer=<br />
|Scripter=*<br />
|SLogistician=*<br />
|Terraformer=<br />
|}}<br />
{{Tweeter}}<br />
{{ISO 639-3/cat-speaking|eng}}</div>Draconis Neurocamhttps://wiki.secondlife.com/w/index.php?title=Template:LSL_Constants/PrimitiveParams&diff=1152529Template:LSL Constants/PrimitiveParams2011-08-28T06:31:59Z<p>Draconis Neurocam: editing constant for prim pos local</p>
<hr />
<div><noinclude>{{multi-lang}}</noinclude>{{#if:<br />
{{:PRIM_NAME|{{{1|}}}}}<br />
{{:PRIM_DESC|{{{1|}}}}}<br />
{{:PRIM_COLOR|{{{1|}}}}}<br />
{{:PRIM_GLOW|{{{1|}}}}}<br />
{{:PRIM_TEXTURE|{{{1|}}}}}<br />
{{:PRIM_TEXT|{{{1|}}}}}<br />
{{:PRIM_FULLBRIGHT|{{{1|}}}}}<br />
{{:PRIM_TEXGEN|{{{1|}}}}}<br />
{{:PRIM_BUMP_SHINY|{{{1|}}}}}<br />
{{:PRIM_MATERIAL|{{{1|}}}}}<br />
{{:PRIM_TYPE|{{{1|}}}}}<br />
{{:PRIM_TYPE_BOX|{{{1|}}}}}<br />
{{:PRIM_TYPE_SCULPT|{{{1|}}}}}<br />
{{:PRIM_PHANTOM|{{{1|}}}}}<br />
{{:PRIM_TEMP_ON_REZ|{{{1|}}}}}<br />
{{:PRIM_PHYSICS|{{{1|}}}}}<br />
{{:PRIM_SIZE|{{{1|}}}}}<br />
{{:PRIM_POSITION|{{{1|}}}}}<br />
{{:PRIM_POS_LOCAL|{{{1|}}}}}<br />
{{:PRIM_ROTATION|{{{1|}}}}}<br />
{{:PRIM_ROT_LOCAL|{{{1|}}}}}<br />
{{:PRIM_FLEXIBLE|{{{1|}}}}}<br />
{{:PRIM_POINT_LIGHT|{{{1|}}}}}<br />
{{:PRIM_OMEGA|{{{1|}}}}}<br />
{{:PRIM_LINK_TARGET|{{{1|}}}}}<br />
<br />
{{#ifeq:{{{1|set}}}|set|{{#vardefine:caveats|{{#var:caveats}}<br />
* [[PRIM_PHANTOM]], [[PRIM_PHYSICS]] and [[PRIM_TEMP_ON_REZ]] applies to the entire object (linkset).<br />
* Values may drift, become truncated or be range limited. Some limits are applied by the client during deserialization before rendering, others are applied by the simulator before storing the values.<br />
** When testing [[vector]]s and [[rotation]]s use [[llVecDist]] and [[llAngleBetween]] (respectively) to perform fuzzy tests.}}}}<br />
<br />
{{LSL_Function/color|color}}<br />
{{LSL_Function/alpha|alpha}}<br />
{{LSL_Function/boolean|boolean}}<br />
{{LSL_Function/face|face|flag|!footer=*|returns=nothing.}}<br />
<br />
}}{{#ifeq:{{{1|<noinclude>set</noinclude>}}}|set|<br />
{{{!}} class="sortable" {{Prettytable|style=margin: 0px 0px 10px 1pt;}}<br />
{{!}}- {{Hl2}}<br />
! class="sortable" {{!}}Flag<br />
! class="sortable" title="Value" style="cursor: help;" {{!}}<span style="border-bottom: 1px dotted;">V</span><br />
! class="sortable" {{!}}Description<br />
! class="unsortable" {{!}}Usage<br />
{{!}}-<br />
{{!}} [[#PRIM_NAME|PRIM_NAME]]<br />
{{!}} 27<br />
{{!}} Sets the prim's name.<br />
{{!}} [&nbsp;{{#var:name_const}}, [[string]]&nbsp;{{LSL Param|name}}&nbsp;]<br />
{{!}}-<br />
{{!}} [[#PRIM_DESC|PRIM_DESC]]<br />
{{!}} 28<br />
{{!}} Sets the prim's description.<br />
{{!}} [&nbsp;{{#var:desc_const}}, [[string]]&nbsp;{{LSL Param|description}}&nbsp;]<br />
{{!}}-<br />
{{!}} [[#PRIM_TYPE|PRIM_TYPE]]<br />
{{!}} 9<br />
{{!}} Sets the prim's shape.<br />
{{!}} [&nbsp;{{#var:type_const}}, [[integer]]&nbsp;{{HoverText|flag|PRIM_TYPE_* flag}}&nbsp;]&nbsp;+ {{HoverLink|#PRIM_TYPE_flag_parameters|Additional parameters required by the flag|flag_parameters}}<br />
{{!}}-<br />
{{!}} [[#PRIM_MATERIAL|PRIM_MATERIAL]]<br />
{{!}} 2<br />
{{!}} Sets the prim's material.<br />
{{!}} [&nbsp;{{#var:material_const}}, [[integer]]&nbsp;{{HoverText|flag|PRIM_MATERIAL_* flag}}&nbsp;]<br />
{{!}}-<br />
{{!}} [[#PRIM_PHYSICS|PRIM_PHYSICS]]<br />
{{!}} 3<br />
{{!}} Sets the object's physics status.<br />
{{!}} [&nbsp;{{#var:physics_const}}, [[integer]]&nbsp;{{LSL Param|boolean}}&nbsp;]<br />
{{!}}-<br />
{{!}} [[#PRIM_TEMP_ON_REZ|PRIM_TEMP_ON_REZ]]<br />
{{!}} 4<br />
{{!}} Sets the object's {{LSLGC|Temporary|temporary}} attribute.<br />
{{!}} [&nbsp;{{#var:temponrez_const}}, [[integer]]&nbsp;{{LSL Param|boolean}}&nbsp;]<br />
{{!}}-<br />
{{!}} [[#PRIM_PHANTOM|PRIM_PHANTOM]]<br />
{{!}} 5<br />
{{!}} Sets the object's phantom status.<br />
{{!}} [&nbsp;{{#var:phantom_const}}, [[integer]]&nbsp;{{LSL Param|boolean}}&nbsp;]<br />
{{!}}-<br />
{{!}} [[#PRIM_POSITION|PRIM_POSITION]]<br />
{{!}} 6<br />
{{!}} Sets the prim's position.<br />
{{!}} [&nbsp;{{#var:position_const}}, [[vector]]&nbsp;{{LSL Param|position{{{1|}}}|position}}&nbsp;]<br />
{{!}}-<br />
{{!}} [[#PRIM_POS_LOCAL|PRIM_POS_LOCAL]]<br />
{{!}} 33<br />
{{!}} Sets the prim's local position. <br />
{{!}} [&nbsp;{{#var:pos_local_const}}, [[vector]]&nbsp;{{LSL Param|position{{{1|}}}|position}}&nbsp;]<br />
{{!}}-<br />
{{!}} [[#PRIM_ROTATION|PRIM_ROTATION]]<br />
{{!}} 8<br />
{{!}} Sets the prim's global rotation.<br />
{{!}} [&nbsp;{{#var:rotation_const}}, [[rotation]]&nbsp;{{LSL Param|rot}}&nbsp;]<br />
{{!}}-<br />
{{!}} [[#PRIM_ROT_LOCAL|PRIM_ROT_LOCAL]]<br />
{{!}} 29<br />
{{!}} Sets the prim's local rotation.<br />
{{!}} [&nbsp;{{#var:rot_local_const}}, [[rotation]]&nbsp;{{LSL Param|rot}}&nbsp;]<br />
{{!}}-<br />
{{!}} [[#PRIM_SIZE|PRIM_SIZE]]<br />
{{!}} 7<br />
{{!}} Sets the prim's size.<br />
{{!}} [&nbsp;{{#var:size_const}}, [[vector]]&nbsp;{{LSL Param|size}}&nbsp;]<br />
{{!}}-<br />
{{!}} [[#PRIM_TEXTURE|PRIM_TEXTURE]]<br />
{{!}} 17<br />
{{!}} Sets the prim's texture attributes.<br />
{{!}} [&nbsp;{{#var:texture_const}}, [[integer]]&nbsp;{{LSL Param|face}}, [[string]]&nbsp;{{LSL Param|texture}}, [[vector]]&nbsp;{{LSL Param|repeats}}, [[vector]]&nbsp;{{LSL Param|offsets}}, [[float]]&nbsp;{{LSL Param|rotation_in_radians}}&nbsp;]<br />
{{!}}-<br />
{{!}} [[#PRIM_TEXT|PRIM_TEXT]]<br />
{{!}} 26<br />
{{!}} Sets the prim's floating text.<br />
{{!}} [&nbsp;{{#var:text_const}}, [[string]]&nbsp;{{LSL Param|text}}, [[vector]]&nbsp;{{LSL Param|color}}, [[float]]&nbsp;{{LSL Param|alpha}}&nbsp;]<br />
{{!}}-<br />
{{!}} [[#PRIM_COLOR|PRIM_COLOR]]<br />
{{!}} 18<br />
{{!}} Sets the face's color.<br />
{{!}} [&nbsp;{{#var:color_const}}, [[integer]]&nbsp;{{LSL Param|face}}, [[vector]]&nbsp;{{LSL Param|color}}, [[float]]&nbsp;{{LSL Param|alpha}}&nbsp;]<br />
{{!}}-<br />
{{!}} [[#PRIM_BUMP_SHINY|PRIM_BUMP_SHINY]]<br />
{{!}} 19<br />
{{!}} Sets the face's shiny & bump.<br />
{{!}} [&nbsp;{{#var:bumpshiny_const}}, [[integer]]&nbsp;{{LSL Param|face}}, [[integer]]&nbsp;{{LSL Param|shiny}}, [[integer]]&nbsp;{{LSL Param|bump}}&nbsp;]<br />
{{!}}-<br />
{{!}} [[#PRIM_POINT_LIGHT|PRIM_POINT_LIGHT]]<br />
{{!}} 23<br />
{{!}} Sets the prim as a point light.<br />
{{!}} [&nbsp;{{#var:light_const}}, [[integer]]&nbsp;{{LSL Param|boolean}}, [[vector]]&nbsp;{{LSL Param|color}}, [[float]]&nbsp;{{LSL Param|intensity}}, [[float]]&nbsp;{{LSL Param|radius}}, [[float]]&nbsp;{{LSL Param|falloff}}&nbsp;]<br />
{{!}}-<br />
{{!}} [[#PRIM_FULLBRIGHT|PRIM_FULLBRIGHT]]<br />
{{!}} 20<br />
{{!}} Sets the face's full bright flag.<br />
{{!}} [&nbsp;{{#var:fullbright_const}}, [[integer]]&nbsp;{{LSL Param|face}}, [[integer]]&nbsp;{{LSL Param|boolean}}&nbsp;]<br />
{{!}}-<br />
{{!}} [[#PRIM_FLEXIBLE|PRIM_FLEXIBLE]]<br />
{{!}} 21<br />
{{!}} Sets the prim as flexible.<br />
{{!}} [&nbsp;{{#var:flexible_const}}, [[integer]]&nbsp;{{LSL Param|boolean}}, [[integer]]&nbsp;{{LSL Param|softness}}, [[float]]&nbsp;{{LSL Param|flex_float|gravity}}, [[float]]&nbsp;{{LSL Param|flex_float|friction}}, [[float]]&nbsp;{{LSL Param|flex_float|wind}}, [[float]]&nbsp;{{LSL Param|flex_float|tension}}, [[vector]]&nbsp;{{LSL Param|force}}&nbsp;]<br />
{{!}}-<br />
{{!}} [[#PRIM_TEXGEN|PRIM_TEXGEN]]<br />
{{!}} 22<br />
{{!}} Sets the face's texture mode.<br />
{{!}} [&nbsp;{{#var:texgen_const}}, [[integer]]&nbsp;{{LSL Param|face}}, [[integer]]&nbsp;{{HoverText|type|PRIM_TEXGEN_* flag}}&nbsp;]<br />
{{!}}-<br />
{{!}} [[#PRIM_GLOW|PRIM_GLOW]]<br />
{{!}} 25<br />
{{!}} Sets the face's glow attribute.<br />
{{!}} [&nbsp;{{#var:glow_const}}, [[integer]]&nbsp;{{LSL Param|face}}, [[float]]&nbsp;{{LSL Param|intensity}}&nbsp;]<br />
{{!}}-<br />
{{!}} [[#PRIM_OMEGA|PRIM_OMEGA]]<br />
{{!}} 32<br />
{{!}} Makes the object spin at the specified axis and rate.<br />
{{!}} [&nbsp;{{#var:omega_const}}, [[vector]]&nbsp;{{LSL Param|axis}}, [[float]]&nbsp;{{LSL Param|spinrate}}, [[float]]&nbsp;{{LSL Param|gain}}&nbsp;]<br />
{{!}}-<br />
{{!}} [[#PRIM_CAST_SHADOWS|PRIM_CAST_SHADOWS]]<br />
{{!}} 24<br />
{{!}} Sets the prim's cast shadow attribute. ('''DEPRECATED''')<br />
{{!}} [&nbsp;{{LSL Const|PRIM_CAST_SHADOWS|integer|24}}, [[integer]]&nbsp;{{LSL Param|boolean}}&nbsp;]<br />
{{!}}-<br />
{{!}} [[#PRIM_TYPE_LEGACY|PRIM_TYPE_LEGACY]]<br />
{{!}} 1<br />
{{!}} Sets the prim's shape (legacy mode, '''DEPRECATED''').<br />
{{!}} [&nbsp;1, [[integer]]&nbsp;{{HoverText|flag|PRIM_TYPE_* flag}}&nbsp;]&nbsp;+ {{HoverLink|#PRIM_TYPE_LEGACY_flag_parameters|Additional parameters required by the flag|flag_parameters}} <br />
{{!}}} }}<br />
{{{!}} {{Prettytable|style=margin: 0px 0px 10px 1pt;}} {{#switch:{{NAMESPACE}}|Template=|User=|{{LSLC|Light}}}}<br />
{{!}}- {{Hl2}}<br />
! colspan="2" {{!}} Parameter<br />
! colspan="2" {{!}} {{GetSet|{{{1|}}}|Return&nbsp;Values|Additional&nbsp;Parameters}}<br />
! colspan="6" {{!}} Description<br />
{{!}}-<br />
{{LSL ConstTB|PRIM_NAME|integer|27|b=[&nbsp;|e=&nbsp;]|s1=id="PRIM_NAME"}}<br />
{{!}} colspan="5" {{!}} [ [[string]]&nbsp;{{LSL Param|name}}&nbsp;]<br />
{{!}} colspan="3" {{!}} Name: {{GetSet|{{{1|}}}|[[llGetObjectName]]|[[llSetObjectName]]}}<br />
{{!}}-<br />
{{LSL ConstTB|PRIM_DESC|integer|28|b=[&nbsp;|e=&nbsp;]|s1=id="PRIM_DESC"}}<br />
{{!}} colspan="5" {{!}} [ [[string]]&nbsp;{{LSL Param|description}}&nbsp;]<br />
{{!}} colspan="3" {{!}} Description: {{GetSet|{{{1|}}}|[[llGetObjectDesc]]|[[llSetObjectDesc]]}}<br />
{{!}}-<br />
{{LSL ConstTB|PRIM_TYPE|integer|9|b=[&nbsp;|e=&nbsp;]|s=rowspan="21"|s1=id="PRIM_TYPE"}}<br />
{{!}} colspan="2" {{!}} [ [[integer]]&nbsp;{{HoverText|flag|PRIM_TYPE_* flag}} ]<br />
{{!}} colspan="6" {{!}} {{GetSet|{{{1|}}}|Gets|Sets}} the prim shape.<br />
{{!}}-<br />
{{LSL Constants/PrimitiveParams/type|{{{1|}}}}}<br />
{{!}}- style="background-color: rgba(0, 0, 0, 0.1);" <br />
{{!}} colspan="10" {{!}}<br />
{{!}}-<br />
{{LSL ConstTB|PRIM_MATERIAL|integer|2|b=[&nbsp;|e=&nbsp;]|s=rowspan="10"|s1=id="PRIM_MATERIAL"}}<br />
{{!}} colspan="2" {{!}} [ [[integer]]&nbsp;{{LSL Param|material}}]<br />
{{!}} colspan="6" {{!}} {{GetSet|{{{1|}}}|Gets|Sets}} the prim's material. The material determines the default [[llCollisionSound|collision sound]] & [[llCollisionSprite|sprite]].<br />
{{!}}-<br />
{{LSL Constants/PrimitiveParams/materials}}<br />
{{!}}-<br />
{{LSL ConstTB|PRIM_PHYSICS|integer|3|b=[&nbsp;|e=&nbsp;]|s1=id="PRIM_PHYSICS"}}<br />
{{!}} colspan="5" {{!}} [ [[integer]]&nbsp;{{LSL Param|boolean}}&nbsp;]<br />
{{!}} colspan="3" {{!}} Physics status {{GetSet|{{{1|}}}|[[llGetStatus]]|[[llSetStatus]]}}<br />
{{!}}-<br />
{{LSL ConstTB|PRIM_TEMP_ON_REZ|integer|4|b=[&nbsp;|e=&nbsp;]|s1=id="PRIM_TEMP_ON_REZ"}}<br />
{{!}} colspan="5" {{!}} [ [[integer]]&nbsp;{{LSL Param|boolean}}&nbsp;]<br />
{{!}} colspan="3" {{!}} {{LSLGC|Temporary}} attribute<br />
{{!}}-<br />
{{LSL ConstTB|PRIM_PHANTOM|integer|5|b=[&nbsp;|e=&nbsp;]|s1=id="PRIM_PHANTOM"}}<br />
{{!}} colspan="5" {{!}} [ [[integer]]&nbsp;{{LSL Param|boolean}}&nbsp;]<br />
{{!}} colspan="3" {{!}} Phantom status {{GetSet|{{{1|}}}|[[llGetStatus]]|[[llSetStatus]]}}<br />
{{!}}-<br />
{{LSL ConstTB|PRIM_POSITION|integer|6|b=[&nbsp;|e=&nbsp;]|s1=id="PRIM_POSITION"}}<br />
{{!}} colspan="5" {{!}} [ [[vector]]&nbsp;{{LSL Param|position{{{1|}}}|position}}&nbsp;]<br />
{{!}} colspan="3" {{!}} Position, {{GetSet|{{{1|}}}|[[llGetPos]]|[[llSetPos]]}}<br />
{{!}}-<br />
{{LSL ConstTB|PRIM_POS_LOCAL|integer|33|b=[&nbsp;|e=&nbsp;]|s1=id="PRIM_POS_LOCAL"}}<br />
{{!}} colspan="5" {{!}} [ [[vector]]&nbsp;{{LSL Param|position{{{1|}}}|position}}&nbsp;]<br />
{{!}} colspan="3" {{!}} Local position, {{GetSet|{{{1|}}}|[[llGetLocalPos]]|[[llSetPos]]}}<br />
{{!}}-<br />
{{LSL ConstTB|PRIM_ROTATION|integer|8|b=[&nbsp;|e=&nbsp;]|s1=id="PRIM_ROTATION"}}<br />
{{!}} colspan="5" {{!}} [ [[rotation]]&nbsp;{{LSL Param|rot}}&nbsp;]<br />
{{!}} colspan="3" {{!}} Global rotation, {{GetSet|{{{1|}}}|[[llGetRot]]|[[llSetRot]] (broken for child prims)}}<br />
{{!}}-<br />
{{LSL ConstTB|PRIM_ROT_LOCAL|integer|29|b=[&nbsp;|e=&nbsp;]|s1=id="PRIM_ROT_LOCAL"}}<br />
{{!}} colspan="5" {{!}} [ [[rotation]]&nbsp;{{LSL Param|rot}}&nbsp;]<br />
{{!}} colspan="3" {{!}} Local rotation, {{GetSet|{{{1|}}}|[[llGetLocalRot]]|[[llSetLocalRot]]}}<br />
{{!}}-<br />
{{LSL ConstTB|PRIM_SIZE|integer|7|b=[&nbsp;|e=&nbsp;]|s1=id="PRIM_SIZE"}}<br />
{{!}} colspan="5" {{!}} [ [[vector]]&nbsp;{{LSL Param|size}}&nbsp;]<br />
{{!}} colspan="3" {{!}} Size, {{GetSet|{{{1|}}}|[[llGetScale]]|[[llSetScale]]}}<br />
{{!}}-<br />
{{LSL ConstTB|PRIM_TEXTURE|integer|17|b=[&nbsp;|e=, [[integer]]&nbsp;{{LSL Param|face}}&nbsp;]|s1=id="PRIM_TEXTURE"}}<br />
{{!}} colspan="5" {{!}} [ [[string]]&nbsp;{{LSL Param|texture}}, [[vector]]&nbsp;{{LSL Param|repeats}}, [[vector]]&nbsp;{{LSL Param|offsets}}, [[float]]&nbsp;{{LSL Param|rotation_in_radians}}&nbsp;]<br />
{{!}} colspan="3" {{!}}<br />
{{{!}} style="background-color:#F9F9F9;"<br />
{{!}}{{!}}{{LSLGC|Texture}}: {{!}}{{!}} {{#ifeq:{{{1|get}}}|get|[[llGetTexture]]}} {{!}}{{!}} {{#ifeq:{{{1|set}}}|set|[[llSetTexture]]}}<br />
{{!}}-<br />
{{!!}}Repeats: {{!}}{{!}} {{#ifeq:{{{1|get}}}|get|[[llGetTextureScale]]}} {{!}}{{!}} {{#ifeq:{{{1|set}}}|set|[[llScaleTexture]]}}<br />
{{!}}-<br />
{{!!}}Offset: {{!}}{{!}} {{#ifeq:{{{1|get}}}|get|[[llGetTextureOffset]]}} {{!}}{{!}} {{#ifeq:{{{1|set}}}|set|[[llOffsetTexture]]}}<br />
{{!}}-<br />
{{!!}}Rotation: {{!}}{{!}} {{#ifeq:{{{1|get}}}|get|[[llGetTextureRot]]}} {{!}}{{!}} {{#ifeq:{{{1|set}}}|set|[[llRotateTexture]]}}<br />
{{!}}}<br />
{{!}}-<br />
{{LSL ConstTB|PRIM_TEXT|integer|26|b=[&nbsp;|e=&nbsp;]|s1=id="PRIM_TEXT"}}<br />
{{!}} colspan="5" {{!}} [ [[string]]&nbsp;{{LSL Param|text}}, [[vector]]&nbsp;{{LSL Param|color}}, [[float]]&nbsp;{{LSL Param|alpha}}&nbsp;]<br />
{{!}} colspan="3" {{!}} Floating Text: {{GetSet|{{{1|}}}|NA|[[llSetText]]}}<br />
{{!}}-<br />
{{LSL ConstTB|PRIM_COLOR|integer|18|b=[&nbsp;|e=, [[integer]]&nbsp;{{LSL Param|face}}&nbsp;]|s1=id="PRIM_COLOR"}}<br />
{{!}} colspan="5" {{!}} [ [[vector]]&nbsp;{{LSL Param|color}}, [[float]]&nbsp;{{LSL Param|alpha}}&nbsp;]<br />
{{!}} colspan="3" {{!}} <br />
{{{!}} style="background-color:#F9F9F9;"<br />
{{!!}}{{LSLGC|Alpha}}: {{!}}{{!}} {{#ifeq:{{{1|get}}}|get|[[llGetAlpha]]}} {{!}}{{!}} {{#ifeq:{{{1|set}}}|set|[[llSetAlpha]]}}<br />
{{!}}-<br />
{{!!}}{{LSLGC|Color}}: {{!}}{{!}} {{#ifeq:{{{1|get}}}|get|[[llGetColor]]}} {{!}}{{!}} {{#ifeq:{{{1|set}}}|set|[[llSetColor]]}}<br />
{{!}}}<br />
{{!}}-<br />
{{LSL ConstTB|PRIM_BUMP_SHINY|integer|19|b=[&nbsp;|e=, [[integer]]&nbsp;{{LSL Param|face}}&nbsp;]|s=rowspan="25"|s1=id="PRIM_BUMP_SHINY"}}<br />
{{!}} colspan="5" {{!}} [&nbsp;[[integer]]&nbsp;{{LSL Param|shiny}}, [[integer]]&nbsp;{{LSL Param|bump}}&nbsp;]<br />
{{!}} colspan="3" {{!}}<br />
{{!}}-<br />
{{LSL_Constants/PrimitiveParams/bumpshiny}}<br />
{{!}}-<br />
{{LSL ConstTB|PRIM_FULLBRIGHT|integer|20|b=[&nbsp;|e=, [[integer]]&nbsp;{{LSL Param|face}}&nbsp;]|s1=id="PRIM_FULLBRIGHT"}}<br />
{{!}} colspan="5" {{!}} [ [[integer]]&nbsp;{{LSL Param|boolean}}&nbsp;]<br />
{{!}} colspan="3" {{!}} <br />
{{!}}-<br />
{{LSL ConstTB|PRIM_FLEXIBLE|integer|21|b=[&nbsp;|e=&nbsp;]|s1=id="PRIM_FLEXIBLE"}}<br />
{{!}} colspan="5" {{!}} [ [[integer]]&nbsp;{{LSL Param|boolean}}, [[integer]]&nbsp;{{LSL Param|softness}}, [[float]]&nbsp;{{LSL Param|flex_float|gravity}}, [[float]]&nbsp;{{LSL Param|flex_float|friction}}, [[float]]&nbsp;{{LSL Param|flex_float|wind}}, [[float]]&nbsp;{{LSL Param|flex_float|tension}}, [[vector]]&nbsp;{{LSL Param|force}}&nbsp;]<br />
{{!}} colspan="3" {{!}} <br />
{{!}}-<br />
{{LSL ConstTB|PRIM_TEXGEN|integer|22|b=[&nbsp;|e=, [[integer]]&nbsp;{{LSL Param|face}}&nbsp;]|s=rowspan="4"|s1=id="PRIM_TEXGEN"}}<br />
{{!}} colspan="5" {{!}} [ [[integer]]&nbsp;{{LSL Param|tg_type|mode}}&nbsp;]<br />
{{!}} colspan="3" {{!}} <br />
{{!}}-<br />
{{LSL Constants/PrimitiveParams/texgen}}<br />
{{!}}-<br />
{{LSL ConstTB|PRIM_POINT_LIGHT|integer|23|b=[&nbsp;|e=&nbsp;]|s1=id="PRIM_POINT_LIGHT"}}<br />
{{!}} colspan="5" {{!}} [ [[integer]]&nbsp;{{LSL Param|boolean}}, [[vector]]&nbsp;{{LSL Param|color}}, [[float]]&nbsp;{{LSL Param|intensity}}, [[float]]&nbsp;{{LSL Param|radius}}, [[float]]&nbsp;{{LSL Param|falloff}}&nbsp;]<br />
{{!}} colspan="3" {{!}} <br />
{{!}}-<br />
{{LSL ConstTB|PRIM_GLOW|integer|25|b=[&nbsp;|e=, [[integer]]&nbsp;{{LSL Param|face}}&nbsp;]|s1=id="PRIM_GLOW"}}<br />
{{!}} colspan="5" {{!}} [ [[float]]&nbsp;{{LSL Param|intensity}}&nbsp;]<br />
{{!}} colspan="3" {{!}} <br />
{{!}}-<br />
{{LSL ConstTB|PRIM_OMEGA|integer|32|b=[&nbsp;|e=&nbsp;]|s1=id="PRIM_OMEGA"}}<br />
{{!}} colspan="5" {{!}} [&nbsp;[[vector]]&nbsp;{{LSL Param|axis}}, [[float]]&nbsp;{{LSL Param|spinrate}}, [[float]]&nbsp;{{LSL Param|gain}}&nbsp;]<br />
{{!}} colspan="4" {{!}} [[llTargetOmega]]<br />
{{!}}-<br />
{{LSL ConstTB|PRIM_CAST_SHADOWS|integer|24|b=[&nbsp;<s>|e=</s>&nbsp;]|s1=id="PRIM_CAST_SHADOWS"}}<br />
{{!}} colspan="2" {{!}} [ [[integer]]&nbsp;{{LSL Param|boolean}}&nbsp;]<br />
{{!}} colspan="6" {{!}} '''DEPRECATED''': Shadow casting for the primitive<br />
{{!}}-<br />
{{#ifeq:{{{1|set}}}|set|<br />
{{!}} rowspan="8" id="PRIM_TYPE_LEGACY"{{!}} [ 1 ]<br/><s>{{LSL Const|PRIM_TYPE_LEGACY|integer|1|nolink=*}}</s><br />
{{!}} rowspan="8" {{!}} {{#var:value}}<br />
{{!}} colspan="8" {{!}} [ [[integer]]&nbsp;{{HoverText|flag|PRIM_TYPE_* flag}}, paramaters ]<br />
{{!}}-<br />
! colspan="2" {{!}} {{HoverText|flag|PRIM_TYPE_* flag}} Constants<br />
! colspan="6" id="PRIM_TYPE_LEGACY_flag_parameters"{{!}} Flag Parameters<br />
{{!}}-<br />
{{LSL ConstTB|PRIM_TYPE_BOX|integer|0}}<br />
{{!}} colspan="6" {{!}} [ [[vector]]&nbsp;{{LSL Param|cut}}, [[float]]&nbsp;{{LSL Param|hollow}}, [[float]]&nbsp;{{LSL Param|twist_end}}, [[vector]]&nbsp;{{LSL Param|top_size}}, [[vector]]&nbsp;{{LSL Param|top_shear}}&nbsp;]<br />
{{!}}-<br />
{{LSL ConstTB|PRIM_TYPE_CYLINDER|integer|1}}<br />
{{!}} colspan="6" {{!}} [ [[vector]]&nbsp;{{LSL Param|cut}}, [[float]]&nbsp;{{LSL Param|hollow}}, [[float]]&nbsp;{{LSL Param|twist_end}}, [[vector]]&nbsp;{{LSL Param|top_size}}, [[vector]]&nbsp;{{LSL Param|top_shear}}&nbsp;]<br />
{{!}}-<br />
{{LSL ConstTB|PRIM_TYPE_PRISM|integer|2}}<br />
{{!}} colspan="6" {{!}} [ [[vector]]&nbsp;{{LSL Param|cut}}, [[float]]&nbsp;{{LSL Param|hollow}}, [[float]]&nbsp;{{LSL Param|twist_end}}, [[vector]]&nbsp;{{LSL Param|top_size}}, [[vector]]&nbsp;{{LSL Param|top_shear}}&nbsp;]<br />
{{!}}-<br />
{{LSL ConstTB|PRIM_TYPE_SPHERE|integer|3}}<br />
{{!}} colspan="6" {{!}} [ [[vector]]&nbsp;{{LSL Param|cut}}, [[float]]&nbsp;{{LSL Param|hollow}}, [[vector]]&nbsp;{{LSL Param|cut|dimple}}&nbsp;]<br />
{{!}}-<br />
{{LSL ConstTB|PRIM_TYPE_TORUS|integer|4}}<br />
{{!}} colspan="6" {{!}} [ [[vector]]&nbsp;{{LSL Param|cut}}, [[float]]&nbsp;{{LSL Param|hollow}}, [[float]]&nbsp;{{LSL Param|twist_end}}, [[float]]&nbsp;{{LSL Param|hole_size_y}}, [[vector]]&nbsp;{{LSL Param|top_shear}}, [[vector]]&nbsp;{{LSL Param|cut|advanced_cut}}&nbsp;]<br />
{{!}}-<br />
{{LSL ConstTB|PRIM_TYPE_TUBE|integer|5}}<br />
{{!}} colspan="6" {{!}} [ [[vector]]&nbsp;{{LSL Param|cut}}, [[float]]&nbsp;{{LSL Param|hollow}}, [[float]]&nbsp;{{LSL Param|twist_end}}, [[float]]&nbsp;{{LSL Param|topshear_x}}&nbsp;]<br />
}}<br />
{{!}}-<br />
{{!}}}<br />
<noinclude><br />
<div id="box"><br />
== Caveats ==<br />
<div style="padding: 0.5em;"><br />
{{#var:caveats}}<br />
</div></div><br />
</noinclude></div>Draconis Neurocamhttps://wiki.secondlife.com/w/index.php?title=PRIM_POS_LOCAL&diff=1152528PRIM POS LOCAL2011-08-28T06:18:59Z<p>Draconis Neurocam: testing to see if constant shows up in primparams table</p>
<hr />
<div><onlyinclude>{{#if:<br />
<br />
{{#vardefine:pos_local_const|{{LSL Const|PRIM_POS_LOCAL|integer|33|c=Used to {{GetSet|{{{1|}}}|get|set|/}} the prim's local position}}}}<br />
<br />
{{#vardefine:facetable|{{#var:facetable}}<br />
{{!}}-<br />
{{!}} [ {{#var:pos_local_const}} ]<br />
{{!}} {{#var:return}} }}<br />
<br />
{{#vardefine:p_pos_desc|position in [[Viewer_coordinate_frames#local|local]] coordinates.}}<br />
{{#switch:{{{1|}}}<br />
|get={{#vardefine:caveats|{{#var:caveats}}<br />
{{#var:caveats-get}}}}<br />
|set={{#vardefine:caveats|{{#var:caveats}}<br />
{{#var:caveats-set}}}}<br />
<br />
}}<br />
<br />
}}</onlyinclude>{{#if:<br />
<br />
}}<br />
{{LSL Constant<br />
|name=PRIM_POS_LOCAL<br />
|type=integer<br />
|value=33<br />
|desc=PRIM_POS_LOCAL is used to get or set the prim's local position.<br />
|pa={{LSL Constant/List|i_front=[[llSetPrimitiveParams]]([&#32;{{#var:pos_local_const}},&#32;|i_end=&nbsp;]);<br />
|text=When used with [[llSetPrimitiveParams]] & [[llSetLinkPrimitiveParams]]<br />
{{LSL Generic/Caveats|caveats={{#var:caveats-set}}|title=*}}<br />
|toc=llSetPrimitiveParams<br />
|i1_type=vector|i1_name=position|i1_desc={{#var:p_pos_desc}}<br />
}}<br />
|pb={{LSL Constant/List|i_front=[[llGetPrimitiveParams]]([&nbsp;{{#var:pos_local_const}}|i_end=&nbsp;]);|<br />
|r_front=Returns the list [&nbsp;|r_end=&nbsp;]<br />
|text={{LSL Generic/Caveats|caveats={{#var:caveats-get}}|title=*}}<br />
|toc=llGetPrimitiveParams<br />
|r1_type=vector|r1_name=position|r1_desc={{#var:p_pos_desc}}<br />
}}<br />
|examples<br />
|constants=<br />
<!--{{LSL ConstRow|CHANGED_SHAPE}}--><br />
|functions=<br />
{{LSL DefineRow||[[llGetPrimitiveParams]]|}}<br />
{{LSL DefineRow||[[llGetLinkPrimitiveParams]]|}}<br />
{{LSL DefineRow||[[llSetPrimitiveParams]]|}}<br />
{{LSL DefineRow||[[llSetLinkPrimitiveParams]]|}}<br />
{{LSL DefineRow||[[llSetLinkPrimitiveParamsFast]]|}}<br />
{{LSL DefineRow||[[llGetPos]]|}}<br />
{{LSL DefineRow||[[llSetPos]]|}}<br />
{{LSL DefineRow||[[llGetLocalPos]]|}}<br />
{{LSL DefineRow||[[llGetRootPosition]]|}}<br />
{{LSL DefineRow||[[llGetObjectDetails]]|}}<br />
|events=<br />
<!--{{LSL DefineRow||[[changed]]|}}--><br />
|location<br />
|cat1=Prim<br />
|cat2=Movement<br />
|cat3<br />
|cat4<br />
}}</div>Draconis Neurocamhttps://wiki.secondlife.com/w/index.php?title=PRIM_POS_LOCAL&diff=1152527PRIM POS LOCAL2011-08-28T06:04:02Z<p>Draconis Neurocam: removing prerelease warning from a released constant</p>
<hr />
<div><onlyinclude>{{#if:<br />
<br />
{{#vardefine:pos_local_const|{{LSL Const|PRIM_POS_LOCAL|integer|33|c=Used to {{GetSet|{{{1|}}}|get|set|/}} the prim's local position}}}}<br />
<br />
{{#vardefine:p_pos_desc|position in [[Viewer_coordinate_frames#local|local]] coordinates.}}<br />
{{#switch:{{{1|}}}<br />
|get={{#vardefine:caveats|{{#var:caveats}}<br />
{{#var:caveats-get}}}}<br />
|set={{#vardefine:caveats|{{#var:caveats}}<br />
{{#var:caveats-set}}}}<br />
<br />
}}<br />
<br />
}}</onlyinclude>{{#if:<br />
<br />
}}<br />
{{LSL Constant<br />
|name=PRIM_POS_LOCAL<br />
|type=integer<br />
|value=33<br />
|desc=PRIM_POS_LOCAL is used to get or set the prim's local position.<br />
|pa={{LSL Constant/List|i_front=[[llSetPrimitiveParams]]([&#32;{{#var:pos_local_const}},&#32;|i_end=&nbsp;]);<br />
|text=When used with [[llSetPrimitiveParams]] & [[llSetLinkPrimitiveParams]]<br />
{{LSL Generic/Caveats|caveats={{#var:caveats-set}}|title=*}}<br />
|toc=llSetPrimitiveParams<br />
|i1_type=vector|i1_name=position|i1_desc={{#var:p_pos_desc}}<br />
}}<br />
|pb={{LSL Constant/List|i_front=[[llGetPrimitiveParams]]([&nbsp;{{#var:pos_local_const}}|i_end=&nbsp;]);|<br />
|r_front=Returns the list [&nbsp;|r_end=&nbsp;]<br />
|text={{LSL Generic/Caveats|caveats={{#var:caveats-get}}|title=*}}<br />
|toc=llGetPrimitiveParams<br />
|r1_type=vector|r1_name=position|r1_desc={{#var:p_pos_desc}}<br />
}}<br />
|examples<br />
|constants=<br />
<!--{{LSL ConstRow|CHANGED_SHAPE}}--><br />
|functions=<br />
{{LSL DefineRow||[[llGetPrimitiveParams]]|}}<br />
{{LSL DefineRow||[[llGetLinkPrimitiveParams]]|}}<br />
{{LSL DefineRow||[[llSetPrimitiveParams]]|}}<br />
{{LSL DefineRow||[[llSetLinkPrimitiveParams]]|}}<br />
{{LSL DefineRow||[[llSetLinkPrimitiveParamsFast]]|}}<br />
{{LSL DefineRow||[[llGetPos]]|}}<br />
{{LSL DefineRow||[[llSetPos]]|}}<br />
{{LSL DefineRow||[[llGetLocalPos]]|}}<br />
{{LSL DefineRow||[[llGetRootPosition]]|}}<br />
{{LSL DefineRow||[[llGetObjectDetails]]|}}<br />
|events=<br />
<!--{{LSL DefineRow||[[changed]]|}}--><br />
|location<br />
|cat1=Prim<br />
|cat2=Movement<br />
|cat3<br />
|cat4<br />
}}</div>Draconis Neurocamhttps://wiki.secondlife.com/w/index.php?title=LlSetContentType&diff=1151971LlSetContentType2011-08-22T15:32:05Z<p>Draconis Neurocam: filling in values</p>
<hr />
<div>{{LSL_Function<br />
|inject-1={{LSL Generic/RC|[[Beta/Magnum|RC Magnum]]}}<br />
|mode=pre-release<br />
|func=llSetContentType<br />
|func_id=?<br />
|func_energy=?<br />
|func_sleep<br />
|func_desc=Set the {{Wikipedia|Internet media type|Internet media type}} of an [[LSL HTTP server]] response.{{Footnote|This function sets the "Content-Type" header in any subsequent [[llHTTPResponse]] responses.}}<br />
|sort<br />
|func_footnote<br />
|return_type<br />
|return_text<br />
|p1_type=key|p1_name=request_id|p1_desc=a valid [[http_request]]() key<br />
|p2_type=integer|p2_name=content_type|p2_desc=Media type to use with any following [[llHTTPResponse]]('''request_id''', ...) <br />
|constants={{{!}} class="sortable" {{Prettytable|style=margin-top:0;margin-bottom:0;}}<br />
{{!}}-{{Hl2}}<br />
! {{!}} content_type<br />
! title="Value" {{!}}<br />
! Content-Type<br />
{{!}}- <!-- to correct these, change the ihex value to the base 10 integer value of the constant and remove "|hex=0x?" and delete this comment--><br />
{{!}} {{LSL Const|CONTENT_TYPE_TEXT|integer|ihex=unknown value|hex=0x0|c=text/plain}}<br />
{{!}} {{#var:value}}<br />
{{!}} {{#var:comment}}<br />
{{!}}-<br />
{{!}} {{LSL Const|CONTENT_TYPE_HTML|integer|ihex=unknown value|hex=0x1|c=text/html}}<br />
{{!}} {{#var:value}}<br />
{{!}} {{#var:comment}}<br />
{{!}}}<br />
|spec<br />
|caveats=<br />
* This setting will be ignored if..<br />
*# the web browser is not the Second Life client<br />
*# the user (logged into the SL client viewing the page) is not the owner of the object. {{Hilite|What about group owned objects?}}<br />
|examples<br />
|helpers<br />
|also_header<br />
|also_events={{LSL DefineRow||[[http_request]]}}<br />
|also_functions={{LSL DefineRow||[[llHTTPResponse]]}}<br />
|also_articles={{LSL DefineRow||[[LSL HTTP server]]}}<br />
|also_footer<br />
|notes<br />
|history=*Scheduled for [[Beta/Magnum|RC Magnum]] channel, week of August 3, 2011.<br />
|mode<br />
|deprecated<br />
|permission<br />
|cat1=HTTP<br />
|cat2=HTTP/Server<br />
|comments=The client and owner limitations are most likely to remove the possibility of running a website from a prim.<br />
}}</div>Draconis Neurocamhttps://wiki.secondlife.com/w/index.php?title=PRIM_LINK_TARGET&diff=1151970PRIM LINK TARGET2011-08-22T15:29:03Z<p>Draconis Neurocam: Creating for posterity, needs to be completed, just a basic placeholder</p>
<hr />
<div>{{LSL Constant<br />
|name=PRIM_LINK_TARGET<br />
|type=integer<br />
|value=34<br />
|desc=PRIM_LINK_TARGET is used to get or set multiple links with a single PrimParameters call.<br />
|i1_type=integer|i1_name=link_num<br />
}}</div>Draconis Neurocamhttps://wiki.secondlife.com/w/index.php?title=LlSetAngularVelocity&diff=1151870LlSetAngularVelocity2011-08-20T05:11:38Z<p>Draconis Neurocam: creating for posterity</p>
<hr />
<div>{{LSL_Function<br />
|func_id=???|func_sleep=0.0|func_energy=???<br />
|func=llSetAngularVelocity<br />
|p1_type=vector|p1_name=force<br />
|p2_type=integer|p2_name=local|p2_desc=boolean, if {{LSLG|TRUE}} uses [[Viewer coordinate frames#Local|local]] axis, if {{LSLG|FALSE}} uses [[Viewer coordinate frames#Region|region]] axis.<br />
||p2_hover=boolean, if TRUE uses local axis, if FALSE uses region axis.<br />
|func_desc=Applies rotational velocity to object.<br />
|func_footnote<br />
|return_text<br />
|spec<br />
|caveats=Object must be physical.<br />
|constants<br />
|examples=<br />
|helpers<br />
|also_functions=<br />
{{LSL DefineRow||[[llSetVelocity]]|}}<br />
|notes<br />
|permission<br />
|negative_index<br />
|cat1=Physics<br />
|cat2=Movement<br />
|cat3<br />
|cat4<br />
}}</div>Draconis Neurocamhttps://wiki.secondlife.com/w/index.php?title=LlSetVelocity&diff=1151869LlSetVelocity2011-08-20T04:54:37Z<p>Draconis Neurocam: creating page for posterity</p>
<hr />
<div>{{LSL_Function<br />
|func=llSetVelocity<br />
|func_id=???|func_sleep=0.0|func_energy=???<br />
|p1_type=vector<br />
|p1_name=force<br />
|p2_type=integer<br />
|p2_name=local<br />
|p2_hover=boolean, if TRUE, force is treated as a local directional vector instead of region directional vector.<br />
|p2_desc=boolean, if [[TRUE]], '''force''' is treated as a [[Viewer coordinate frames#Local|local]] directional vector instead of [[Viewer coordinate frames#Region|region]] directional vector.<br />
|func_footnote=Instantaneous velocity not dependent on object energy or mass. [[llSetForce]] has continuous push.<br />
|func_desc=Applies velocity to object<br />
|return_text|spec<br />
|caveats=*Object must be physical.<br />
|examples=<br />
|helpers<br />
|also_functions=<br />
{{LSL DefineRow||[[llSetAngularVelocity]]|}}<br />
{{LSL DefineRow||[[llSetForce]]|Set continuous force}}<br />
|notes<br />
|cat1=Physics<br />
|cat2=Movement<br />
|cat3<br />
|cat4<br />
}}</div>Draconis Neurocamhttps://wiki.secondlife.com/w/index.php?title=LlGetMemoryLimit&diff=1151865LlGetMemoryLimit2011-08-20T00:41:55Z<p>Draconis Neurocam: Creating this page because it does not exist</p>
<hr />
<div>{{LSL_Function<br />
|func_id=???|func_sleep=0.0|func_energy=???<br />
|func=llGetMemoryLimit<br />
|return_type=integer<br />
|func_desc=Get the maximum memory a script can use. <br />
|Return_text=amount of memory the script can use in bytes.<br />
|func_footer<br />
|spec=<br />
<br />
;Mono:Gets the memory limit for the script.<br />
* The memory limit can be up to 64k.<br />
* All new scripts start with a limit of 64k<br />
* All existing scripts have a limit of 64k<br />
* The memory limit is not the amount of real memory actually used by the script, just the upper limit on it.<br />
<br />
;LSO:LSO scripts will always use exactly 16k<br />
<br />
|helpers<br />
|also_functions=<br />
{{LSL DefineRow||[[llSetMemoryLimit]]|}}<br />
{{LSL DefineRow||[[llGetFreeMemory]]|}}<br />
{{LSL DefineRow||[[llGetUsedMemory]]|}}<br />
{{LSL DefineRow||[[llGetObjectDetails]]|}}<br />
|also_events<br />
|also_tests<br />
|also_articles<br />
|notes<br />
|history=*Scheduled for [[Beta/Magnum|RC Magnum]] channel, week of August 3, 2011.<br />
|lso<br />
|cat1=Script<br />
|cat2=Memory<br />
|cat3=Script Profiler<br />
|cat4<br />
}}<br />
}}</div>Draconis Neurocamhttps://wiki.secondlife.com/w/index.php?title=Release_Notes/Second_Life_Server/11&diff=1151855Release Notes/Second Life Server/112011-08-20T00:01:22Z<p>Draconis Neurocam: fixed highlighting typos for functions</p>
<hr />
<div>{{TOCright}}<br />
===11.08.10.238207===<br />
* This is the "Scripting maint-server" project. released 2011-08-16<br />
** New Features<br />
*** Allow scripters to set a lower memory limit on mono scripts<br />
***: <code>integer [[llSetMemoryLimit]](integer limit)</code> Set the maximum memory a script can use to <code>limit</code>. <br />
***: <code>integer [[llGetMemoryLimit]]()</code> Get the maximum memory a script can use.<br />
*** Allow scripters to get the script time of an object<br />
***: Added a new flag to [[llGetObjectDetails]], <code>[[OBJECT_SCRIPT_TIME]]</code>, which reports the average script CPU time (in seconds) an object/avatar is using. This function returns the same time that you would see in 'Top Scripts'.<br />
*** Ability to set prim media on linked prims without sleeping the script.<br />
***: <code>integer [[llSetLinkMedia]](integer link, integer side, list params)</code> Equivalent to <code>[[llSetPrimMediaParams]]</code> called on <code>link</code> prim in the link set.<br />
***: <code>list [[llGetLinkMedia]](integer link, integer side, list params)</code> Equivalent to <code>[[llGetPrimMediaParams]]</code> called on <code>link</code> prim in the link set.<br />
***: <code>integer [[llClearLinkMedia]](integer link, integer side)</code> Equivalent to <code>[[llClearPrimMedia]]</code> called on <code>link</code> prim in the link set.<br />
*** [[llSetLinkCamera]]<br />
***: <code>[[llSetLinkCamera]](integer link, vector eye, vector at)</code> Equivalent to calling both <code>[[llSetCameraEyeOffset]]</code> and <code>[[llSetCameraAtOffset]]</code> on <code>link</code> prim in the link set.<br />
*** Allow HTML in [[llHTTPResponse]]s to browsers embedded in viewers for content you own<br />
***: <code>[[llSetContentType]](key request_id, integer content_type)</code><br />
***:* <code>[[CONTENT_TYPE_TEXT]]</code> (default) "text/plain"<br />
***:* <code>[[CONTENT_TYPE_HTML]]</code> "text/html", only valid for embedded browsers on content owned by the person viewing. Falls back to "text/plain" otherwise.<br />
*** Extend [[llGetLocalPos]] function to llGet*PrimitiveParams under [[PRIM_POS_LOCAL]]<br />
***: <code>[[PRIM_POS_LOCAL]]</code> Sets and gets the 'local' position via [[llSetLinkPrimitiveParamsFast]] and {{LSLGC|PrimitiveParams|related}}.<br />
*** [[llLinkSitTarget]], [[llAvatarOnLinkSitTarget]]<br />
***: <code>[[llLinkSitTarget]](integer link, vector offset, rotation rot)</code> Equivalent to calling <code>[[llSitTarget]]</code> on <code>link</code> prim in the link set.<br />
***: <code>key [[llAvatarOnLinkSitTarget]]()</code> Equivalent to calling <code>[[llAvatarOnSitTarget]]</code> on <code>link</code> prim in the link set.<br />
*** Add [[llSetVelocity]]() and [[llSetAngularVelocity]]() functions to LSL<br />
***: <code>[[llSetVelocity]](vector force, integer local)</code><br />
***: <code>[[llSetAngularVelocity]](vector force, integer local)</code><br />
*** Add ability for [[llSetLinkPrimitiveParams]]* and [[llGetLinkPrimitiveParams]] functions to switch link targets<br />
***: <code><nowiki>[</nowiki>[[PRIM_LINK_TARGET]], integer link_num]</code> Will cause subsequent parameters to effect <code>link_num</code> prim independent of original prim being effected. Compatible with all {{LSLGC|PrimitiveParams|PrimParams}} functions.<br />
** Bug Fixes<br />
*** Fix for {{jira|SVC-7060}} "Reliable message RevokePermissions does not revoke permissions on objects that have been granted [[PERMISSION_TRIGGER_ANIMATION]]" <br />
*** Fix for [[llDialog]] spamming that cripples the viewer.<br />
*** Fix to make shift copying copy all prim properties.<br />
*** Fix to prevent LSL scripts from using non-finite numbers in physical functions.<br />
*** Fix for {{jira|SVC-7174}}: "[[llTargetOmega]]() is not working on Second Life RC BlueSteel 11.08.09.238148"<br />
*** Fix for {{jira|SVC-7175}}: "[[llResetOtherScript]]("New Script") sometimes does not reset the script "NewScript" until it receives another event"<br />
<br />
=== 11.08.02.237522 ===<br />
* "maint-server" project. deployed 2011-08-09<br />
** New Features<br />
*** Enhancements for marketplace item delivery.<br />
** Bug Fixes<br />
*** Fix for {{jira|SVC-7104}} "Granting/revoking perms broken for non-web-profile viewers"<br />
*** Fix for {{jira|SVC-7059}} "(Spanish) [DATE I18N] Date in English in Group profile > Terreno/Bienes > L$ del grupo > Detalles tab and Ventas tab"<br />
*** Fix for {{jira|SVC-7067}} "Postcards sent from LeTigre sims fail with error code also can not upload sound files on LeTigre"<br />
*** Fix for {{jira|SVC-6973}} "France Villas Sim, we have been having MAJOR issues on this sim since the last update on the Havok software..We presently have 4 open tickets on it and TJ linden said to file a bug report"<br />
*** Changed logging for TIMEWARP issues.<br />
*** Removed some unused IM code.<br />
* History: https://wiki.secondlife.com/wiki/Release_Notes/Second_Life_RC_BlueSteel/11#11.08.02.237522<br />
<br />
===11.07.27.237011===<br />
* This is the "Improved HTTP service" project. deployed 2011-08-02<br />
* We reorganized the structure of various webservices hosted on the simhosts. In particular those associated with servicing a Capabilities requests. These are involved in operations such as HTTP Texture fetch, some inventory operations and uploading of assets.<br />
* These changes may also improve the following JIRA's<br />
** VWR-25940 - "HTTP communication with grid capabilities router is unreliable at times affecting HTTP Textures"<br />
*** https://jira.secondlife.com/browse/VWR-25940<br />
** SVC-6546 - "HTTP-IN URL's dropped after certain period"<br />
*** https://jira.secondlife.com/browse/SVC-6546<br />
** VWR-25426 - "'Friendlist displays users as Unknown or (loading), teleports fail, assets will not save"<br />
*** https://jira.secondlife.com/browse/VWR-25426<br />
** SVC-6875 - "'Failed to grant capabilities?"<br />
*** https://jira.secondlife.com/browse/SVC-6875<br />
* History: https://wiki.secondlife.com/wiki/Release_Notes/Second_Life_RC_Magnum/11#11.07.26.236927<br />
<br />
===11.07.19.236133===<br />
* This is the "HomeStead Performance Improvement" project. deployed 2011-07-26<br />
** Improved region and script performance.<br />
** Fix for SVC-7079: "Simulator performance issues since server roll (2011-06-30)"<br />
*** https://jira.secondlife.com/browse/SVC-7079<br />
* History: https://wiki.secondlife.com/wiki/Release_Notes/Second_Life_RC_Magnum/11#11.07.19.236065<br />
<br />
===11.07.12.235430===<br />
* Avatar Visibility project deployed 2011-07-19<br />
** http://wiki.secondlife.com/wiki/Hiding_avatars_and_restricting_avatar_sounds<br />
** This new feature adds the ability to control if residents on a parcel are visible to others outside that parcel, as well as the ability to see them. In other words, if TheFirst Resident is on one parcel and TheSecond Resident is on another, while this feature is enabled on either parcel, they will not see each other. Text chat on channel zero is blocked following the same rules.<br />
*** While this feature works with all viewer, a new version is required to change these options. In the version 2.8 viewer, the About Land / Options dialog will have a new checkbox.<br />
** The [http://wiki.secondlife.com/wiki/LlGetParcelDetails llGetParcelDetails()] function will now accept a new parameter [[PARCEL_DETAILS_SEE_AVATARS]] that may be passed into the function, and it will return an integer flag indicating if the setting is on or off.<br />
** Both the large map and mini map work as before. Green dots will indicate the approximate location of an avatar, regardless of this new parcel setting.<br />
** LSL sensors will function normally, and can detect the presence of avatars on parcels with this setting enabled.<br />
** Text chat on channels other than zero are not blocked by this setting.<br />
** If an avatar is on a vehicle with this feature enabled, the entire vehicle will not be seen.<br />
** All existing parcels in Second Life default to the old behavior (showing residents on the parcel). To enable this feature on your parcel, you must have the new viewer with appropriate permissions, and then turn off the checkbox above.<br />
*: If the new viewer is used on an older simulator, the option will be checked and disabled.<br />
* Sound Audibility<br />
** This feature adds new parcel controls to limit the sounds that may be played by avatars. These are sounds from gestures, played from the viewer inventory, or from scripts on attachments. The parcel owner (or group member with powers to change parcel settings) can set the parcel to allow avatar sounds from everyone, only members of the parcel group, or nobody.<br />
*** A new SecondLife viewer is required to change these settings from their default values. In the version 2.8 viewer, the About Land / Sound dialog box will have a new control:<br />
* All existing parcels will default to having this set to "Everybody" and thus behave as before this feature was introduced.<br />
* History: https://wiki.secondlife.com/wiki/Release_Notes/Second_Life_RC_BlueSteel/11#11.07.12.235430<br />
<br />
===11.07.11.235326===<br />
* Josh's "maint-server" project.<br />
** Features<br />
*** Added new parameter to <code>llHTTPRequest</code> - <code>HTTP_VERBOSE_THROTTLE</code>. Value is '''4''', type is '''integer'''. If specified in the parameters list as a non-zero value (true), the script will emit errors when the throttle for outgoing requests is hit. If zero (false), the script will remain silent on errors. The default value is true.<br />
Example: <pre>key http_request_id = llHTTPRequest("http://example.com/", [HTTP_VERBOSE_THROTTLE, 0], "");</pre><br />
*** {{jira|SCR-67}}: Added new constant <code>PRIM_OMEGA</code> for use with <code>llGetPrimitiveParams</code>, <code>llSetPrimitiveParams</code>, <code>llGetLinkPrimitiveParams</code>, <code>llSetLinkPrimitiveParams</code>, <code>llSetLinkPrimitiveParamsFast</code>. This gives access to the "target omega" property of primitives which can be set via <code>llTargetOmega</code>, but allows getting the current target omega for a prim (previously not supported) and setting the target omega on a child prim (previously only doable with a script on each prim).<br />
<br />
The list has the signature <code>[vector <var>axis</var>, float <var>spinrate</var>, float <var>gain</var>]</code> like the parameters for <code>llTargetOmega</code><br />
<br />
Examples:<br />
<br />
<pre><br />
// Set this prim rotating<br />
llTargetOmega(&lt;1.0,3.0,0.5&gt;, TWO_PI, 1.0);<br />
<br />
// Read back this prim's current target omega<br />
list current_omega = llListToList( llGetPrimitiveParams([PRIM_OMEGA]); // should be [PRIM_OMEGA, axis, spinrate, gain]<br />
vector axis = llList2Vector(current_omega, 1); // Should be &lt;1.0,3.0,0.5&gt;<br />
float spinrate = llList2Float(current_omega, 2); // Should be TWO_PI<br />
float gain = llList2Float(current_omega, 3); // Should be 1.0<br />
<br />
// Set all child prims rotating<br />
llSetLinkPrimitiveParamsFast(LINK_ALL_CHILDREN, [PRIM_OMEGA, &lt;1.0,3.0,0.5&gt;, TWO_PI, 1.0]);<br />
</pre><br />
**Bug Fixes<br />
*** Fixed issue with "Buy" option remaining set on purchased child prims of no-mod objects (Originally {{jira|VWR-9796}})<br />
*** Addressed issue with teleport and other service failures affecting simulator hosts.<br />
*** Server-side support for {{jira|STORM-1261}} - send message IDs on login failure to allow localization<br />
*** {{jira|SVC-6905}} : Fixed issue with objects resisting return, delete, take and autoreturn<br />
*** {{jira|WEB-3096}}: Fix unsubscribe link in IM-to-Email messages"<br />
*** {{jira|SVC-6953}}: Fixed issue where region restart notification appears to be from the avatar being notified.<br />
*** {{jira|SVC-5780}}: More specific error message when deeding land to group fails because transfers are blocked on the region<br />
* History: https://wiki.secondlife.com/wiki/Release_Notes/Second_Life_RC_BlueSteel/11#11.06.28.234196<br />
<br />
===11.06.29.234329===<br />
* Fix for "Homesteads experiencing poor performance and high script time"<br />
** https://jira.secondlife.com/browse/SVC-7064<br />
<br />
===11.06.17.233176===<br />
* Kelly's "mono2performance" project. deployed 2011-06-28<br />
** Script performance and robustness<br />
**: This release includes many features that improve the performance and robustness of scripts compiled to Mono. This includes a lot of back end infrastructure work with unit tests and script life cycle to make it easier and safer to work with the script system in the future.<br />
** New Script Profiling LSL Functions<br />
*** [[llScriptProfiler]] can enable or disable memory profiling with [[PROFILE_SCRIPT_MEMORY]] and [[PROFILE_SCRIPT_NONE]]. While profiling the scripts performance will be severely impacted.<br />
*** [[llGetSPMaxMemory]] will report the highest level of used memory during the most recent, or current, profiling run.<br />
*** [[llGetUsedMemory]] will report the current used memory of the script and does not require profiling to be enabled.<br />
** Bug Fixes<br />
*** {{Jira|SVC-3895}} Rezzing Mono scripted object cripples sim FPS<br />
*** Improved 'Top Scripts' report<br />
***: Each object now reports an average script time per frame since the object was created or the last 30 minutes, whichever is shorter. This fixes a lot of odd behavior and misinformation in the previous results as well as makes it easier to determine recent lag sources instead of only immediate lag sources.<br />
***: It is still not expected for this result to exactly match the 'Script ms' reported in the simulator stats summary as these measure different things on different time scales.<br />
*** (Fixed a) Sim crash in mono memory monitor.<br />
*** Includes the fix that caused the zero day rollback.<br />
*** Improved simulator performance when removing objects with scripts from a region.<br />
*** Fixed a bug that could cause scripts to crash with NullReferenceException errors.<br />
**** https://jira.secondlife.com/browse/SVC-6926<br />
*** Fix for "Periods of very low (or nonexistent) script performance"<br />
**** https://jira.secondlife.com/browse/SCR-88<br />
*** Fix for SCR-55 "script reset"<br />
**** https://jira.secondlife.com/browse/SCR-55<br />
*** Fix for SCR-76 "llRegionSayTo() silently fails in LSL2 scripts"<br />
**** https://jira.secondlife.com/browse/SCR-76<br />
*** Fix for SCR-66 "llRegionSayTo() Fails to send messages to attachments on sitting avatars"<br />
**** https://jira.secondlife.com/browse/SCR-66<br />
*** Fix for SCR-61 "llOwnersay Truncates multibyte characters at the end of it's range"<br />
**** https://jira.secondlife.com/browse/SCR-61<br />
*** Fix for SVC-6573 "Execution of script is not blocked on parcel for single user if scripts are not blocked for groups on parcel"<br />
**** https://jira.secondlife.com/browse/SVC-6573<br />
*** Fix for regions that would fail to start.<br />
*** Fixed an issue that would create long pauses when avatars logged out or TP'd to other regions.<br />
* History: https://wiki.secondlife.com/wiki/Release_Notes/Second_Life_RC_LeTigre/11#11.06.17.233176<br />
<br />
===11.06.14.232746===<br />
* The "Group Chat" project. deployed 2011-06-21<br />
* These are the simulator side fixes for group chat.<br />
* Enable addressing chat message to more than one agent in a region<br />
** A protocol was implemented on the sim and in the multiagent chat backbone service to enable addressing of a chat message to multiple agents. When more than one recipient agent is present in the same region a single request is made to the sim addressed to all recipients. Previously a request was made for each agent needlessly duplicating requests.<br />
* History: https://wiki.secondlife.com/wiki/Release_Notes/Second_Life_RC_BlueSteel/11#11.06.14.232746<br />
<br />
===11.05.31.231546===<br />
* The "friendship" project. deployed 2011-06-07<br />
* This code has changes for the People API.<br />
* We've modified the capabilities of the People API to handle adding/removing friendships.<br />
* Included are other infrastructural changes that are generic in nature.<br />
* Fix to allow services to start properly after deployment of new code.<br />
* History: https://wiki.secondlife.com/wiki/Release_Notes/Second_Life_RC_BlueSteel/11#11.05.31.231546<br />
<br />
===11.05.17.230139===<br />
* Kelly's "maint-server" project. deployed 2011-05-31<br />
* This project failed during the promotion to main channel this week. There were deploy issues that made it difficult for regions to start up. This version contains a fix for that, but is otherwise the same.<br />
** Bug Fixes<br />
*** {{jira|SCR-61}}: "[[llOwnerSay|llOwnersay]] Truncates multibyte characters at the end of it's range"<br />
*** {{jira|SVC-6573}}: Block execution of ungrouped scripts on ungrouped land that blocks scripts. <br />
*** {{jira|SVC-2810}}: IM to Email sending out messages that can't be replied to. <br />
*** {{jira|SVC-4632}}: Getting past estate land bans <br />
*** {{jira|SCR-66}}: "[[llRegionSayTo]]() Fails to send messages to attachments on sitting avatars"<br />
*** Added logging to help in investigating a "'TIMEWARP" issue that is causing some residents to be kicked off simulators <br />
*** A simulator crash mode.<br />
*** A dataserver crash in SMTP connection sending mail<br />
*** Fix to allow services to start properly after deployment of new code.<br />
* History: https://wiki.secondlife.com/wiki/Release_Notes/Second_Life_RC_LeTigre/11#11.05.17.230139<br />
<br />
===11.05.05.228940===<br />
* Because of deploy related issues with the new code this version was put back on to the main channel.<br />
* Andrew's "maint-server" project. deployed 2011-05-11<br />
* Fixed {{jira|SVC-6951}} "Random sim crashes in latest branches" <br />
* Fixed 2 simulator crashing bugs.<br />
* Made changes to message logging to be less impactful on simulator performance<br />
* Removed the physics changes tied to {{jira|SVC-5880}}.<br />
** The fix for this bug was determined to have unintended and adverse reactions.<br />
* History: https://wiki.secondlife.com/wiki/Release_Notes/Second_Life_RC_Magnum/11#11.05.05.228940<br />
<br />
===11.05.11.229644===<br />
'''ROLLED BACK'''<br />
* This project had deploy related issues that we noticed during the deploy. We cancelled the deploy and put the regions back to the previous version.<br />
* Kelly's "maint-server" project. partially deployed 2011-05-17<br />
** Bug Fixes<br />
*** {{jira|SCR-61}}: "[[llOwnerSay|llOwnersay]] Truncates multibyte characters at the end of it's range"<br />
*** {{jira|SVC-6573}}: Block execution of ungrouped scripts on ungrouped land that blocks scripts. <br />
*** {{jira|SVC-2810}}: IM to Email sending out messages that can't be replied to. <br />
*** {{jira|SVC-4632}}: Getting past estate land bans <br />
*** {{jira|SCR-66}}: "[[llRegionSayTo]]() Fails to send messages to attachments on sitting avatars"<br />
*** Added logging to help in investigating a "'TIMEWARP" issue that is causing some residents to be kicked off simulators <br />
*** A simulator crash mode.<br />
*** A dataserver crash in SMTP connection sending mail<br />
* History: https://wiki.secondlife.com/wiki/Release_Notes/Second_Life_RC_LeTigre/11#11.05.11.229644<br />
<br />
===11.05.05.228940===<br />
* Andrew's "maint-server" project. deployed 2011-05-11<br />
* Fixed {{jira|SVC-6951}} "Random sim crashes in latest branches" <br />
* Fixed 2 simulator crashing bugs.<br />
* Made changes to message logging to be less impactful on simulator performance<br />
* Removed the physics changes tied to {{jira|SVC-5880}}.<br />
** The fix for this bug was determined to have unintended and adverse reactions.<br />
* History: https://wiki.secondlife.com/wiki/Release_Notes/Second_Life_RC_Magnum/11#11.05.05.228940<br />
<br />
===11.04.26.227686===<br />
* Andrew's "maint-server" project, deployed 2011-05-03<br />
* Bug Fixes<br />
** {{jira|SVC-6055}} Avatar position reverts to original [[llSitTarget|sittarget]] in simcrossing<br />
** {{jira|SVC-6808}} Muting a new-style 'Resident' avatar is ineffective when you're offline<br />
** {{jira|SVC-6859}} [[llTeleportAgentHome]] on an agent not over your land shouldn't result in the '''target''' getting the message<br />
** {{jira|SVC-6882}} Mini-map shows multiple dots for one avatar, but avatar is not ghosted<br />
** {{jira|SVC-5880}} Vehicles "Jumping" when crossing prims<br />
*** This is caused by the physics engine reporting collision info for "hidden" faces (the vertical faces where the road objects butt up against each other). It has existed since the very beginning of SL and affects all objects (not just vehicles) however it became particularly bad for vehicles after the physics engine upgrade to Havok4 in 2008.04.<br />
*** To repair broken vehicles a "workaround" was introduced to reduce the effect: vehicle collision events get special scrutiny and some collision events are removed. It helps, but is not 100% effective and also has some side effects such as causing vehicles to sometimes partially penetrate curbs, walls, and other obstacles, or even tunnel through walls for small vehicles.<br />
*** To solve this problem correctly in Havok7 a config parameter was tweaked in the physics engine. Also, the aforementioned workaround for vehicles has been removed, so some vehicle behavior may change. Besides a reduction of vehicles penetrating obstacles they may also "jump" more when crossing seams that are not quite lined up right -- short obstacles may cause vehicles to jump where they used to roll smoothly.<br />
** {{jira|SVC-6900}} Group-owned objects located in private estates cannot send [[llInstantMessage|IMs]] to offline avatars<br />
** {{jira|SVC-6403}} [[llGiveInventory]] is not working!<br />
* New Feature<br />
** Add [[llRegionSayTo]] LSL function.<br />
* History: https://wiki.secondlife.com/wiki/Release_Notes/Second_Life_RC_BlueSteel/11#11.04.26.227686<br />
===11.04.22.227477===<br />
* Monty's "Fast Assets" project, scheduled 2011-04-26<br />
* Higher asset request concurrency for downloads issued by the simulator.<br />
** Allows concurrent simulator asset downloads from the asset backend. <br />
** Greatest improvement where regions have long download queue sizes<br />
** Lower request latency for non-texture requests particularly<br />
** Textures (HTTP and UDP) mostly unchanged<br />
* More fair queuing behavior for non-texture assets<br />
** Non-texture requests are serviced in order of receipt rather than last-in-first-out.<br />
* Security Fixes.<br />
* History: https://wiki.secondlife.com/wiki/Release_Notes/Second_Life_RC_Magnum/11#11.04.19.226960<br />
<br />
===11.04.12.226461===<br />
* "Inventory Capabilities" deployed 2011-04-19<br />
** Gives inventory capabilities to the Agent DS hosts.<br />
*** Sim capabilities support "Accept-Encoding: gzip" to provide compressed inventory responses.<br />
**** FetchInventory2<br />
**** FetchInventoryDescendents2<br />
**** FetchLib2<br />
**** FetchLibDescendents2 <br />
** Removed some dead/unused code inventory HTTP code.<br />
**History: https://wiki.secondlife.com/wiki/Release_Notes/Second_Life_RC_BlueSteel/11#11.04.12.226461<br />
<br />
===11.04.05.225793===<br />
* Andrew's "maint-server" project, deployed 2011-04-12<br />
* Bug Fixes<br />
** Threaded Rez fixes.<br />
** Config file changes.<br />
** Security fixes.<br />
** History: https://wiki.secondlife.com/wiki/Release_Notes/Second_Life_RC_LeTigre/11#11.04.05.225793<br />
<br />
===11.03.29.225234===<br />
* "Estate Transfer Limits" project, deployed 2011-04-05<br />
* This project implements adjusted behaviour limiting L$, IM, and object transfer for accounts who are limited to estates.<br />
* From Magnum: https://wiki.secondlife.com/wiki/Release_Notes/Second_Life_RC_Magnum/11#11.03.29.225234<br />
===11.03.22.224783===<br />
* "Content Management" deployed 2011-03-29<br />
* '''Bug Fixes'''<br />
** Updates to the updates to the IP management tools<br />
*** Now with even more "less crashes".<br />
**** A particular crashing bug has been plaguing us for a few weeks now. We have it fixed and it will be in this release.<br />
** Historyl: https://wiki.secondlife.com/wiki/Release_Notes/Second_Life_RC_BlueSteel/11#11.03.22.224783<br />
<br />
===11.03.18.224600===<br />
* Deployed 2011-03-22<br />
* Bug fixes and maintenance updates.<br />
** Fix for an issue introduced in "mono2-aware" where scripts could use more than 64kb of memory.<br />
*** The fix might create stack heap collision errors in some scripts made since the release of "mono2-aware"<br />
** Security fix to prevent copying 'no copy' objects.<br />
<br />
===11.03.16.224235===<br />
* Emergency release deployed late 2011-03-16<br />
** Security patch to prevent content theft.<br />
<br />
===11.03.14.223737===<br />
* Andrew's "maint-server" project, scheduled 2011-03-15<br />
* Bug Fixes<br />
** {{Jira|SVC-1144}}: replies to offline emails can't contain unicode<br />
** {{Jira|SVC-5959}}: Groups notices sent to email do not identify sender<br />
** {{Jira|SVC-6713}}: Region "0 0 2" not allowing TP access (even as god)<br />
** {{Jira|SVC-6709}}: Delete objects on owned land stopped working since recent server-updates<br />
** {{Jira|SVC-412}}: Include proper character encoding header in the messages forwarded from second life<br />
** some simulator crash modes<br />
** security fixes<br />
** enhanced config settings options<br />
** performance enhancements<br />
** other fixes<br />
** History: https://wiki.secondlife.com/wiki/Release_Notes/Second_Life_RC_LeTigre/11#11.03.08.223047<br />
<br />
===11.03.01.222364===<br />
* "server-maint" project, scheduled 2011-03-08<br />
* ''Bugs Fixed''<br />
** {{jira|SVC-6781}}: Duplicating old attachments does not copy attachment point/position/rotation info<br />
** Some people may notice a slight improvement in regions with heavy object creation/deletion. (Maestro claims he saw his object-creation benchmark speed up from 14 obj/sec to 17 obj/sec. Nothing was changed in object creation, however we did clean up object deletion, and Maestro's benchmark deletes objects as fast as they are created.)<br />
** History: https://wiki.secondlife.com/wiki/Release_Notes/Second_Life_RC_Magnum/11#11.03.01.222364<br />
<br />
===11.02.22.221781===<br />
* Kelly's "mono2-aware" project, scheduled 2011-03-01<br />
** Preparation for Mono2<br />
** This branch paves the way for upgrading the Mono virtual machine that runs scripts in Second Life. This branch ensures that scripts continue to work as we upgrade.<br />
<br />
===11.02.15.221184===<br />
* "Andrew's maint-server", scheduled 2011-02-22<br />
** Fixed a security issue related to deleting other people's objects.<br />
** Fixed two simulator crash modes.<br />
** Removed some unnecessary server logs.<br />
** Fixed {{Jira|SVC-6678}}: Changing Regions Very fast Causes " No Valid Agent ID "<br />
** Fixed {{Jira|SVC-6723}}: Scripted and linked objects not behaving properly when crossing parcel boundaries<br />
** Updates to Parcel API for supporting large land owners<br />
** NEW Feature added in 11.02.03.220327: <br />
*** "Threaded Rez": Object rezzing is moved to a separate thread. This should minimize lag instances when complex objects are rezzed in a region.<br />
<br />
===11.02.08.220555===<br />
* Display Names project scheduled 2011-02-15<br />
* '''Features'''<br />
** Display Names Improvements<br />
*** Modify simulator top scripts report to include agent IDs instead of usernames.<br />
*** Messages sent to estate by user with last name resident are seen as forged by simulator<br />
*** [[llGetDisplayName]] failed intermittently<br />
*** Offline group invite email contains Username only and contains Resident last name in body of message<br />
*** [[llGetDisplayName]] returns nothing if the resident has not chosen a new name (shouldn't it return at least the legacy name, like the viewer is showing for their name?)<br />
*** Last name resident shown in title of IM Conference Window with no Display name<br />
*** metadata embedded in postcards: shows username="Firstname Lastname" instead of "firstname.lastname"<br />
*** Confirm LSL functions tool tips have current valid descriptions<br />
<br />
===11.02.01.220158===<br />
* Interest List project scheduled 2011-02-08<br />
* '''Features'''<br />
** Interest List Improvements<br />
**: The Interest List is part of the simulator that controls how updates are sent to viewers. It is a core part of the simulator responsible for timely updates.<br />
**: This version should change the way updates for static (non-moving) objects are detected and sent to the viewer. This should be noticeable in form of:<br />
*** Faster region load times. It should take less time to see what is around you after a teleport or log in.<br />
*** Faster updates when moving in a region. While flying, for example, objects should appear sooner than before.<br />
<br />
===11.01.25.219622===<br />
* "Viewer Metrics" project, scheduled 2010-02-01<br />
* '''Features''':<br />
** Improved viewer-side metrics collection to help Linden Lab analyze performance of various features.<br />
<br />
===11.01.18.219191===<br />
* "Encroachment" project, scheduled 2011-01-25<br />
* '''Bug Fix / Feature'''<br />
** Ability to return objects that overlap ("encroach") on a parcel.<br />
**: Depends on future viewer modifications. More details on how this works ([[Parcel encroachment|here]]).<br />
<br />
===11.01.14.219134===<br />
* "Simulator Shutdown" project deployed: 2011-01-18<br />
* '''Features'''<br />
** Addresses back-end issues to make simulator/region restarts faster and more reliable.<br />
** Also includes a bundle of 3 updates to our "central servers." The Centrals, as we call them, are all the various machines that do things besides simulating regions. The three updates are:<br />
**# '''Mapserver''': a minor update to the machine that generates the region images that you see on the World Map<br />
**# '''Inventory API''': you may remember that this service was deployed a few weeks ago. We've since had to disable it due to conflicts with older viewers. This deploy is to add a version number to the API capability that the sims hand out, thereby making it only accessible to newer viewers that can properly interact with it. Older viewers will use the legacy inventory protocol that has been on the grid since the dawn of time.<br />
**# '''Region Conductor''': this is the service that decides which simulator to put regions on. When your region is down, either from a restart, crash, or whatever, the region conductor finds an empty sim to start it up on. The changes here are to improve the efficiency of how regions are placed on sims.<br />
<br />
===11.01.10.218736===<br />
* Deployed 2011-01-11<br />
* '''Features'''<br />
** TP / region crossing [[Release_Notes/Second_Life_RC_BlueSteel/10#10.12.06.216207|compression]] enabled grid wide.<br />
** Security fixes.<br />
<br />
[[Category:Server Release Notes]]</div>Draconis Neurocamhttps://wiki.secondlife.com/w/index.php?title=Category:LSL_Events&diff=1150885Category:LSL Events2011-08-08T16:37:08Z<p>Draconis Neurocam: </p>
<hr />
<div>{{LSL Header|ml=*}}<br />
<br />
Within [[state]]s LSL works on events, such as the scripted object starting to move ([[moving_start]]), colliding with things ([[collision_start]]) or a recurring timer ([[timer]]).<br />
<br />
Events do not interrupt each other, but instead are queued {{HoverText|FIFO|First In, First Out}}, though the [[state_entry]] event can jump the queue. If more that 64 events are waiting, new events are discarded until free slots become available. If the script is paused, such as when an object is taken to inventory, pending events are preserved and handled the next time the object is rezzed.<br />
On state change the event queue is cleared and any open listens are [[llListenRemove|removed]] automatically. Reoccurring sensor events ([[sensor]]) are set not to reoccur in the new state and must be manually re-enabled (via [[llSensor]] or [[llSensorRepeat]]), but timer events (from [[llSetTimerEvent]]) ''do'' reoccur. Please refer to the [[State]] article for further details.<br />
<br />
For legacy LSL - the events are registered in a unsigned-64 bit integer. Meaning there can only ever be 64 events.<br />
<br />
<br />
{{KBtrivia|<b><code>event</code></b> is a reserved word in LSL, but it is not used. If you try to use it as a function or variable name, it will cause a syntax error.}}<br />
<br />
{{LSLC|Keywords}}<br />
{{LSLC|}}</div>Draconis Neurocam