0
0

Hi there,
I tried to use musicsystem in my game lately . I found that all of
Cues and Parameters in musicsystem said to be triggered or set value of by id.
Is there another way to handle those objects more regularly , just like fmod doing in eventsystem–get the event by path&name and return an object iterator?
My API version is 4.30.02.
Thanks a lot。

  • You must to post comments
0
0

This was resolved via email, just responding here for the benefit of others reading this thread:

You can get cues by name using MusicSystem::getCues(). Here’s an example:

[code:899qmm3w]FMOD_MUSIC_ITERATOR iter;
ERRCHECK(musicSystem->getCues(&iter, "cue name"));

if (iter.value) // iter.value will be null if the cue was not found
{
ERRCHECK(musicSystem->promptCue(iter.value->id));
} [/code:899qmm3w]

MusicSystem::getCues() matches the whole cue name. For example, if you have a cue called "Action" and you search for "A", it will return null.

You can also iterate through all cues in the system by passing NULL as the filter parameter of getCues and calling MusicSystem::getNextCue repeatedly.

You can do the same for parameters using MusicSystem::getParameters().

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.