Button to Toggle Script Utilization of Fader
Posted: 27 Sep 2013 09:09
Hi!
I'm trying to write a script (conditional statement) to have a button toggle on/off a fader's use of a separate script.
Since the fader script that I want to toggle on/off is itself a conditional statement, I am a little confused as how to write that conditional statement within the conditional statement that will handle toggling the script on/off dependent on the button's state.
The fader script which I need to toggle on/off is:
if (z==0) x=0;
So, to be clear, what I am trying to figure out is something along the lines of:
if button.x=127 then {if (Fader.z==0) Fader.x=0;} else nothing happens
I have tried a few different ways of writing it but to no avail.. Any help or guidance would be much appreciated!!
Cheers
I'm trying to write a script (conditional statement) to have a button toggle on/off a fader's use of a separate script.
Since the fader script that I want to toggle on/off is itself a conditional statement, I am a little confused as how to write that conditional statement within the conditional statement that will handle toggling the script on/off dependent on the button's state.
The fader script which I need to toggle on/off is:
if (z==0) x=0;
So, to be clear, what I am trying to figure out is something along the lines of:
if button.x=127 then {if (Fader.z==0) Fader.x=0;} else nothing happens
I have tried a few different ways of writing it but to no avail.. Any help or guidance would be much appreciated!!
Cheers