audio_group_name

This function returns a string containing the name of the given audio group for displaying or checking.

When you define an audio group in the Audio Groups window, you give it a unique name which GameMaker turns into a constant to use as an ID value for the group. This function takes this ID and returns a string of the ID name you gave.

NOTE The default audio group is audiogroup_default.

 

Syntax:

audio_group_name(groupID);

ArgumentTypeDescription
groupIDAudio Group IDThe index value constant of the audio group to check (as defined in the Audio Groups Window)

 

Returns:

String

 

Example:

var _name = audio_group_name(audiogroup_level1);
draw_text(32, 32, "Now Playing Group: " + _name);

The above code retrieves the name of the given audio group constant and displays it on the screen.