playMaker

Author Topic: Audio for playmaker  (Read 2972 times)

dshad44

  • Junior Playmaker
  • **
  • Posts: 55
    • View Profile
Audio for playmaker
« on: August 16, 2017, 01:01:39 PM »
Hey guys and gals.

I see that audio source allows me to add sound effects and music to the game in unity, but can I use Playmaker to trigger the sound effects? Is it as simple as setting up FSM's on a "Sound Manager" and have it play the sounds when the user clicks on objects in the scene, etc?

I cant find any tutorials on sound for Playmaker, they all seem to be scripting oriented.

Thanks in advance!

nFighter

  • Beta Group
  • Full Member
  • *
  • Posts: 144
    • View Profile
    • multiplayer adult fighting
Re: Audio for playmaker
« Reply #1 on: August 16, 2017, 03:50:51 PM »
Sure, playing sound is very easy. Simple "play sound" action can play defined file at defined point. I set position equal to my camera to be sure it will be loud enough to hear it. And don't hesitate to check the actions in the audio group, there is a lot of them.
indie developer of multiplayer adult fighting
http://nakedfighter3d.com

dshad44

  • Junior Playmaker
  • **
  • Posts: 55
    • View Profile
Re: Audio for playmaker
« Reply #2 on: August 16, 2017, 05:32:44 PM »
Great! Thanks so much! I'll take a look at those.

dshad44

  • Junior Playmaker
  • **
  • Posts: 55
    • View Profile
Re: Audio for playmaker
« Reply #3 on: August 16, 2017, 06:40:48 PM »
Well, the issue that I get when I use Play Sound is that it sounds very quiet, and I don't have much control over the volume, or anything else.

I don't see many options for playing sounds in the audio actions either. Is there a way to send event from one 'clicked' object to a sound master that will then play the audio? Is that how people deal with sound effects for user interactions?

Thanks again!

tcmeric

  • Beta Group
  • Hero Member
  • *
  • Posts: 746
    • View Profile
Re: Audio for playmaker
« Reply #4 on: August 16, 2017, 08:43:26 PM »
Try "Audio Play" instead of "play sound". If you use audio play, you can add a sound source component to the game object. Then you can control everything by this audio component (3d/2d, volume and which mixer to use).

Play sound is good for a simple setup that doesnt need many changes, but if you need a mixer or any changes, then audio play is recommended.

dshad44

  • Junior Playmaker
  • **
  • Posts: 55
    • View Profile
Re: Audio for playmaker
« Reply #5 on: August 17, 2017, 06:05:07 PM »
Great! Thanks so much! Using audio play has fixed my issue!

Now my question is, "play random sound" seems to only work similarly to "play sound".

Is there a way to integrate playing random sound clips with the audio play option? It seems that I have to specify a clip I want to play, but there is no randomizing it.

tcmeric

  • Beta Group
  • Hero Member
  • *
  • Posts: 746
    • View Profile
Re: Audio for playmaker
« Reply #6 on: August 17, 2017, 08:03:02 PM »
Yes. I wrote a custom action for that (based on someone elses custom action). I just wrote it this last week for myself :)

It will select a random audio clip (works like audio play), and then it plays the clip. Give it a try.

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 4792
    • View Profile
    • jinxtergames
Re: Audio for playmaker
« Reply #7 on: August 17, 2017, 09:55:45 PM »
Hi,
if your are planning a "sound Manager" you should look to this tutorial about global events/Transitions :


dshad44

  • Junior Playmaker
  • **
  • Posts: 55
    • View Profile
Re: Audio for playmaker
« Reply #8 on: August 18, 2017, 04:52:25 PM »
Great! I'll take a look at both! Thanks so much!