Music

Category: Music
Since engine version: 4.6.5.0 CP (extended in 4.9.1.0 GWE)

Description

Plays a music track. The corresponding music file must be available in the active music group. If the loaded scenario contains music files, the scenario file will be the music group. Otherwise, the global file Music.c4g will be used. A successful call to this function will activate music playback, even if it was turned off in the options.

Syntax

void Music (string szSongName, bool fLoop);

Parameters

szSongName:
[opt] Filename of the music track. The file extension must be specified. If unspecified or 0, music playback will be deactivated (even it was activated in the options).
fLoop:
[opt] If 1, the specified track will be looped forever.
See also: MusicLevel, SetPlayList, Sound
jwk, August 2002