Copyright © 2025-2026 Candy ArtsPlaying Media
A Media_Play command plays a file on one or more media players. The player's type decides the kind of media: an audio player plays a sound, a video player a video, and an image player displays a still image or a frame animation.
The Line lists its players under Players, each with its own settings, and starts them all at the same time. For example, a Line with two players, Music, with File set to Theme and Loops to -1, and Sound, with File set to Bell, starts the theme on a loop and rings the bell once. A player that can't be found is reported and skipped, and the others play. Every key is described in Media Play.
By default, the Dialogue continues as soon as the players have started. To wait for a playback, see Waiting.
The File
File names a file in the player's folder: Candy_DE/Media/General/Audio/{player}, Videos/{player} or Images/{player}. A name written without an extension receives the player's default extension (.ogg, .ogv or .png by default). A file that doesn't exist, or an empty File, plays the folder's file named Default instead, if there is one.
On an image player, a folder name plays a frame animation: the folder's images, in the order of their numbers. Sprite sheets and the other kinds of animated files are described in Media Files.
A res:// or user:// path plays that file, with no Default fallback: a file outside the project's media folders, or outside the exported game, for a mod or a patch. A ¢ expression can also return a loaded resource.
Loops and Duration
Loops sets how many times the media plays, and Duration how long it continues after those loops, so that playback can stop partway through a loop. The media plays for Loops times its length, plus the Duration:
| Loops | Duration | A 2-second clip plays... |
| Empty or 1 | Empty | Once: 2 seconds. |
| 3 | Empty | Three times: 6 seconds. |
| 1 | 0.5 | 2.5 seconds. |
| 0 | 5 | 5 seconds: a duration longer than the clip continues into further loops. |
| -1 | Any | Until it is stopped. |
| 0 | Empty | Not at all: the first frame is displayed until a Media_Resume plays the clip once. Audio plays nothing. |
- Clear (the default): the file is unloaded, and a video or image player is hidden.
- 0: the player stops on the frame it ends on, and a video or image remains on screen.
- -1 or a frame number: the player stops on the last frame, or on that frame, counted from 1.