Script:attach: Difference between revisions

From Arx Libertatis Wiki
Jump to navigation Jump to search
mNo edit summary
mNo edit summary
 
Line 7: Line 7:
target entity The entity that the positioning should be 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
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 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. When the target is the calling entity and the two vertex names are the same then the shorter {{Command|linkobjtome}} command can be used. To break the attachment use the {{Command|detach}} command.
}}
}}


[[Category:Script commands linking entities]]
[[Category:Script commands linking entities]]

Latest revision as of 20:59, 23 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. 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:

ParameterTypeDescription
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