• Hi Guest!

    We are extremely excited to announce the release of our first Beta1.1 and the first release of our Public AddonKit!
    To participate in the Beta, a subscription to the Entertainer or Creator Tier is required. For access to the Public AddonKit you must be a Creator tier member. Once subscribed, download instructions can be found here.

    Click here for information and guides regarding the VaM2 beta. Join our Discord server for more announcements and community discussion about VaM2.
  • Hi Guest!

    VaM2 Resource Categories have now been added to the Hub! For information on posting VaM2 resources and details about VaM2 related changes to our Community Forums, please see our official announcement here.

Question Using UIToggle to modify a slider?

Joined
Oct 27, 2023
Messages
31
Reactions
59
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