Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: Hugo111 on October 23, 2017, 02:27:49 PM

Title: Sounds not stopping after destroying character action /fsm [SOLVED]
Post by: Hugo111 on October 23, 2017, 02:27:49 PM
So I have an character talking in a play sound action, which I need to stop after the action has already stated, ive tried destroying it deactivating it etc  does anyone know a way to silence this ? Thanks
Title: Re: Sounds not stopping after destroying character action /fsm
Post by: MajorIdea on October 23, 2017, 03:04:41 PM
I think the "Audio Stop" action should work.
Destroying the FSM wouldn't stop it - it tells the Audio Source component of the Game Object what to do so if you tell it to play sound and then kill the messenger (so to speak) it still got the message.
Title: Re: Sounds not stopping after destroying character action /fsm
Post by: Hugo111 on October 24, 2017, 05:36:07 AM
Hi. That seems to work after trying a few combos out, it only seem to work on an audio play advanced with and audio sauce, but not on a play sound. But does work so thanks ! The other sound problem I have is moving sounds, if for instance my character is on a moving train and I "play sound" action and have the position on an object the is traveling with me but it fades off into the distance, is there a way of having play sound travel with the object ? Thanks   
Title: Re: Sounds not stopping after destroying character action /fsm
Post by: djaydino on October 24, 2017, 04:22:51 PM
Hi,
You should avoid using play sound unless its a 1 time use.
play sound makes a game object with a audio source and destroys it when done.


Place an audio source on the moving object and set spatial blend to 3d
Title: Re: Sounds not stopping after destroying character action /fsm
Post by: Hugo111 on October 26, 2017, 10:33:02 AM
Thanks that seem to have done the trick !!