Skip to reading
GDScript Programming & Godot

PlayGUIModelAnimation()

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

Play GUI Model Animation

Play a named animation in a GUI model viewer, with loop and speed controls.

Source table from PlayGUIModelAnimation(), page 188
Option key / fieldMeaning and inputDefault
GUI guiIdChoose an authored GUI ID.Blank
3D Model elementIdChoose an element inside the selected GUI.Blank
Animation animationText.Blank
Loop loopOn/off.true
Speed speedPlayback speed multiplier; 1 is normal speed.1.0

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

Code example
await PlayGUIModelAnimation({"guiId": "hud", "elementId": "topline", "animation": ""})

In use. Play an idle loop in a character inspection window. Match the imported animation name. A model with no animation clips cannot gain one just by entering a name here.

Page 188 of 378Permalink
Go to page