Template:I Parentname: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
No edit summary
(better descriptions)
Line 1: Line 1:
{{ScrollBox|title=Parentname|
{{ScrollBox|title=Parentname|
; <code>SetParent <[[targetname]]></code>
; <code>SetParent <[[targetname]]></code>
: Changes the entity's parent in the [[movement hierarchy]].
: Move with this entity. See [[Entity Hierarchy (parenting)]].
; <code>SetParentAttachment <[[string]]></code>
; <code>SetParentAttachment <[[string]]></code>
: Change this entity to attach to a specific attachment point on its parent. Entities must be parented ''before'' being sent this input.
: Attach to a named [[$attachment|attachment]] on the current parent. The entity will teleport so that the position of its root [[bone]] matches that of the attachment.
; {{EP1 add|<code>SetParentAttachmentMaintainOffset <string></code>}}
; {{EP1 add|<code>SetParentAttachmentMaintainOffset <string></code>}}
: Change this entity to attach to a specific attachment point on it's parent. The entity will maintain it's position relative to the parent's [[origin]] and [[angles]] at the time it is attached. Entities must be parented ''before'' being sent this input.
: As above, but without teleporting. The entity retains its position relative to the attachment at the time of the input being received.
; <code>ClearParent</code>
; <code>ClearParent</code>
:Removes this entity from its current movement hierarchy.
:Removes this entity from its current movement hierarchy.
}}
}}

Revision as of 01:50, 20 July 2009

Parentname:
SetParent <targetname>
Move with this entity. See Entity Hierarchy (parenting).
SetParentAttachment <string>
Attach to a named attachment on the current parent. The entity will teleport so that the position of its root bone matches that of the attachment.
SetParentAttachmentMaintainOffset <string> (in all games since Half-Life 2: Episode One)
As above, but without teleporting. The entity retains its position relative to the attachment at the time of the input being received.
ClearParent
Removes this entity from its current movement hierarchy.