Timed Buttons
Posted Aug 12, 2011
I usually don't have problems with entity setups, but this has bugging me for a while. How would go about setting up two buttons, that must be pressed during a time limit, (a little like opening the first cave johnson vault in the single player campaign,) to preform an action? I've been messing a round with logic_branch, logic_branch_listener, and logic_timer and still can't get anything to work properly. Help would be appreciated.
Registered users don’t see ads!
Register now!
Posted Aug 12, 2011
Replied
5 minutes
later
Math_counter, with a max of two. Set the button timeout key value for both of the buttons, then add these outputs to each of them: OnPressed, math, Add, 1, and OnButtonReset, math, Subtract, 1. Then add an OnHitMax output to the math_counter to do whatever you want. You may wish for this to trigger only once, if it's a permanent effect.
Posted Aug 12, 2011
Replied
1 hour
later
Thanks, that worked perfectly. However I have another completely unrelated problem. When one of my coop bot goes into poisen goo, they just drown forever, they never die and respawn. (I'm running in ss_map if that makes a difference.)
EDIT: Nevermind, it was just a flag that wasn't checked properly.