Not sure if this is doable (I haven’t seen any sound fx tutorials mention it, but I could be searching for the wrong terms). I’m using the equivalent of a ‘mana bar’ in a third person player rpg game for energy weapon types (it will be slightly different based on the player class). The player has to use the weapon by the time the energy bar reaches 100% or it overloads and causes damage to the player.
The bar starts with 1 point and gradually increases by 1 point every half minute up to 100 points (or a specified max), or you can use items to speed it up. The idea is to use the weapon while the energy level is as high as possible, but not going past that point and putting the player at risk. I want a sound to play when the bar passes 60% full, 80%, 90%, 95% and 99% (for example), as a sort of auditory warning system. The sounds are 1-3 seconds long and increase in intensity.
To make it a bit more complicated, there are a different set of sounds depending on the player’s class, as the weapon is different per class. So when the bar updates, I need it to check if it’s gone over one of the intervals (i.e. 60%), then check for which of the 6 classes the player is assigned to, then find and play the 60% sound for that class.
I’ve got the energy bar itself working and updating correctly on a timer. But I’m not sure how / where to incorporate the sounds? I’m guessing it will be like a low health warning that some games have, except run backwards (as the trigger is going over a set %). But so far I haven’t found any tutorials showing anything like the above that I can repurpose.