I posted
my solution to pastebin.
The idea is that you execute a recursive script on an area in which you want to cycle through musical tracks.
The area should not have any battle music which could disrupt the background music.
The area also should track whether pcs are present. In on enter I increase th PC count, and on exit I decrement the exit count.
Each track ID and length in seconds are set as INTs on the area.
SONG_ID_01 = song index in ambientmusic.2da for Track 1
SONG_LENGTH_01 = length in senconds that Track 1 will play
SONG_ID_02 .... etc....
aa_ex_music is executed in onAreaEnter.
See
aa_ex_music for details of how it works.
[Edit: already found a bug and fixed it. When PCs leave... all music stops and track 1 is set as the first music to play]
Modifié par henesua, 13 février 2012 - 11:33 .