1

(2 replies, posted in UFE 1 (Deprecated))

YumChaGames wrote:

You probably don't want to have Sound Effects and Music on the same source.  You have far less control over either of them that way.  I would still keep them separate, but just make both Output to the same mixer group instead.

You might need Source version, which I assume you have if you've been able to put sound and music onto the same audio source.  I've tried to find scripting references for using Audio Mixers, but I'm not having much luck.  It is on the cards for one of my projects, so I'll return here with my findings once I get up to it.

The best I could manage (I hate how I've done it but it works until I can figure out a better solution) was to create new public AudioMixerGroup variables, attach the group I wanted in the inspector, add new public static variables, assign them in awake, and set the musicAudioSource and soundsAudioSource outputAudioMixerGroup to those public variables.

It's not how I planned on doing it at all but I was struggling using a separate class and getting errors to do with static variables and such so I ended up doing it all in the UFE class.  Horrible implementation, but it works.

2

(7 replies, posted in Tips & Articles)

shubi wrote:
Kandy_Man wrote:

This works really well thanks.  However when the round is over the CPU will still beat on the opponent for a short while which causes multiple "KO" sounds being played.  Is there a way to make the winner unable to input anything as soon as the KO flag is true?

To solve that problem, I changed the code a little bit. The KO-flag variable has now three different states:

The flag will be set to "1" after the first K.O.-hit and the K.O.-sound will be played. After that, the flag will be set to "2", so it's not possible to play a K.O.-sound again, as long as the flag isn't set to "0".
Don't forget to set the flag to "0" at the beginning of each round.

Thanks for the reply.  I  managed to fix it by locking input and movement in the same section that sets the flag back to false.  I can't figure out how to change how soon the Perfect/Winner alert appears or I'd just shorten that to lock it all.  I'll remember your method though as I can imagine we might want input and movement to still be checked if someone is in the middle of a combo or something.

3

(2 replies, posted in UFE 1 (Deprecated))

I couldn't find anything mentioning this when searching so sorry if it's been mentioned before.

I'm trying to manipulate music and sound effects separately.  I can see the music goes to the audio source on the main camera, and the sound effects have a new audio source created on the camera.  I've adjusted this so the sound effects go to the same audio source as the music, but is there a way to have the sound effects go to its own mixer group so I can mix it differently with effects?

Thanks to anyone who can help.

4

(7 replies, posted in Tips & Articles)

This works really well thanks.  However when the round is over the CPU will still beat on the opponent for a short while which causes multiple "KO" sounds being played.  Is there a way to make the winner unable to input anything as soon as the KO flag is true?