Forum rules - please read before posting.

Adding SFX sounds correctly

Im having a bit of trouble understanding the correct way to add a sound so hat it is both a 3D sound, placed IN the scene at a location, and be available as a proper SFX sound that can be adjusted in OPTIONS.
For example:

I have an old lady in a rocking chair. The chair has a rocking animation on it. The animation clip has 2 animation events on it. at the start of the animation clip, the even says START SOUND, and (via PlayMaker) the sound is triggered. On the last frame of the animation there is an animation even called STOP SOUND. which (via PlayMaker) stops the sound. 
Even though the sound clip is the correct length for the rocking animation, if I didnt do this, the audio would soon go out of synch with the animation...
The PlayMaker action requires that the object that the action is attatched to (the rocking chair)has the audio compnent, but doesnt need to be "filled in". 
I tried simply adding the AC Sound Script to this, and setting to SFX. However, its not being affected by the OPTIONS SFX volume slider.

Does a sound HAVE to be created via the Sound Button and placed in the _sound folder?

How SHOULD I set this up?

Mark

Comments

  • It's not the location of the Sound, but the way you play and stop it.  Rather than having PlayMaker control the AudioSource, have it instead call Cutscenes that start and stop the sound using Sound: Play.
  • When you say IT... you mean what? What should call a cutscene? The Animation Event?

    I think I have been using PlayMaker too long, and am very used to PM´s way of just dumping a FSM on any object. I enjoyed this way just because I never have to LOOK for what is doing something, just click the object in question and there it is. AC seems more like how a programmer would do things with separate scripts, sure, but with a more centralised MASTER script-... 

    Up to now I have only been using cutscenes for.. well cutscenes! What you are saying is to use them a bit how I used a FSM. OK I can go with that, so whats the right way of calling" a cutscene, from an object that exists the whole time (Not actually true, I have a sort of "brute force" LOD that unloads masses of things as my character walks away (also PlayMaker..) I would do that in AC too, but I haven't found the equivalent of disabling or enabling a Game Object.
    You have Add and Remove, but that's instantiating from a prefab, I have difficultly placing those where I want them (at least in comparison to simply enabling a disabled Game Object. OR you have Visability, but as far as I know, thats just the Mesh Renderer, and leaves the colliders there...

    I may be wrong however...
  • By "it", I meant the PlayMaker FSM.  Please keep the thread on topic: disabling gameobjects.

    A Cutscene just runs Actions - regardless of it's name.  If you set its When running setting to Run In Background, then it'll do just that - and perform its functions during gameplay.  Any ActionList can be triggered through script / event call by running it's Interact function.

    But the point of running the Sound: Play Action was just that, for the AC Sound script to work, you must call the component's own Play and Stop sounds, rather than those in the AudioSource component.  The Action does this for you, but you can bypass it if the PlayMaker FSM can call these events itself.
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.