@detach has two jobs. As a restriction it locks the attachment that issues it (@detach=n) or a whole attachment point (@detach:<point>=n). As a force command it removes attachments: all of them, those on one point, one object by UUID, or the contents of a #RLV folder.

Syntax

@detach=<n|y>                      lock/unlock this attachment
@detach:<attachpt>=<n|y>           lock/unlock an attachment point
@detach=force                      detach every (unlocked) attachment
@detach:<attachpt>=force           detach everything on that point
@detach:<uuid>=force               detach one worn object
@detach:<folder/path>=force        detach/unwear the items in a #RLV folder

Parameters

attachpt
Attachment point name, lowercased, as the viewer names it: chest, skull, left shoulder, r upper arm, spine, pelvis, neck, HUD points center 2, top right, top, top left, center, bottom left, bottom, bottom right, and so on. root is accepted as an alias for avatar center. With =force the name must match exactly. Otherwise it is treated as a folder name.
uuid
Any prim key of a worn attachment; the whole linkset is detached.
folder/path
A path under #RLV, resolved the same way as for @attach (see Caveats). A leading #RLV/ is stripped.

Specification

@detach=n (lock this object)

The issuing object can't be detached by the user (menus, inventory, Ctrl-drag, "Wear" replacing it, @detachall and similar force commands from other objects). If it is issued from a child prim, the whole linkset is locked. If a locked object is removed anyway (for example kicked off by llAttachToAvatar from another object, or by a "Wear" that replaced it), the viewer remembers it, moves its restrictions onto the inventory item, and re-attaches it after RestrainedLoveReattachDelay seconds (default 15 in Marine's viewer). The restrictions are then moved back onto the reattached object.

@detach:<attachpt>=n (lock a point)

No object currently on the point, or attached there later, can be detached by the user. The in-world "Attach To" pie menu refuses that point.

Force forms

Force detaching respects every lock: a locked object, a locked point, a locked folder, or a nostrip item stays put. @detach=force with no option goes through every attachment point and detaches whatever is detachable. It doesn't touch clothing; use @remoutfit for that.

With a folder, only the items directly in that folder are removed (objects, clothing, active gestures deactivated, and EEP settings items reset to region environment unless @setenv is active). Single no-modify objects in subfolders whose name contains an attachment point are also removed. Items directly inside #RLV itself are never touched. Use @detachall to include subfolders.

Caveats

Examples

// Lock this collar on
llOwnerSay("@detach=n");

// Keep whatever is on the left hand there
llOwnerSay("@detach:left hand=n");

// Strip everything from the "Restraints/Cuffs" outfit folder
llOwnerSay("@detach:Restraints/Cuffs=force");

// Remove one worn object by key (e.g. found via a sensor on attachments)
llOwnerSay("@detach:" + (string)target + "=force");

See also

Implementation notes

Client differences

Comparison with RLVa

This command works differently from RLVa's @detach; see the comparison.