Please or Register to create posts and topics.

How do i make a toggle button?

I have a hard light surface and i want the option to toggle it. But the only thing i could do was 2 buttons. One which enables it and the other disables. But how do i add those 2 functions in one button?

:l

I have managed to do such a toggle button with a math_counter.

My Light bridge is called bridge and is disabled at the start.

The math counter got the following properties:
name: Counter
Initial Value: 0
Min Value: 0
Max Value: 2

The outputs are the following:
OnHitMax - counter - SetValue - 0

OnHitMax - bridge - Disable

OnChangedFromMin - bridge - Enable

The Button got the output:
OnPressed - counter - Add - 1

A button and a cube?

"Games are made out of smaller games ? turtles all the way down, until you hit the game that is so trivial and stupid it isn?t deserving of the name." --Raph Koster

logic_branch using the "ToggleTest" Output.

[Important Threads] Forum Rules | Welcome to the new Thinking With Portals
Please do not Private Message me for assistance. Post a thread if you have questions or concerns.
If you need to contact the staff privately, contact the Global Moderators via Discord.
msleeper wrote:
logic_branch using the "ToggleTest" Output.

I see, that might be easier ^^

msleeper wrote:
logic_branch using the "ToggleTest" Output.

What output do i add to the logic_branch?

:l
TarekCO wrote:
msleeper wrote:
logic_branch using the "ToggleTest" Output.

What output do i add to the logic_branch?

...nevermind i should not ask if i don't experiment myself..

:l

Pretty much. Also don't double post.

[Important Threads] Forum Rules | Welcome to the new Thinking With Portals
Please do not Private Message me for assistance. Post a thread if you have questions or concerns.
If you need to contact the staff privately, contact the Global Moderators via Discord.