Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: desktopdaydreams on April 03, 2014, 05:36:15 AM

Title: Fade an audio Source to a specific voulme over time
Post by: desktopdaydreams on April 03, 2014, 05:36:15 AM
Hey Folks,

I've been hunting around the forums for a solution to this but can not seem to find a definitive answer.

What we're hoping to do is control the volume of an audio source over x seconds.

An an example, a player camera fades in over time and we want to bring up an audio sources volume form 0 to say 0.5 over 0.5 of a second.

Has anyone come up with a solution to this or will we need to write something custom to handle it?

Thanks for taking the time to read and great work on Playmaker! :)

Best,
Tim

Title: Re: Fade an audio Source to a specific voulme over time
Post by: jeanfabre on April 03, 2014, 08:17:58 AM
Hi,

 there is a "set audio volume" action, is that not doing the trick? Animate a float from 0.5 to 0 and inject that animated float in this volume action.

bye,

 Jean
Title: Re: Fade an audio Source to a specific voulme over time
Post by: desktopdaydreams on April 03, 2014, 08:42:02 AM
Hi Jean!

Many thanks for the reply. We actually ended writing a small action to handle it. It basically just tweens the volume from one value to another over time.

Thanks for the prompt reply though  ;)
Title: Re: Fade an audio Source to a specific voulme over time
Post by: jeanfabre on April 04, 2014, 06:43:47 AM
Hi

Good. Don't hesitate to share the actions on the forum, I am sure a lot of people will make use of that.

 Bye,

 Jean
Title: Re: Fade an audio Source to a specific voulme over time
Post by: wheretheidivides on May 24, 2014, 01:20:02 AM
Jean, I was trying this today and I can't seem to get this to work.  I understand the principle, but now how to do it.  Could you give a little more detain in the instructions of how to do this?  Thanks.
Title: Re: Fade an audio Source to a specific voulme over time
Post by: jeanfabre on June 10, 2014, 04:50:52 AM
Hi,

 Use an animation curve to define your volume curve, and then inject the value from that curve into the volume property.

 Have you tried that?

else, do a float tweening if you don't want an animation curve.

Also, I create last week two actions, audio fade in and audio fade out, that you can get on the ecosystem browser:

http://feeds.feedburner.com/PlaymakerEcosystem

http://hutonggames.com/playmakerforum/index.php?topic=7414.msg36268#msg36268


bye,

 Jean