playMaker

Author Topic: Variable selection for non-Fsm variables? [SOLVED]  (Read 2549 times)

ransomink

  • Playmaker Newbie
  • *
  • Posts: 44
Variable selection for non-Fsm variables? [SOLVED]
« 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.
« Last Edit: October 02, 2016, 07:53:29 PM by ransomink »

ransomink

  • Playmaker Newbie
  • *
  • Posts: 44
Re: Variable selection for non-Fsm variables?
« Reply #1 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;
« Last Edit: October 02, 2016, 07:53:15 PM by ransomink »

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7618
    • jinxtergames
Re: Variable selection for non-Fsm variables? [SOLVED]
« Reply #2 on: October 03, 2016, 08:22:29 AM »
Hi,
I just saw a custom action on the Ecosystem 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 is a tutorial to expose audio parameters

ransomink

  • Playmaker Newbie
  • *
  • Posts: 44
Re: Variable selection for non-Fsm variables? [SOLVED]
« Reply #3 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.

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7618
    • jinxtergames
Re: Variable selection for non-Fsm variables? [SOLVED]
« Reply #4 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.

ransomink

  • Playmaker Newbie
  • *
  • Posts: 44
Re: Variable selection for non-Fsm variables? [SOLVED]
« Reply #5 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...