OpenSim.Region.ScriptEngine.Shared.Api.LSL_Api.AttachToAvatar C# (CSharp) Method

AttachToAvatar() public method

Attach the object containing this script to the avatar that owns it.
public AttachToAvatar ( int attachmentPoint ) : bool
attachmentPoint int /// The attachment point (e.g. ATTACH_CHEST) ///
return bool
        public bool AttachToAvatar(int attachmentPoint)
        {
            SceneObjectGroup grp = m_host.ParentGroup;
            ScenePresence presence = World.GetScenePresence(m_host.OwnerID);

            IAttachmentsModule attachmentsModule = m_ScriptEngine.World.AttachmentsModule;

            if (attachmentsModule != null)
                return attachmentsModule.AttachObject(presence, grp, (uint)attachmentPoint, false, true, true);
            else
                return false;
        }
LSL_Api