Community Q&A

Where Wwise users help each other out!

Audiokinetic's Community Q&A is the forum where Wwise users ask and answer questions within the Wwise community. If you would like to get an answer from Audiokinetic's Technical support team, make sure you use the Support Tickets page.

How to unlock songs in a playlist according to states?

0 votes
Hello,

I have a music playlist with several songs playing one after the other as background music. In the game, the player can unlock new songs that can be added to the initial playlist. How can I link these new songs to states in order to be played within the initial playlist? I thought about creating a new playlist, but how would the 2 playlists merge? I don't think that's the solution. But if I add new songs in a playlist that could be unlocked under specific conditions, how do I structure my system?

Thanks!
asked May 11 in General Discussion by Kim D. (100 points)

1 Answer

0 votes
One solution could be the use of a switch track containing your different playlist containers. In this case, you would sync each state with it's corresponding playlist; and with the transitions configuration, you'd select when and to which element in the new playlist the music should jump into.

Now, I don't know what is the order you intend for your playlist elements, but you should always be able to accomodate them using both transitions configuration and playlists' groups.

 

If this doen't fit your needs, please let me know and I'll look for another solution, but then I'll need a little bit more info,

Hope it works :)
answered May 20 by Juan Schweizer (600 points)
Hello! Thanks for your answer, sorry for the late reply! I jumped on something else, but now I'm back on this situation. I'm not sure to understand well the solution you're suggesting. Let's say I have a playlist containing songs 1,2,3,4,5 (random step) that are the initial songs playing in-game. Later on, the player succeeds in a quest and the song A is unlocked which is added to the initial playlist. What's playing now is 1,2,3,4,5,A (random step), but song A will not necessarily play next, it's only unlocked and will now be heard one time or another.

Could you please explain your solution with this situation? It would help me a lot! Thanks!
Great. So you have both playlists, right? Playlist "Alpha" containing songs 1-5, and playlist "Beta" containing songs 1-5 and song A. Both random step, as you pointed out.

Now, on the Game Syncs tab, under Switches, you should create a new Switch Group; let's call it "Level Stage". Within this switch group, create two switches: "Initial" and "Quest A completed" (I'm sure you will come up with better names depending on the whole level possibilities, and you could add all the extra switches you may need).
For these to work, you need to link them to the event you mentioned ("Quest A success"). Select that event from the Project Explorer, in the Event Editor, right-click and create a New Action > Set Switch; then right-click on the red box and Set Target > Quest A completed (you can also drag and drop the switch into the Event Editor view). Now when that event is triggered, the switch group will change from "initial" to "Quest A completed". You should make sure you set this group to "Initial" when the level starts using the corresponding event (it's the same process, but you add the action Set Switch "Initial" to the "Start Level X" event).

Now, back to our Project Explorer/Audio tab. You should create a new Music Switch Container, which will call "Level X Music", or whatever. Move both playlists, Alpha and Beta, inside Level X Music. From the Interactive Music layout, select Level X Music and link it to our Switch Group: "Level Stage". Drag playlist Alpha on top of "Initial" and Beta on top of "Quest A completed".
You can test it using the SoundCaster. Make sure to go to the Transitions tab within Level X Music, and define your transition rules.

If I was unclear, let me know and I'll try to add some images.

Good luck!
...