OSSL vs LSL
From OpenSimulator
(Difference between revisions)
JeffKelley (Talk | contribs) m |
JeffKelley (Talk | contribs) m (Removed addressing modes. This is confusing and is covered in a separate page.) |
||
(2 intermediate revisions by one user not shown) | |||
Line 3: | Line 3: | ||
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. | 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. | + | This page tries to highlight the differences between OSSL and LSL functions when similar versions exist. |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
{| class="wikitable" style="margin:auto" | {| class="wikitable" style="margin:auto" | ||
− | | llGetLinkPrimitiveParams || [[osGetLinkPrimitiveParams]] | + | | llGetLinkPrimitiveParams || [[osGetLinkPrimitiveParams]] || Allows for multiple-link constants LINK_SET, LINK_ALL_CHILDREN. Returns a by-side list of properties. |
|- | |- | ||
− | | llSetLinkPrimitiveParams || | + | | llSetLinkPrimitiveParams || || No need for OSSL version since llSetLinkPrimitiveParams accepts all LINK_* flags |
|- | |- | ||
− | | llGetPrimitiveParams<br/>llSetPrimitiveParams || [[osGetPrimitiveParams]]<br/>[[osSetPrimitiveParams]] | + | | llGetPrimitiveParams<br/>llSetPrimitiveParams || [[osGetPrimitiveParams]]<br/>[[osSetPrimitiveParams]] || Acts on out-of-linkset primitive (uuid instead of linknumber) |
|- | |- | ||
− | || || [[osSetProjectionParams]] | + | || || [[osSetProjectionParams]] || Same effect can be obtained with llSetLinkPrimitiveParams (linknum, [PRIM_PROJECTOR]) but OSSL version has osSetPrimitiveParams power to work outside linkset. |
|- | |- | ||
− | | llCreateLink<br\>llBreakLink<br\>llBreakAllLinks || [[osForceCreateLink]]<br/>[[osForceBreakLink]]<br\>[[osForceBreakAllLinks]] | + | | llCreateLink<br\>llBreakLink<br\>llBreakAllLinks || [[osForceCreateLink]]<br/>[[osForceBreakLink]]<br\>[[osForceBreakAllLinks]] || Does not require PERMISSION_CHANGE_LINKS |
|- | |- | ||
− | | llParticleSystem<br/>llLinkParticleSystem || [[osParticleSystem]]<br/>[[osLinkParticleSystem]] | + | | llParticleSystem<br/>llLinkParticleSystem || [[osParticleSystem]]<br/>[[osLinkParticleSystem]] || |
|- | |- | ||
− | | llSitTarget<br/>llLinkSitTarget || [[osSetStandTarget]]<br/>[[osSetLinkStandTarget]] | + | | llSitTarget<br/>llLinkSitTarget || [[osSetStandTarget]]<br/>[[osSetLinkStandTarget]] || SitTarget is position when sitting.<br/>StandTarget, position when unsitting. |
|- | |- | ||
− | | llAvatarOnSitTarget<br/>llAvatarOnLinkSitTarget || [[osGetSittingAvatarsCount]]()<br/>[[osGetSittingAvatarsCount]](uuid) | + | | llAvatarOnSitTarget<br/>llAvatarOnLinkSitTarget || [[osGetSittingAvatarsCount]]()<br/>[[osGetSittingAvatarsCount]](uuid) || 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]). |
|- | |- | ||
− | | llPlaySound<br/>llLoopSound<br/>llTriggerSound<br/>... || [[osPlaySound]]<br\>[[osLoopSound]]<br\>[[osTriggerSound]]<br/>... | + | | llPlaySound<br/>llLoopSound<br/>llTriggerSound<br/>... || [[osPlaySound]]<br\>[[osLoopSound]]<br\>[[osTriggerSound]]<br/>... || All OSSL sound functions takes a linknumber argument. |
|- | |- | ||
− | | llLinkPlaySound || | + | | llLinkPlaySound || || Universal link sound function (SOUND_PLAY, SOUND_LOOP, SOUND_TRIGGER, SOUND_SYNC). Equivalent to resp. osPlaySound, osLoopSound, osTriggerSound, osPlaySoundSlave, osLoopSoundSlave. |
|- | |- | ||
− | | llGetNumberOfPrims<br/>llGetObjectPrimCount || [[osGetPrimCount]]()<br/>[[osGetPrimCount]](uuid) | + | | llGetNumberOfPrims<br/>llGetObjectPrimCount || [[osGetPrimCount]]()<br/>[[osGetPrimCount]](uuid) || OSSL version does not count sitting avatars and does work on attachments |
|- | |- | ||
− | | llStartAnimation<br/>llStopAnimation ||[[osAvatarPlayAnimation]]<br/>[[osAvatarStopAnimation]] | + | | llStartAnimation<br/>llStopAnimation ||[[osAvatarPlayAnimation]]<br/>[[osAvatarStopAnimation]] || Does not require PERMISSION_TRIGGER_ANIMATION<br/>OSSL can animate multiples avatars, when LSL is bound to the avatar having granted the permission. |
|- | |- | ||
− | | llAttachToAvatar<br/> llDetachFromAvatar || [[osForceAttachToAvatar]]<br/>[[osForceDetachFromAvatar]] | + | | llAttachToAvatar<br/> llDetachFromAvatar || [[osForceAttachToAvatar]]<br/>[[osForceDetachFromAvatar]] || 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/>[[ | + | | llGetAgentList || [[osGetAgents]]<br/>[[osGetAvatarList]]<br/>[[OsGetNpcList|osGetNPCList]] || llGetAgentList returns a list of agent keys.<br/> osGetAgents, a list of agent names.<br/>osGetAvatarList, a strided list of agent (key, position, name).<br/>osGetNPCList : same as osGetAvatarList, but only NPCs. |
|- | |- | ||
− | | llGetInventoryKey<br/>llGetInventoryName || [[osGetInventoryItemKey]]<br/>[[osGetInventoryName]] | + | | llGetInventoryKey<br/>llGetInventoryName || [[osGetInventoryItemKey]]<br/>[[osGetInventoryName]] || llGetInventoryKey returns <u>item</u> id while osGetInventoryItemKey returns <u>asset</u> id.<br/>llGetInventoryName returns name from (index,type) while osGetInventoryName return name fro item id. |
|} | |} |
Latest revision as of 07:33, 19 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.
llGetLinkPrimitiveParams | osGetLinkPrimitiveParams | Allows for multiple-link constants LINK_SET, LINK_ALL_CHILDREN. Returns a by-side list of properties. |
llSetLinkPrimitiveParams | No need for OSSL version since llSetLinkPrimitiveParams accepts all LINK_* flags | |
llGetPrimitiveParams llSetPrimitiveParams |
osGetPrimitiveParams osSetPrimitiveParams |
Acts on out-of-linkset primitive (uuid instead of linknumber) |
osSetProjectionParams | 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 |
|
llSitTarget llLinkSitTarget |
osSetStandTarget osSetLinkStandTarget |
SitTarget is position when sitting. StandTarget, position when unsitting. |
llAvatarOnSitTarget llAvatarOnLinkSitTarget |
osGetSittingAvatarsCount() osGetSittingAvatarsCount(uuid) |
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]). |
llPlaySound llLoopSound llTriggerSound ... |
osPlaySound osLoopSound osTriggerSound ... |
All OSSL sound functions takes a linknumber argument. |
llLinkPlaySound | 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) |
OSSL version does not count sitting avatars and does work on attachments |
llStartAnimation llStopAnimation |
osAvatarPlayAnimation osAvatarStopAnimation |
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 |
Does not require PERMISSION_ATTACH. Target avatar is implicit. To attach explicitely to a given avatar, use osForceAttachToOtherAvatarFromInventory on the avatar's key. |
llGetAgentList | osGetAgents osGetAvatarList osGetNPCList |
llGetAgentList returns a list of agent keys. osGetAgents, a list of agent names. osGetAvatarList, a strided list of agent (key, position, name). osGetNPCList : same as osGetAvatarList, but only NPCs. |
llGetInventoryKey llGetInventoryName |
osGetInventoryItemKey osGetInventoryName |
llGetInventoryKey returns item id while osGetInventoryItemKey returns asset id. llGetInventoryName returns name from (index,type) while osGetInventoryName return name fro item id. |