I'm doing a project for university looking at audio design for games and I'm using Cube as the game and Audiokinetic's Wwise and the audio engine.
For the most part I can go into the source, modify the code to trigger Wwise sound events for things like weapons and footsteps etc, but I'm struggling getting an interactive music system going.
I have an event in Wwise that contains ambient, tension and action music sequences and there is a game switch to change between them.
What I want to do is have it so ambient is default but if the player is within X distance of a monster the switch is set to tension and if the monster has seen the player the switch is set to action.
I have been following this tutorial which works fine with just one monster but it fails in a single player or deathmatch map with many monsters.
I think its because its checking the distance to the player for every enemy every frame.
http://www.gatheral.co.uk/tutorials/wwise/index.php?/archives/3-Music-Transitions.html
Anyone have an idea on how this can be achieved in Cube?