Question Using UIToggle to modify a slider?

Messages
10
Reactions
30
Points
13
There is a parameter that I would like modify using UIToggle. But this parameter is a float variable that is normally modified using a slider.

The behaviour I would like to have is this:
  • When toggle is off, set param to 0
  • When toggle is on, set param to 180
I can add this parameter to the toggle and toggling on sets the value to 180 correctly. However, when I toggle it off again the value is not restored to 0.

Any tips? Thank you.
 
Any tips? Thank you.
You should be able to flip-flop it with second point value and timer.

Example:
first toggle action: UISlider value 0, 2nd point 180, timer 0.1
2nd toggle action: UISlider value 180, 2nd value 0, timer 0.1

Than cicle both actions on/off to set desired state for UIToggle (when checked and unchecked).
 
Upvote 0
Back
Top Bottom