Why isn't the music playing?

Started by Capricho, Mon 02/06/2025 22:20:21

Previous topic - Next topic

Capricho

Why is the background music not playing in my game?
Please help me so I can move forward.
Thank you
Code: ags
function room_AfterFadeIn()
{
  aMusic.Play(eAudioPriorityVeryHigh, eRepeat); 
}

Crimson Wizard

In the situation like this the first thing that you should check is whether the function "room_AfterFadeIn" is run at all. Place a simple display command there:

Code: ags
function room_AfterFadeIn()
{
  Display("Play music!");
  aMusic.Play(eAudioPriorityVeryHigh, eRepeat); 
}

If you won't see the message either, that means that your function is not connected to the room event.
https://adventuregamestudio.github.io/ags-manual/images/acintro3_05.png

Capricho

yes, that was the mistake.
The music is already playing  ;-D
Thank you
Beginnings are hard

SMF spam blocked by CleanTalk