Here's the current code :
Code: Select all
:i function $SkipMusicTrack$ // Function used at startup of a level
:i call $GetRandomValue$ arguments
$name$ = $track_number$$a$ = %i(0,00000000)$b$ = %i(52,00000034)$integer$
:i $PlayTrack$%GLOBAL%$track_number$
:i endfunction
:i function $skip_track$ // Function used in options menu to skip manually
:i call $GetRandomValue$ arguments
$name$ = $track_numberx$$a$ = %i(0,00000000)$b$ = %i(52,00000034)$integer$
:i $PlayTrack$%GLOBAL%$track_numberx$
:i endfunction
:i function $skiptrack$ // Useless
:i $track_numberxx$ = %i(5,00000005)$integer$
:i $PlayTrack$%GLOBAL%$track_numberxx$
:i endfunction
Level loaded => Random PlayTrack (good) => Stream of the track finished => PlayTrack automatically call the next song from the original random order wihout using the custom "skip_track" or "SkipMusicTrack" function (BAD). This thing also happen in "Preview track" when this is finished.
This is out of my control.
Solutions:
- Rewrite PlayTrack to avoid the loading of a bad track after (didn't found concrete code example for playing a bik)
- Having the name of the possible function that PlayTrack use at the end of the stream to overwrite it.
- Setting an event at the end of PlayTrack or detecting when the stream is ended, don't know how the game handle that at all
- Randomizing multiple time the seed but don't know what variable handle it
Thanks, this is the last step missing.