Script:attach: Difference between revisions
Jump to navigation
Jump to search
(Created page with "{{ScriptCommandPage |description=link the position and rotation of an entity to another entity |context=self |parameters= 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 |intro=If the target entity is moved, rotated or animated...") |
mNo edit summary |
||
Line 9: | Line 9: | ||
|intro=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. To break the attachment use the {{Command|detach}} command. | |intro=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. To break the attachment use the {{Command|detach}} command. | ||
}} | }} | ||
[[Category:Script commands linking entities]] |
Revision as of 13:02, 19 June 2022
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. 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 |