Skip to main content

entity.attach_prop

Overview

  • Spawn an object or vehicle and attach it to a character bone. action=list_sockets [filter=]: list mesh sockets. action=attach object_id=<DT_ID> [type=object|vehicle] [bone=]: spawn and attach (default bone: pelvis). type=object (default): uses Object data table. type=vehicle: uses Vehicle data table. action=list: show attached props with index, type, and transform. action=set_transform prop_index= [x y z] [rx ry rz] [sx sy sz]: adjust relative transform. action=detach [prop_index=]: remove one or all props. Collision and physics are disabled on the prop automatically.

Metadata

FieldValue
DisplayAttach Prop to Character Bone
Categoryentity
AccessUserCheat
ScopeB1Multicast
Tags
AliasesEntityAttachProp

Parameters

NameTypeRequiredDefaultDescription
entity_identityIdnoTarget character (default: possessed)
actionstringnolistlist (default), list_sockets, attach, set_transform, detach
object_idnamenoData table row ID to spawn (required for attach)
typestringnoobjectProp source table: object (default) or vehicle
bonestringnoBone or socket name (default: pelvis)
filterstringnoSocket name filter for list_sockets
prop_indexintnoIndex of attached prop (for set_transform/detach)
xfloatnoRelative X offset (cm)
yfloatnoRelative Y offset (cm)
zfloatnoRelative Z offset (cm)
rxfloatnoRelative Pitch (degrees)
ryfloatnoRelative Yaw (degrees)
rzfloatnoRelative Roll (degrees)
sxfloatnoRelative scale X (also sets Y/Z if sy/sz omitted)
syfloatnoRelative scale Y
szfloatnoRelative scale Z

Returns

  • Return shape is not declared for this command.

Usage

await inzoi.cli.execute('entity.attach_prop', {
entity_id: 0, // optional
action: 'list', // optional
object_id: '', // optional
type: 'object', // optional
bone: '', // optional
filter: '', // optional
prop_index: 0, // optional
x: 0.0, // optional
y: 0.0, // optional
z: 0.0, // optional
rx: 0.0, // optional
ry: 0.0, // optional
rz: 0.0, // optional
sx: 0.0, // optional
sy: 0.0, // optional
sz: 0.0, // optional
});