playMaker

Author Topic: From p19 to p21: Audio Play bug  (Read 907 times)

Broken Stylus

  • Beta Group
  • Hero Member
  • *
  • Posts: 773
From p19 to p21: Audio Play bug
« on: January 05, 2021, 04:49:42 AM »
I'm finding the action Audio Play has now some odd behaviour.
I think there's a problem with this action, the flow doesn't exit the state until the sound is finished playing.
I replaced the new version with the p19 one from an archive and it's working normally.

In public override void OnEnter();

Code: [Select]
if (audioClip == null)
{
audio.Play();

if (!volume.IsNone)
{
audio.volume = volume.Value;
}
                if (WaitForEndOfClip.Value == false)
                {
                       Fsm.Event(finishedEvent);
                       Finish();
                }

                return;
}

This bit is missing in the new version and it might be the reason why the action acts weirdly:

Code: [Select]
if (WaitForEndOfClip.Value == false)
         {
                Fsm.Event(finishedEvent);
                Finish();
         }

I'm not using clips but pointing to a GO that has a sound setup with the mixer controlling it.
Logically, the clip (direct ref to an asset in Assets) shouldn't be relevant but it seem to have an effect nonetheless.

Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 4003
  • Official Playmaker Support
    • LinkedIn
Re: From p19 to p21: Audio Play bug
« Reply #1 on: January 29, 2021, 12:37:36 PM »
Is this working as expected in 1.9.1.p2?