Sure. Use a variable to hold a count of the number of times the button has been pushed. Start it at 0.
I’m going to assume you’re responding to touch events and not tap events. In your touch handler, do something like:
local count = 0 local function touchHandler( event ) if event.phase == "ended" then count = count + 1 if count == 1 then count = 0 return true end -- the rest of your code end end
Or something like that.
Rob