PDA

View Full Version : Generate Different Actions Depending on Frequency of Button Push



zapstr001
July 21st, 2008, 07:21 AM
I am wondering if it is possible to get Girder to perform different actions depending on the number of times a button is pushed. For example,

Button Pushed Once
---->Perform action A

Button Pushed Twice in Close Succession
---->Perform action A and action B

If so, how would I be able to implement this? Thanks in advance.

quixote
July 22nd, 2008, 03:15 PM
The simplest way would be to use a macro event. Those are a sequence of events that occur within 5 seconds.
Another option is using simple timers. You could create a GML that enables and disables actions and groups using buttons presses and timers. That's a little tricky.
Otherwise you could use lua scripting. That gets quite complicated, but you would have way more control than the other two options.


Note - you may want to rethink your strategy and look into "states" and/or how to use variables in Lua.

blubberhoofd
July 24th, 2008, 07:39 PM
hi,

look in this thread: http://www.promixis.com/forums/showthread.php?t=18254

it contains a script of mine, that might be of use to you.