playMaker

Author Topic: iTween and audio play... need help! [SOLVED]  (Read 3010 times)

montmars

  • Playmaker Newbie
  • *
  • Posts: 9
iTween and audio play... need help! [SOLVED]
« on: May 14, 2016, 09:27:13 AM »
Hello,
I'll just go straight to the problem.  I've setup a cube with a collider that when trigger on enter it plays an audio song.  Now, when I leave the cube (on trigger exit) I want the song audio file to stop playing. 

But the situation is that the FSM waits for the song to be over to go into my exit stage.  How to make it cut the song short, or fade out then stop?

I've tried to simply put audio stop in my exit state but like I said, it doesn't get to the state because the audio file is not done playing.

Thanks guys! (and gals)
« Last Edit: May 14, 2016, 08:11:12 PM by montmars »

joduffy

  • Full Member
  • ***
  • Posts: 121
  • Here to help
    • Online Playmaker Courses
Re: iTween and audio play... need help!
« Reply #1 on: May 14, 2016, 05:06:05 PM »
Try iTween stop action.

In theory that should work.
You can also assign a variable to the iTween action ID and use that in your iTween Stop.

Let me know if this works or not and I will take a closer look for you.
- Jonathan

Online Playmaker Courses available at:
http://courses.jonathanoduffy.com

“I want the world to be a better place because I was here.”  -  Will Smith

montmars

  • Playmaker Newbie
  • *
  • Posts: 9
Re: iTween and audio play... need help!
« Reply #2 on: May 14, 2016, 05:24:06 PM »
Would this help a little?  I don't think it worked.  Hmmm.... it's a hard one... like I said, i need a wait to interrupt the audio to let it know that i have left the collider... if i just play a 2 second sound, then the FSM runs properly. (I've checked)
I can take more screenshots if you need as well...

https://www.dropbox.com/s/sdbg29zsbxu2ffe/audioplay.jpg?dl=0

Thanks again for taking a look!


joduffy

  • Full Member
  • ***
  • Posts: 121
  • Here to help
    • Online Playmaker Courses
Re: iTween and audio play... need help!
« Reply #3 on: May 14, 2016, 07:38:31 PM »
Hi Dude,

Your screenshot helps a lot.
Try this FSM setup.

I tested it and it seems to work fine. If it doesn't work for you let me know and I will try and help you.
- Jonathan

Online Playmaker Courses available at:
http://courses.jonathanoduffy.com

“I want the world to be a better place because I was here.”  -  Will Smith

montmars

  • Playmaker Newbie
  • *
  • Posts: 9
Re: iTween and audio play... need help! [SOLVED]
« Reply #4 on: May 14, 2016, 08:10:56 PM »
Wow!
This works beautifully! Thank you so much! I also loved how you simplified my FSM. 
As you can see I am still new to Playmaker and am following the tutorial setups!
(which I think the tutorials are also great!) now to play around a little more and see if I can add a little fade out or something like that!

Thanks Again!!!
« Last Edit: May 14, 2016, 08:15:03 PM by montmars »

joduffy

  • Full Member
  • ***
  • Posts: 121
  • Here to help
    • Online Playmaker Courses
Re: iTween and audio play... need help! [SOLVED]
« Reply #5 on: May 14, 2016, 08:29:56 PM »
No worries dude.

Glad I could help  :)

If you want to get rid of the blue text in the playmaker editor window, just untick the hints box at the bottom.

Great to hear your playing around and exploring what can be done. All the best with it. If you need help, just shout out.
- Jonathan

Online Playmaker Courses available at:
http://courses.jonathanoduffy.com

“I want the world to be a better place because I was here.”  -  Will Smith