12-09-2008 06:48 PM
I'm trying to find a way to increment or decrement a value each time a joystick button (Boolean) is pressed.
The function in the tutorial i found makes the value go up by huge amountswhile the button is pressed, what i need is a way to have the value go up by x units every time the button is pressed.
i would use a timer, but sometimes, the button may be pressed very rapidly, or may be held.
in standard programming, i would have the system wait for the button to be pressed, then increment by one, and wait until the button was released before moving on. As of yet, i still have not found a way to do this.
-Zeno
Solved! Go to Solution.
12-09-2008 08:08 PM
Just us a shift register and compare old and new values of the boolean.
Easiest would be the "implies function". If you connect it as shown in this recent example, you get a trigger whenever the boolean goes from off->on between two iteration.