In 1-prim objects, root prim has link number 0. In other prims, root prim has link number 1 (
=LINK_ROOT
). I heard that, due to backward compatability and SLua 1-based indexing, this behavior should change:
For functions that accept a link number:
  • 0
    and
    1
    should both be treated equally as the root prim number, regardless of prim count
  • This change should be made in SLua at least, but possibly in LSL and Mono as well. (it's probably easier to change both)
For functions that return a link number:
  • They could be left alone
  • Or they could be changed to always return 1 (
    =LINK_ROOT
    ) (this would be easy to make SLua-specific if desired)
These functions accept link numbers:
  • ll.AvatarOnLinkSitTarget
  • ll.BreakLink
  • ll.ClearLinkMedia
  • ll.GetLinkKey
  • ll.GetLinkMedia
  • ll.GetLinkName
  • ll.GetLinkNumberOfSides
  • ll.GetLinkPrimitiveParams
  • ll.GetLinkSitFlags
  • ll.GetObjectLinkKey
  • ll.IsLinkGLTFMaterial
  • ll.LinkAdjustSoundVolume
  • ll.LinkParticleSystem
  • ll.LinkPlaySound
  • ll.LinkSetSoundQueueing
  • ll.LinkSetSoundRadius
  • ll.LinkSitTarget
  • ll.LinkSetSoundRadius
  • ll.MessageLinked
  • ll.SetLinkAlpha
  • ll.SetLinkCamera
  • ll.SetLinkColor
  • ll.SetLinkGLTFOverrides
  • ll.SetLinkMedia
  • ll.SetLinkPrimitiveParams
  • ll.SetLinkPrimitiveParams({PRIM_LINK_TARGET})
  • ll.SetLinkPrimitiveParamsFast
  • ll.SetLinkPrimitiveParamsFast({PRIM_LINK_TARGET})
  • ll.SetLinkRenderMaterial
  • ll.SetLinkSitFlags
  • ll.SetLinkTexture
  • ll.SetLinkTextureAnim
  • ll.SetPrimitiveParams({PRIM_LINK_TARGET})
  • ll.SitOnLink
These functions return a link number:
  • LLEvents.link_message
  • ll.CastRay
  • ll.DetectedLinkNumber
  • DetectedEvent.getLinkNumber
  • ll.GetLinkNumber
  • ll.GetObjectDetails({OBJECT_LINK_NUMBER})