|
Post by philflip on Jul 23, 2014 17:17:51 GMT
Hi there, i've encountered a couple issues so far playing around with Master Audio that I was hoping to fix in the next day or so, these could be easy fixes with myself not being used to MA or coding.
These are both in reference to Footsteps: 1) I am wanting to create footsteps attached to the unity first person controller so that footsteps are triggered when the keys a/w/s/d for movement are in use and stop when they are not pressed. I have 4 varying footsteps added to a group that randomise both in terms of which sample is played and in pitch but the way that I am adding them to the fp controller seems to only play once as the game plays or will play on a continuous loop. Can someone please help.
2) My second problem is that I have footsteps for grass/concrete etc setup as different groups and would like for the change in location to change footstep sound as you walk over the different terrains and how would these be triggered, i understand that this may work similarly to the way that I have used music and colliders so that each room changes music?
Thanks for your help, as I say, these could be simple fixes but my head can never seem to get around the coding way of thinking.
|
|
|
Post by DarkTonic Dev on Jul 23, 2014 22:37:01 GMT
#1, how have you set up the code / configuration that triggers the sounds? They won't loop unless you tell them to loop. They won't only play once unless your code / configuration tells limits them to 1 voice. Maybe you have the "weight" property set to the default of 1, which means that only 1 can play at a time? You can also turn on "Log All Sounds" in the Advanced settings to see what is stopping them from play (there are several limiting controls you may be using without knowing it).
#2, you'd probably need to use code to track what layer or tag your player is touching, then play the appropriate sound group or variation for that substance. There's no non-coding way I can think of to tackle that one.
|
|
|
Post by philflip on Jul 23, 2014 23:03:28 GMT
Thank you for the quick reply.
I haven't set up any code..... which is where i am most likely going wrong, as i said before, my coding knowledge is pretty much zero to none! i basically followed the short getting started youtube tutoiral of MA,
added 4 footsteps files as a group, variation sequence = randomized then added event sounds component to the first person controller - attached to caller - then under the 'start' trigger i have action type - play sound, all sound groups - footsteps, variation mode - play at random.
i realise this does not assign any keys to enable and disable but i guess i naively thought that when the attached to the first person controller that the audio would start upon the controllers movement.
sorry if this is all totally simple stuff that i am missing, as i say, i'm used to the audio side of things but never had experience programming and have been trying to learn unity. Thanks
|
|
|
Post by DarkTonic Dev on Jul 24, 2014 0:22:37 GMT
Ok, yeah I understand where you're at now. You'll need to create a simple script to read the keys pressed and play some SoundGroups. I believe it would just be a few lines. You can ask for some help about that on the Unity scripting forum (or find several examples already). As far as the Master Audio part, I'll help with any scripting needed as you need it.
I got started myself by following a "build your own 2d shooter" tutorial that was superb and entertaining.
Thank you.
|
|
|
Post by philflip on Jul 24, 2014 8:30:48 GMT
Excellent, thanks for the reply, will have a look over simple scripts just now and make some attempts!
|
|
|
Post by DarkTonic Dev on Jul 24, 2014 8:34:01 GMT
That's the way to learn, good luck!
|
|