playMaker

Author Topic: Audio Toolkit Play  (Read 14727 times)

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Audio Toolkit Play
« on: September 03, 2012, 10:34:29 AM »
Hi,

 Just a simple action to play a audio item when using Audio Toolkit

http://u3d.as/content/clock-stone-software-gmb-h/audio-toolkit/2AG

I don't own a version, so it's blind coding, please let me know if that doesn't work out :)

Code: [Select]
// (c) Copyright HutongGames, LLC 2010-2012. All rights reserved.

using UnityEngine;

namespace HutongGames.PlayMaker.Actions
{
[ActionCategory("Audio toolkit")]
[Tooltip("Play an Audio item")]
public class AudioToolkitPlay : FsmStateAction
{
[RequiredField]
public FsmString reference;


public override void Reset()
{
reference = null;
}

public override void OnEnter()
{
AudioController.Play(reference.Value);
}

}
}

bye,

 Jean

TomEllard

  • Playmaker Newbie
  • *
  • Posts: 9
Re: Audio Toolkit Play
« Reply #1 on: September 08, 2012, 01:57:07 AM »
Thank you that works. Of course the moment you do this you are going to need to stop it again! Hacked your script:

Code: [Select]
// (c) Copyright HutongGames, LLC 2010-2012. All rights reserved.

using UnityEngine;

namespace HutongGames.PlayMaker.Actions
{
[ActionCategory("Audio toolkit")]
[Tooltip("Stop Playing an Audio item")]
public class AudioToolkitStop : FsmStateAction
{
[RequiredField]
public FsmString reference;


public override void Reset()
{
reference = null;
}

public override void OnEnter()
{
AudioController.Stop(reference.Value);
}

}
}

At some point we will need to be able to address a different Audio Controller, being a component on another object. So we'll need to add a way to select the object on which the component is attached. Cheers.

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Audio Toolkit Play
« Reply #2 on: September 10, 2012, 04:42:06 AM »
Hi,

 excellent, this is the spirit yes, simply hack other actions, If you have trouble making other actions let me know,

bye,

 Jean

PIXELCRY

  • Playmaker Newbie
  • *
  • Posts: 30
Re: Audio Toolkit Play
« Reply #3 on: November 30, 2012, 04:14:53 AM »
Hi, thanks for this it work well just the sound is not parented to the game object, so when game object move with 3d sound its not good.

i used this script:

Code: [Select]
using UnityEngine;
using System.Collections;

public class PlaySfxOnce : MonoBehaviour {


public string sfxID;
// Use this for initialization
void Start () {

}

// Update is called once per frame
void onCall () {
AudioController.Play( sfxID, transform );

}
}

can we change it to an action like this where we can define the gameobject to parent the sound with a action public field for gameobject target? i tried to do like in my script but it return an error

PIXELCRY

  • Playmaker Newbie
  • *
  • Posts: 30
Re: Audio Toolkit Play
« Reply #4 on: December 02, 2012, 12:14:20 AM »
praying for Jeanfabre to pay some more few attention to this toolkit ;D

Here is the free version

http://u3d.as/content/clock-stone-software-gmb-h/audio-toolkit-free-version/2Bi


PIXELCRY

  • Playmaker Newbie
  • *
  • Posts: 30
Re: Audio Toolkit Play
« Reply #5 on: December 10, 2012, 10:04:04 PM »
hi still any way to get some help for these actions?

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Audio Toolkit Play
« Reply #6 on: December 11, 2012, 04:38:42 AM »
Hi,

 I hear you, tho I have 300+ posts to go catch up as I was away for some time. So please keep bumping this, I will do my best to cover that toolkit. Bump this next monday or something. Never fear bumping what you want, this helps a lot. This toolkit seems very simple, so I might be able to squeeze the basic needs to begin with.

bye,

 Jean

PIXELCRY

  • Playmaker Newbie
  • *
  • Posts: 30
Re: Audio Toolkit Play
« Reply #7 on: December 15, 2012, 01:32:17 AM »
thank you Jeanfabre if i can help you in any way just let me know !

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Audio Toolkit Play
« Reply #8 on: December 17, 2012, 05:29:46 PM »
:) can you make my day with few more hours ;D

I have to turn down projects, it's that bad at this moment, so I must honor paid work at the moment, things are getting easier in january generally, so keep bumping this thread please, this is the best way ( and actually a message to everyone reading this that would like some attention to other threads I might have missed or forgot about... keep bumping, this is the best way to see where to focus)

bye,

 Jean

PIXELCRY

  • Playmaker Newbie
  • *
  • Posts: 30
Re: Audio Toolkit Play
« Reply #9 on: December 18, 2012, 07:43:59 PM »
actually what would be nice

-setup the volume of a category
-start/stop/pause a category or playlist
-read and parent a sound to a gameobject ( like explained above )

PIXELCRY

  • Playmaker Newbie
  • *
  • Posts: 30
Re: Audio Toolkit Play
« Reply #10 on: December 21, 2012, 11:04:46 AM »
still no news for the actions? :-[

PIXELCRY

  • Playmaker Newbie
  • *
  • Posts: 30
Re: Audio Toolkit Play
« Reply #11 on: December 27, 2012, 11:23:04 PM »
merry Christmas to Jean Fabre, please dont forget my christmas audio toolkit actions! ;D

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Audio Toolkit Play
« Reply #12 on: January 01, 2013, 09:15:32 AM »
 :D :D

KozTheBoss

  • Full Member
  • ***
  • Posts: 150
  • You dont fail unless you give up trying to succeed
    • Pixel Life - portfolio
Re: Audio Toolkit Play
« Reply #13 on: January 05, 2013, 08:23:48 AM »
This is very interesting, I'll be keeping an eye on this :) friendly bump, and thanks for all that you are doing!
Remember, you don't fail unless you give up trying to succeed!

PIXELCRY

  • Playmaker Newbie
  • *
  • Posts: 30
Re: Audio Toolkit Play
« Reply #14 on: January 05, 2013, 09:42:28 AM »
This is very interesting, I'll be keeping an eye on this :) friendly bump, and thanks for all that you are doing!
/assist :D