Functions Defined
A function can be thought of as a machine into which input is provided, and which returns output. By using functions, the same blocks of code can be used over and over again, simply by referencing them.
LSL and OSSL come with hundreds of built-in functions that allow scripts and objects to interact with their environment. The built-in functions start with “ll” or “os”.
This example calls the llSay function which is used to send chat text to the specified channel.
llSay(0, "Hello world!");
The user can define functions (even with return values) as long as the name does not conflict with a reserved word, a built-in constant, or a built-in function.
Note: As LSL and OSSL have matured, several functions have been deprecated. Be sure to use the correct function since deprecated functions are unreliable and may be removed completely at a future date. Some LSL deprecated functions do not exist in OpenSimulator.
Function Categories:
|
LSL Functions Status
The table will reflect ALL current LL-LSL Functions, including those which are not supported in OpenSimulator.
These unsupported functions (notably Pathfinding etc) are there to show what is implemented and what is not.
Function | Implemented | Comments |
---|---|---|
llAbs | Yes | |
llAcos | Yes | |
llAddToLandBanList | Yes | |
llAddToLandPassList | Yes | |
llAdjustSoundVolume | Yes | |
llAgentInExperience | No | LL Experience Only. Not in OpenSimulator |
llAllowInventoryDrop | Yes | |
llAngleBetween | Yes | |
llApplyImpulse | Partial | |
llApplyRotationalImpulse | No | |
llAsin | Yes | |
llAtan2 | Yes | |
llAttachToAvatar | Yes | Works in OpenSim 0.9.1.0 Dev |
llAttachToAvatarTemp | Yes | Works in OpenSim 0.9.1.0 Dev with an error message in Singularity |
llAvatarOnLinkSitTarget | Yes | Works in OpenSim 0.9.1.0 Dev |
llAvatarOnSitTarget | Yes | |
llAxes2Rot | Yes | |
llAxisAngle2Rot | Yes | |
llBase64ToInteger | Yes | |
llBase64ToString | Yes | |
llBreakAllLinks | Yes | |
llBreakLink | Yes | |
llCastRay | Yes | |
llCeil | Yes | |
llClearCameraParams | Yes | |
llClearLinkMedia | Yes | Works in OpenSim 0.9.1.0 Dev |
llClearPrimMedia | Yes | Works in OpenSim 0.9.1.0 Dev |
llCloseRemoteDataChannel | Yes | |
llCloud | Yes | |
llCollisionFilter | Yes | Works in OpenSim 0.9.1.0 Dev |
llCollisionSound | No | |
llCollisionSprite | No | |
llCos | Yes | |
llCreateCharacter | No | Not in OpenSimulator |
llCreateKeyValue | No | Not in OpenSimulator |
llCreateLink | Yes | |
llCSV2List | Yes | |
llDataSizeKeyValue | No | Not in OpenSimulator |
llDeleteCharacter | No | Not in OpenSimulator |
llDeleteKeyValue | No | Not in OpenSimulator |
llDeleteSubList | Yes | |
llDeleteSubString | Yes | |
llDetachFromAvatar | No | |
llDetectedGrab | Partial | |
llDetectedGroup | No | |
llDetectedKey | Yes | works. |
llDetectedLinkNumber | Yes | tested at 2011.01.25 on 0.7.1 Dev |
llDetectedName | Yes | works. |
llDetectedOwner | Yes | works. |
llDetectedPos | Yes | works. |
llDetectedRot | Yes | |
llDetectedTouchBinormal | Unknown | |
llDetectedTouchFace | Unknown | |
llDetectedTouchNormal | Unknown | |
llDetectedTouchPos | Unknown | |
llDetectedTouchST | Yes | * Tested in OpenSim 0.8.0 Dev |
llDetectedTouchUV | Yes | Works in OpenSim 0.9.1.0 Dev |
llDetectedType | Yes | works. |
llDetectedVel | Yes | |
llDialog | Yes | |
llDie | Yes | -2683 |
llDumpList2String | Yes | |
llEdgeOfWorld | Yes* | |
llEjectFromLand | Yes | |
llEmail | Yes | |
llEscapeURL | Yes | |
llEuler2Rot | Yes | |
llEvade | No | LL Pathfinding Only. Not in OpenSimulator |
llExecCharacterCmd | No | LL Pathfinding Only. Not in OpenSimulator |
llFabs | Yes | -2683 |
llFleeFrom | No | Not in OpenSimulator |
llFloor | Yes | -2683 |
llForceMouselook | Yes | |
llFrand | Yes | |
llGenerateKey | Yes | |
llGetAccel | Yes | |
llGetAgentInfo | Partial | |
llGetAgentLanguage | Partial | Working as of 0.8.2.0 for local avatar only |
llGetAgentList | Yes | |
llGetAgentSize | Yes | |
llGetAlpha | Partial | ALLSIDES returns default texture, not sum, specific faces display correctly |
llGetAndResetTime | Yes | -2750 |
llGetAnimation | Yes | |
llGetAnimationList | Yes | |
llGetAnimationOverride | Yes | works in 0901 |
llGetAttached | No | |
llGetAttachedList | Unknown | |
llGetBoundingBox | Partial | |
llGetCameraPos | Yes | |
llGetCameraRot | Yes | |
llGetCenterOfMass | No | |
llGetClosestNavPoint | No | Not in OpenSimulator |
llGetColor | Partial | ALLSIDES returns default texture, not average, anything trying to grab more than 3 sides fails per example 2 |
llGetCreator | Yes | -2683 |
llGetDate | Yes | -2683 |
llGetDisplayName | Unknown | |
llGetEnergy | Partial | Always returns 1.0f |
llGetEnv | No | |
llGetEnvironment | No | |
llGetExperienceDetails | No | Not in OpenSimulator |
llGetExperienceErrorMessage | No | Not in OpenSimulator |
llGetForce | Yes | |
llGetFreeMemory | No | |
llGetFreeURLs | Unknown | |
llGetGeometricCenter | Partial | |
llGetGMTclock | Yes | |
llGetHTTPHeader | Yes | tested at 2011.01.25 on 0.7.1 Dev with XEngine |
llGetInventoryCreator | Yes | |
llGetInventoryKey | Yes | |
llGetInventoryName | Yes | |
llGetInventoryNumber | Yes | |
llGetInventoryPermMask | Yes | |
llGetInventoryType | Yes | |
llGetKey | Yes | |
llGetLandOwnerAt | Yes | |
llGetLinkKey | Yes | |
llGetLinkMedia | * Requires testing and Verification | |
llGetLinkName | Yes | |
llGetLinkNumber | Yes | -2754 |
llGetLinkNumberOfSides | Yes | |
llGetLinkPrimitiveParams | ||
llGetListEntryType | Yes | |
llGetListLength | Yes | -2750 |
llGetLocalPos | No | Fails |
llGetLocalRot | Yes | |
llGetMass | Yes | |
llGetMassMKS | No | |
llGetMaxScaleFactor | No | Requires Implementation |
llGetMemoryLimit | No | Requires Implementation (Mar.01.2012) |
llGetMinScaleFactor | No | Requires Implementation |
llGetNextEmail | Yes | |
llGetNotecardLine | Partial | |
llGetNumberOfNotecardLines | Partial | |
llGetNumberOfPrims | Yes | |
llGetNumberOfSides | Yes | |
llGetObjectDesc | Yes | |
llGetObjectDetails | Partial | |
llGetObjectMass | Yes | Sitting avatars are phantom, don't count for the mass. |
llGetObjectName | Yes | -2688 |
llGetObjectPermMask | Yes | |
llGetObjectPrimCount | Yes | |
llGetOmega | Yes | |
llGetOwner | Yes | |
llGetOwnerKey | Yes | |
llGetParcelDetails | Yes | |
llGetParcelFlags | Yes | |
llGetParcelMaxPrims | Yes | |
llGetParcelMusicURL | ||
llGetParcelPrimCount | Yes | |
llGetParcelPrimOwners | Yes | |
llGetPermissions | Yes | |
llGetPermissionsKey | Yes | |
llGetPhysicsMaterial | Unknown | |
llGetPos | Yes | |
llGetPrimitiveParams | Partial | |
llGetPrimMediaParams | Unknown | |
llGetRegionAgentCount | Unknown | |
llGetRegionCorner | Yes | -2688 |
llGetRegionFlags | Yes | |
llGetRegionFPS | No | Always returns 10.0f |
llGetRegionName | Yes | -2688 |
llGetRegionTimeDilation | Yes | |
llGetRootPosition | Yes | |
llGetRootRotation | Yes | |
llGetRot | Yes | |
llGetScale | Yes | |
llGetScriptName | Yes | works. |
llGetScriptState | Yes | Works. |
llGetSimStats | Unknown | |
llGetSimulatorHostname | Yes | |
llGetSPMaxMemory | No | Requires Implementation (Mar.01.2012) |
llGetStartParameter | No | Returns always 0! Same limitations as llSetStatus |
llGetStaticPath | No | Not in OpenSimulator |
llGetStatus | Yes | |
llGetSubString | Partial | |
llGetSunDirection | Yes | |
llGetTexture | Yes | |
llGetTextureOffset | Yes | |
llGetTextureRot | Yes | |
llGetTextureScale | Yes | |
llGetTime | Yes | |
llGetTimeOfDay | Yes | |
llGetTimestamp | Yes | |
llGetTorque | No | |
llGetUnixTime | Yes | |
llGetUsedMemory | No | |
llGetUsername | Unknown | |
llGetVel | Yes | |
llGetWallclock | Yes | |
llGiveInventory | Yes | |
llGiveInventoryList | Yes | |
llGiveMoney | Yes | Works |
llGodLikeRezObject | No | |
llGround | Yes | |
llGroundContour | Yes | |
llGroundNormal | Yes | |
llGroundRepel | No | |
llGroundSlope | Yes | |
llHTTPRequest | Yes | |
llHTTPResponse | Yes | Tested on 2011.01.25 with 0.7.1 Dev OS and xEngine |
llInsertString | Yes | |
llInstantMessage | Yes | 1 |
llIntegerToBase64 | Yes | |
llJson2List | Yes | |
llJsonGetValue | Yes | |
llJsonSetValue | Yes | |
llJsonValueType | Yes | |
llKey2Name | Yes | |
llKeyCountKeyValue | No | Not in OpenSimulator |
llKeysKeyValue | No | Not in OpenSimulator |
llLinkParticleSystem | Unknown | |
llLinkSitTarget | Unknown | |
llList2CSV | Yes | |
llList2Float | Yes | |
llList2Integer | Yes | |
llList2Json | Yes | |
llList2Key | Yes | |
llList2List | Yes | |
llList2ListStrided | Yes | |
llList2Rot | Yes | -2754 |
llList2String | Yes | |
llList2Vector | Yes | |
llListen | Yes | |
llListenControl | Yes | |
llListenRemove | Yes | |
llListFindList | Yes | |
llListInsertList | Yes | |
llListRandomize | Yes | |
llListReplaceList | Yes | |
llListSort | Yes | |
llListStatistics | Yes | |
llLoadURL | Yes | |
llLog | Yes | |
llLog10 | Yes | |
llLookAt | Yes | |
llLoopSound | Yes | |
llLoopSoundMaster | No | |
llLoopSoundSlave | No | |
llMakeExplosion | No (Deprecated) | Deprecated |
llMakeFire | No (Deprecated) | Deprecated |
llMakeFountain | No (Deprecated) | Deprecated |
llMakeSmoke | No (Deprecated) | Deprecated |
llManageEstateAccess | Unknown | |
llMapDestination | Yes | |
llMD5String | Yes | |
llMessageLinked | Yes | |
llMinEventDelay | No | |
llModifyLand | Yes | |
llModPow | Yes | |
llMoveToTarget | Yes | |
llName2Key | Yes | |
llNavigateTo | No | Not in OpenSimulator |
llOffsetTexture | Yes | -2683 |
llOpenRemoteDataChannel | Yes | |
llOverMyLand | Yes | |
llOwnerSay | Yes | |
llParcelMediaCommandList | Yes | |
llParcelMediaQuery | Yes | |
llParseString2List | Yes | Spacers are not parsed if separator list is empty |
llParseStringKeepNulls | Yes | |
llParticleSystem | Yes | |
llPassCollisions | No | |
llPassTouches | No | |
llPatrolPoints | No | Not in OpenSimulator |
llPlaySound | Yes | |
llPlaySoundSlave | No | |
llPointAt | No | |
llPow | Yes | |
llPreloadSound | Yes | |
llPursue | No | Not in OpenSimulator |
llPushObject | Yes | |
llReadKeyValue | No | Not in OpenSimulator |
llRefreshPrimURL | No | |
llRegionSay | Yes | |
llRegionSayTo | Yes | |
llReleaseCamera | No (Deprecated) | Deprecated |
llReleaseControls | Yes | |
llReleaseURL | No | |
llRemoteDataReply | Yes | |
llRemoteDataSetRegion | No | |
llRemoteLoadScript | No (Deprecated) | Deprecated |
llRemoteLoadScriptPin | Yes | |
llRemoveFromLandBanList | Yes | |
llRemoveFromLandPassList | Yes | |
llRemoveInventory | Yes | |
llRemoveVehicleFlags | No | |
llRequestAgentData | No | |
llRequestDisplayName | Unknown | |
llRequestExperiencePermissions | No | Not in OpenSimulator |
llRequestInventoryData | Yes | |
llRequestPermissions | Yes | |
llRequestSecureURL | No | |
llRequestSimulatorData | Yes | |
llRequestURL | Yes | |
llRequestUserKey | Unknown | |
llRequestUsername | Unknown | |
llResetAnimationOverride | Yes | |
llResetLandBanList | Yes | |
llResetLandPassList | Yes | |
llResetOtherScript | Yes | |
llResetScript | Yes | This function is ignored in the state_entry() function of the default state |
llResetTime | Yes | -2750 |
llReturnObjectsByID | No | |
llReturnObjectsByOwner | No | |
llRezAtRoot | Yes | |
llRezObject | Yes | |
llRot2Angle | Yes | |
llRot2Axis | Yes | |
llRot2Euler | Yes | |
llRot2Fwd | Yes | |
llRot2Left | Yes | |
llRot2Up | Yes | |
llRotateTexture | Yes | -2683 |
llRotBetween | Yes | |
llRotLookAt | Yes | Works different than SL (better?) |
llRotTarget | No | |
llRotTargetRemove | No | |
llRound | Yes | |
llSameGroup | Yes | |
llSay | Yes | (2688)(limted to 1023 chars) |
llScaleByFactor | Unknown | |
llScaleTexture | Yes | -2683 |
llScriptDanger | Yes | |
llScriptProfiler | No | Requires Implementation (Mar.01.2012) |
llSendRemoteData | Yes | |
llSensor | Yes | Works beyond 96m 🙂 tested past 1000m |
llSensorRemove | Yes | Works |
llSensorRepeat | Yes | Works beyond 96m 🙂 tested past 1000m |
llSetAlpha | Yes | -2688 |
llSetAngularVelocity | No | Requires Implementation (Mar.01.2012) |
llSetAnimationOverride | Yes | works in 0901 |
llSetBuoyancy | Yes | Works on free objects, does not make avatars buoyant with scripted attachments. The LSL wiki suggests using llSetPhysicsMaterial for better performance, but this is not implemented yet in OpenSim. |
llSetCameraAtOffset | Yes | |
llSetCameraEyeOffset | Yes | |
llSetCameraParams | Yes | |
llSetClickAction | Unknown | |
llSetColor | Yes | -2688 |
llSetContentType | No | Requires Implementation (Mar.01.2012) |
llSetDamage | No | |
llSetForce | Yes | |
llSetForceAndTorque | No | |
llSetHoverHeight | Yes/No | works with ubode physic ONLY |
llSetInventoryPermMask | No | |
llSetKeyframedMotion | Yes | Worked well since OpenSim 0.7.6 |
llSetLinkAlpha | Yes | -2760 |
llSetLinkCamera | No | |
llSetLinkColor | Yes | -2760 |
llSetLinkMedia | Unknown | |
llSetLinkPrimitiveParams | Partial | Partial - PRIM_NORMAL, PRIM_SPECULAR and PRIM_ALPHA_MODE not yet implemented |
llSetLinkPrimitiveParamsFast | Partial | * does not highlight like normal. (in connection to llGetLinkPrimitiveParams), together they rip linked prims apart when the item is worn. but not when it is dropped on the ground - PRIM_NORMAL, PRIM_SPECULAR and PRIM_ALPHA_MODE not yet implemented |
llSetLinkTexture | Yes | |
llSetLinkTextureAnim | Unknown | |
llSetLocalRot | Yes | |
llSetMemoryLimit | No | Requires Implementation (Mar.01.2012) |
llSetObjectDesc | Yes | 100% implemented |
llSetObjectName | Yes | 100% implemented |
llSetObjectPermMask | Yes | |
llSetParcelMusicURL | Yes | (2826) Land update not sending changed streams to client. |
llSetPayPrice | Yes | |
llSetPhysicsMaterial | Unknown | |
llSetPos | Yes | (2688) (now with limitation of 10m as in sl) |
llSetPrimitiveParams | Partial | Partial (it seems complete but needed extensive checking. Also types in list are not LSL conformant) Blackdog Ashbourne: PRIM_POSITION doesn't seem to work - certainly doesn't allow for a warpPos implementation - PRIM_NORMAL, PRIM_SPECULAR and PRIM_ALPHA_MODE not yet implemented |
llSetPrimMediaParams | Unknown | * Requires testing and Verification (update here plz) |
llSetPrimURL | No (Deprecated) | Deprecated |
llSetRegionPos | Yes | Tested on the Kitely and Avacon grids. |
llSetRemoteScriptAccessPin | Yes | |
llSetRot | Yes | -2688 |
llSetScale | Yes | -2688 |
llSetScriptState | Yes | Works. |
llSetSitText | Yes | |
llSetSoundQueueing | No | |
llSetSoundRadius | Yes | |
llSetStatus | Yes | Doesn't honor STATUS_BLOCK_GRAB STATUS_RETURN_AT_EDGE STATUS_SANDBOX |
llSetText | Yes | -2760 |
llSetTexture | Yes | -2688 |
llSetTextureAnim | Yes | |
llSetTimerEvent | Yes | (2688) (uses Timer plugin!) |
llSetTorque | No | |
llSetTouchText | Yes | Works. |
llSetVehicleFlags | No | |
llSetVehicleFloatParam | Yes | |
llSetVehicleRotationParam | Yes | |
llSetVehicleType | Yes | |
llSetVehicleVectorParam | Yes | |
llSetVelocity | No | Requires Implementation (Mar.01.2012) |
llSHA1String | Unknown | * Requires testing and Verification (update here plz) |
llShout | Yes | (2688) (limits 1023 chars) |
llSin | Yes | -2688 |
llSitOnLink | Unknown | |
llSitTarget | Yes | |
llSleep | Yes | This function CAN lock script threads. This is a Partial Implementation. DO NOT USE! There are Mantii on it and it is a well known OpenSim buglet. |
llSound | No (Deprecated) | Deprecated |
llSoundPreload | No (Deprecated) | Deprecated |
llSqrt | Yes | -2688 |
llStartAnimation | Yes | |
llStopAnimation | Yes | |
llStopHover | Yes | |
llStopLookAt | No | |
llStopMoveToTarget | Yes | |
llStopPointAt | No (Deprecated) | Deprecated |
llStopSound | Yes | |
llStringLength | Yes | |
llStringToBase64 | Yes | |
llStringTrim | Yes | |
llSubStringIndex | Yes | |
llTakeCamera | No (Deprecated) | Deprecated |
llTakeControls | Yes | Needed for Kan-ed#12 |
llTan | Yes | -2688 |
llTarget | Yes | |
llTargetOmega | Yes | Works. |
llTargetRemove | Yes | |
llTeleportAgent | Yes | |
llTeleportAgentGlobalCoords | Yes | |
llTeleportAgentHome | Yes | |
llTextBox | Yes | Operational with Viewers that support it. V3 and above all do. |
llToLower | Yes | |
llToUpper | Yes | |
llTransferLindenDollars | No | Requires Implementation (Mar.01.2012) |
llTriggerSound | Yes | Works. |
llTriggerSoundLimited | No | |
llUnescapeURL | Yes | |
llUnSit | Yes | Works. |
llUpdateCharacter | No | LL Pathfinding Only. Not in OpenSimulator |
llUpdateKeyValue | No | LL Experience Only. Not in OpenSimulator |
llVecDist | Yes | Tested in OpenSim 0.7.6 Dev |
llVecMag | Yes | Tested in OpenSim 0.7.6 Dev |
llVecNorm | Yes | -2688 |
llVolumeDetect | Partial | Implementation needs ODE to work, other physics engine only have a stub for this. Persistance of this feature (survive region restart) only implemented for SQLite. Semantics are slightly different to SL (switching off phantom via GUI also resets VolDet-status to off) |
llWanderWithin | No | LL Pathfinding Only. Not in OpenSimulator |
llWater | Yes | |
llWhisper | Yes | (2688) (but limited to 1023 chars) |
llWind | Yes | |
llXorBase64 | Unknown | |
llXorBase64Strings | No (Deprecated) | Deprecated |
llXorBase64StringsCorrect | Yes |
From Opensimulator.org with changes made for Brevity and clarity. Their license is here: