Timed Buttons
Quote from Another Bad Pun on August 12, 2011, 5:01 pmI 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.
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.
Quote from Rubrica on August 12, 2011, 5:06 pmMath_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.
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.
Quote from Another Bad Pun on August 12, 2011, 6:32 pmThanks, 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.
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.
