Skip to reading
GDScript Programming & Godot

FadeScreen()

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

Screen Fade

Fade a color over the screen, or fade that cover away, over a duration.

Source table from FadeScreen(), page 143
Option key / fieldMeaning and inputDefault
Direction directionChoose: out, in."out"
Color colorColor picker or color string."#000000"
Duration (seconds) durationTime in seconds for this action. Read its timing note before assuming it waits. Range: 0.0 to 60.0.0.5

Timing. Waits for the fade routine.

Code example
await FadeScreen({"direction": "out", "color": "#000000", "duration": 1})

In use. Fade Out to black, make the intended change, then Fade In. An Out fade leaves the cover in place; remember the In step. Use Change Scene's transition controls for a normal room change when they fit the job.

Page 143 of 378Permalink
Go to page