• Hi Guest!

    We have posted a new VaM2 dev log on Patreon, starting a monthly cadence of written progress updates between Beta releases. Highlights include the new Gizmos System, Selection Carousel, and Modes System with Context-Specific Editing. Beta1.2 is 15 of 21 items complete.

    Read the full post on Patreon, or follow progress on the public Trello roadmap.

Question Using UIToggle to modify a slider?

Joined
Oct 27, 2023
Messages
35
Reactions
62
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.
 
You can try adding a Logicbrick plugin in that UItoggle. A Sequence Choice could work but maybe there's other ones you could use.
 
Upvote 0
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