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_identityIdno—Target character (default: possessed)
actionstringnolistlist (default), list_sockets, attach, set_transform, detach
object_idnameno—Data table row ID to spawn (required for attach)
typestringnoobjectProp source table: object (default) or vehicle
bonestringno—Bone or socket name (default: pelvis)
filterstringno—Socket name filter for list_sockets
prop_indexintno—Index of attached prop (for set_transform/detach)
xfloatno—Relative X offset (cm)
yfloatno—Relative Y offset (cm)
zfloatno—Relative Z offset (cm)
rxfloatno—Relative Pitch (degrees)
ryfloatno—Relative Yaw (degrees)
rzfloatno—Relative Roll (degrees)
sxfloatno—Relative scale X (also sets Y/Z if sy/sz omitted)
syfloatno—Relative scale Y
szfloatno—Relative scale Z

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
});