attach
Jump to navigation
Jump to search
The attach
script command is used to link the position and rotation of an entity to another entity. If the target entity is moved, rotated or animated than the attached source entity will automatically move and rotate with it so that the specified source and target vertices on the two entities share the same position. This attachment is automatically done for equipped items but can also be done for other entities using this command. When the target is the calling entity and the two vertex names are the same then the shorter linkobjtome
command can be used. To break the attachment use the detach
command.
Usage
attach <source> <sourcevertex> <target> <targetvertex>
Context: For self
Parameters:
Parameter | Type | Description |
---|---|---|
source |
entity |
The entity to attach |
sourcevertex |
string |
Name of the vertex in the source entity to make the attachment relative to |
target |
entity |
The entity that the positioning should be relative to |
targetvertex |
string |
Name of the vertex in the target entities to make the attachment relative to |