attach

Overview

Can be used to place inventory items (weapons, fast drops) in an NPC's inventory by setting "Bone" to empty. 

Inputs

activateAttach the object.

Outputs

finishFires an event when the attachment is complete.

Refs

targetThe object you want to attach.
owner

The object to attach to. You can use only dynamic objects that have at least one bone (for example, you can't use objects static prop).

Properties

Preview
ModelLets you select a model you wish to attach. 
Bone

After setting the owner for this property, you can see all available bones and locators in the object and select one.

Offset

In this property, you can customize the offset of the object relative to the bone, to which you have attached the object. 

PositionThe object's position after attaching.
RotationThe object's rotation after attaching.

Attach type
  • Auto Attach  if enabled, the object will attach with an offset relative to the current position. The Property Offset is ignored.

  • Offset  used to specify the target's relative offset.
  • Weapon Trade Offset  works only if the target is a weapon. A weapon trade attachment offset is used (which is defined in weapon config with these fields: 'trade_offset_position', 'trade_offset_rotation'). The Property Offset is ignored.
Auto ScaleIf enabled, applies the owner's scale on top of the target's scale.
Center Bounding Box (for weapon)

The visual center of the weapon (the center of an encompassed box) is used to attach, instead of x-form (posrot). If Center Bounding Box and Auto Scale are enabled simultaneously, Center Bounding Box has higher priority than Auto Scale.

Usage examples

In this example, a cloned NPC will go to an elevator and attach to it. Then the elevator will move to its destination.

Shortcuts

  • N/A

See also


On this page:


Exodus SDK © 2005-2023, 4A Games Limited. Developed by 4A Games®.
4A Games® is a registered trademark, and 4A Games Limited, Exodus SDK and their respective logos are trademarks of 4A Games Limited.
Published by Deep Silver. Deep Silver is a division of PLAION GmbH, Austria. Deep Silver and Plaion are registered trademarks of PLAION GmbH.
Metro Exodus is inspired by the internationally best-selling novels METRO 2033 and METRO 2034 by Dmitry Glukhovsky.
All other trademarks, logos and copyrights are property of their respective owners. All rights reserved.
By using this site, downloading or using the Exodus SDK or related content, you are agreeing to be bound by the terms of the End User License Agreement.


EULA