It sounds to me as though you need to detect when the button becomes pressed rather than when if is pressed.
Look at the StateChangeDetection example in the IDE to see how to do it.
It sounds to me as though you need to detect when the button becomes pressed rather than when if is pressed.
Look at the StateChangeDetection example in the IDE to see how to do it.