OSSL vs LSL

From OpenSimulator

(Difference between revisions)
Jump to: navigation, search
m
m
Line 1: Line 1:
This page to highlight the difference between OSSL and LSL functions when similar versions exist.
+
LSL and OSSL functions may appear overlapping. Sometimes, they are. This may happen when a OSSL function has been written before it's LL conterpart. Most of the time, they are complementary.
  
Work in progress, not to be linked now.
+
OSSL implements features not available in LSL (NPCs, Texture Drawing) or extend them, like adressing prims by key, which gives unprecedented flexibility to the scripter.
 +
 
 +
This page tries to highlight the differences between OSSL and LSL functions when similar versions exist. Functions are tagged with adressing modes :
  
 
'''H''' : Target is the script's host (the prim containing the script)<br/>
 
'''H''' : Target is the script's host (the prim containing the script)<br/>
'''L''' : Target is prim in the linkset, adressed by link number<br/>
+
'''L''' : Target is a prim in the linkset, adressed by link number<br/>
 
'''K''' : Target is any prim you own, adressed by key (inside or outside linkset)<br/>
 
'''K''' : Target is any prim you own, adressed by key (inside or outside linkset)<br/>
 
'''A''' : Target is an avatar<br/>
 
'''A''' : Target is an avatar<br/>
  
When a function is marked as supporting different adressing modes, these are overloads (a.k.a. 'variants') selected at compile time according to the parameter types.
+
When a function is tagged with multiple adressing modes, these are overloads (a.k.a. 'variants') selected at compile time according to the parameter types.
 
   
 
   
  
Line 37: Line 39:
 
|-
 
|-
 
| llAttachToAvatar<br/> llDetachFromAvatar || [[osForceAttachToAvatar]]<br/>[[osForceDetachFromAvatar]] || A || Does not require PERMISSION_ATTACH.<br/>Target avatar is implicit. To attach explicitely to a given avatar, use osForceAttachToOtherAvatarFromInventory on the avatar's key.
 
| llAttachToAvatar<br/> llDetachFromAvatar || [[osForceAttachToAvatar]]<br/>[[osForceDetachFromAvatar]] || A || Does not require PERMISSION_ATTACH.<br/>Target avatar is implicit. To attach explicitely to a given avatar, use osForceAttachToOtherAvatarFromInventory on the avatar's key.
 +
|-
 +
| llGetAgentList || [[osGetAvatarList]]<br/>osGetAgents || || llGetAgentList returns a list of agent keys. osGetAgents, a list of agant names. osGetAvatarList, a strided list of agent (key, position, name).
 
|}
 
|}

Revision as of 01:01, 16 June 2023

LSL and OSSL functions may appear overlapping. Sometimes, they are. This may happen when a OSSL function has been written before it's LL conterpart. Most of the time, they are complementary.

OSSL implements features not available in LSL (NPCs, Texture Drawing) or extend them, like adressing prims by key, which gives unprecedented flexibility to the scripter.

This page tries to highlight the differences between OSSL and LSL functions when similar versions exist. Functions are tagged with adressing modes :

H : Target is the script's host (the prim containing the script)
L : Target is a prim in the linkset, adressed by link number
K : Target is any prim you own, adressed by key (inside or outside linkset)
A : Target is an avatar

When a function is tagged with multiple adressing modes, these are overloads (a.k.a. 'variants') selected at compile time according to the parameter types.


llGetLinkPrimitiveParams osGetLinkPrimitiveParams L Allows for multiple-link constants LINK_SET, LINK_ALL_CHILDREN. Returns a by-side list of properties.
llSetLinkPrimitiveParams L No need for OSSL version since llSetLinkPrimitiveParams accepts all LINK_* flags
llGetPrimitiveParams
llSetPrimitiveParams
osGetPrimitiveParams
osSetPrimitiveParams
K Acts on out-of-linkset primitive (uuid instead of linknumber)
osSetProjectionParams H L K Same effect can be obtained with llSetLinkPrimitiveParams (linknum, [PRIM_PROJECTOR]) but OSSL version has osSetPrimitiveParams power to work outside linkset.
llCreateLink
llBreakLink
llBreakAllLinks
osForceCreateLink
osForceBreakLink
osForceBreakAllLinks
Does not require PERMISSION_CHANGE_LINKS
llParticleSystem
llLinkParticleSystem
osParticleSystem
osLinkParticleSystem
H
L
llSitTarget
llLinkSitTarget
osSetStandTarget
osSetLinkStandTarget
H
L
Set the position of the feet of the avatar, when ll version set the position of the Agent Target (Developer > Avatar > Display Agent Target)
llPlaySound
llLoopSound
llTriggerSound
...
osPlaySound
osLoopSound
osTriggerSound
...
L All OSSL sound functions takes a linknumber argument.
llLinkPlaySound L Universal link sound function (SOUND_PLAY, SOUND_LOOP, SOUND_TRIGGER, SOUND_SYNC). Equivalent to resp. osPlaySound, osLoopSound, osTriggerSound, osPlaySoundSlave, osLoopSoundSlave.
llGetNumberOfPrims
llGetObjectPrimCount
osGetPrimCount()
osGetPrimCount(uuid)
H K OSSL version does not count sitting avatars and does work on attachments
llAvatarOnSitTarget
llAvatarOnLinkSitTarget
osGetSittingAvatarsCount()
osGetSittingAvatarsCount(uuid)
H K OSSL function returns the total number of avatars sitting on a linkset. LSL functions apply only to avatars on sittarget (return NULL_KEY if sittarget is not set) and cannot operate outside the linkset. A similar result can be obtained with llGetObjectDetails(uuid, [OBJECT_SIT_COUNT]).
llStartAnimation
llStopAnimation
osAvatarPlayAnimation
osAvatarStopAnimation
A Does not require PERMISSION_TRIGGER_ANIMATION
OSSL can animate multiples avatars, when LSL is bound to the avatar having granted the permission.
llAttachToAvatar
llDetachFromAvatar
osForceAttachToAvatar
osForceDetachFromAvatar
A Does not require PERMISSION_ATTACH.
Target avatar is implicit. To attach explicitely to a given avatar, use osForceAttachToOtherAvatarFromInventory on the avatar's key.
llGetAgentList osGetAvatarList
osGetAgents
llGetAgentList returns a list of agent keys. osGetAgents, a list of agant names. osGetAvatarList, a strided list of agent (key, position, name).
Personal tools
General
About This Wiki