• Hi Guest!

    We are extremely excited to announce the release of our first Beta for VaM2, the next generation of Virt-A-Mate which is currently in development.
    To participate in the Beta, a subscription to the Entertainer or Creator Tier is required. 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.

Question Using UIToggle to modify a slider?

Joined
Oct 27, 2023
Messages
30
Reactions
58
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