Toggle prop_button
Is there a way to make a prop_button toggle? Such as once pressed, does something. Then when pressed again, it does something else?
Just trying to wonder how this could be done, as I have no idea.
Rubrica wrote:
Create a logic_branch and send it an input of ToggleTest each time the button is press, and add outputs to it for OnTure and OnFalse. For more than two possible cases, you'll want to use a combination of math_counter and logic_case.
Thanks for the help. =]
However, I have encountered another problem. The prop_button toggles a panel that moves up/down. When it is in the 'up' state I place a ball on it, when I toggle it to the 'down' state...the ball stays there in mid-air.
All of the settings for the panel animations etc are correct.
Marise wrote:
Are you parenting an invisible brush to the panel? If you were to use the wrong attachment point, the brush would not move with the panel, and would hold the ball up.
I have parented it to the panel, and used the correct panel_attach to go with it. Unless you need a different one for an invisible brush?
@Vordmann, Yeah, a sphere. Sorry. The setting is set to 'not solid' for the animation and panel side to it.
Lostprophetpunk wrote:
I have parented it to the panel, and used the correct panel_attach to go with it. Unless you need a different one for an invisible brush?
It's the same attachment point for any brush. However, some panels use panel_top as the attachment point. You could test if it's attaching by temporarily changing the brush texture to something visible, and see if it moves with the panel.
Marise wrote:
It's the same attachment point for any brush. However, some panels use panel_top as the attachment point. You could test if it's attaching by temporarily changing the brush texture to something visible, and see if it moves with the panel.
I know the brush is attached, as I put the button next to the panel, stood on it and pressed it, I went up with the panel and came back down when toggled.
The brush stays on the panel as it doesn't get stuck in mid air.