playMaker

Author Topic: [SOLVED] Audio Variable?  (Read 1985 times)

Avascar

  • Playmaker Newbie
  • *
  • Posts: 45
[SOLVED] Audio Variable?
« on: July 13, 2013, 08:22:43 PM »
Heyo! So I want to add the ability to change music in any level, so I want a variable that selects which music the player wants. How do I make this work exactly?
« Last Edit: July 20, 2013, 07:22:39 AM by Syo »

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Audio Variable?
« Reply #1 on: July 15, 2013, 02:33:32 AM »
Hi,

 do you have problems with storing the user choice? building the UI or actually playing a particular sound?

bye,

 Jean

Avascar

  • Playmaker Newbie
  • *
  • Posts: 45
Re: Audio Variable?
« Reply #2 on: July 16, 2013, 04:00:49 AM »
No, what I'm having trouble is what type of variable that I can store audio files into. Sort of like gameobjects. I want to use the Audio Play (which allows some sort of variable work there) so I can play the sound whatever is in that variable.

Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 4002
  • Official Playmaker Support
    • LinkedIn
Re: Audio Variable?
« Reply #3 on: July 16, 2013, 11:34:19 PM »
Make an Object variable, select it, and set Object Type to UnityEngine.AudioClip.

EDIT: I'll look into adding this info to the tooltip for the parameter. So, in this case, instead of "Object" it would say "Object : UnityEngine.AudioClip"

« Last Edit: July 16, 2013, 11:36:37 PM by Alex Chouls »