Skip to reading
GDScript Programming & Godot

DetachObject()

Edition 0.86.4.1 HF1

0.86.4.1 Hotfix 1 edition. Earlier lessons and screenshots retain their original version context; revised references and supplements describe the newer behavior.

Download PDFView PDF page

Detach Object

Detach an object that was attached through the attachment system.

Source table from DetachObject(), page 172
Option key / fieldMeaning and inputDefault
Object entityIdChoose a scene entity ID.Blank

Timing. Waits for the runtime routine to return; no further completion wait is promised by this schema.

Code example
await DetachObject({"entityId": "archive_door"})

In use. Detach the lantern before placing it on the table, then position it as required. Detaching does not automatically give an inventory item back or select a new animation.

AttachParticleEffect()#

Attach Particle Effect

Attach an existing particle-effect entity to a target point with an optional offset.

Source table from DetachObject(), page 172
Option key / fieldMeaning and inputDefault
Particle Effect entityIdChoose a scene entity ID.Blank
Target Object targetIdChoose a scene entity ID.Blank
Target Attach Point targetPointName of the attach point on the target entity.Blank
Attachment Offset offsetAttachment offset as [X, Y, Z].[0, 0, 0]

Timing. Waits for the runtime routine to return; no further completion wait is promised by this schema.

Code example
await AttachParticleEffect({
    "entityId": "archive_door",
    "targetId": "archive_door",
    "targetPoint": ""
})

In use. Attach smoke to a pipe's smoke_outlet point. Select the scene's particle entity, not just an imported texture used by that emitter. Keep the offset in the intended attachment space.

Page 172 of 378Permalink
Go to page