Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: ransomink on October 02, 2016, 06:13:58 PM

Title: Variable selection for non-Fsm variables? [SOLVED]
Post by: ransomink on October 02, 2016, 06:13:58 PM
Hello all,
I have a custom script with an AudioMixer variable. I would like to use a variable created inside a PlayMakerFSM (Object > Unity > AudioMixer) instead of a value but it does not give me the option to select a variable, instead, I have to drag 'n drop the AudioMixer.

This method is not warranted as an issue will occur if I need to change the given (hard-coded) variable. Is there another way I am missing. Help is much appreciated.
Title: Re: Variable selection for non-Fsm variables?
Post by: ransomink on October 02, 2016, 07:50:14 PM
Update: So I figured to use an FsmObject variable instead of an AudioMixer variable so I can use variable selection. Then, in order to access the AudioMixer properties I created a local AudioMixer variable and explicitly assigned it to the FsmObject variable, like so: _mixer = (AudioMixer)audioMixer.Value;
Title: Re: Variable selection for non-Fsm variables? [SOLVED]
Post by: djaydino on October 03, 2016, 08:22:29 AM
Hi,
I just saw a custom action on the Ecosystem (https://hutonggames.fogbugz.com/default.asp?W1181) called :
Audio Mixer Set Float Value

maybe it is usefull for you or anybody else.
it can set all the exposed audio mixer values
here (https://unity3d.com/learn/tutorials/topics/audio/exposed-audiomixer-parameters) is a tutorial to expose audio parameters
Title: Re: Variable selection for non-Fsm variables? [SOLVED]
Post by: ransomink on October 03, 2016, 08:01:01 PM
Sweet, that sounds awesome! :) I still need to update Unity and PlayMaker to their latest versions because they probably have some new actions based on new Unity features.

Too lazy to backup and deal with update errors right now. Much appreciated.
Title: Re: Variable selection for non-Fsm variables? [SOLVED]
Post by: djaydino on October 03, 2016, 08:26:42 PM
Hi,
You better make a habit on backing up :)

I do it daily and sometimes even more. it save me many times and not only when updating

on what version are you now btw.
Title: Re: Variable selection for non-Fsm variables? [SOLVED]
Post by: ransomink on October 03, 2016, 10:05:47 PM
Unity:        5.3.4f1
PlayMaker: 1.8.0.f38

p.s. I checked out the AudioMixer action and turns out mine was written the exact same way, haha. Guess I'm getting better at this custom action stuff. Thanks!

p.s.s. I will definitely make sure to backup tonight and at least twice a week...