11 posts
Location
So Cal
Posted 05 November 2013 - 07:03 PM
Lets say I have this code
event = os.pullEvent()
if event == "mouse_click" then
print "Yay"
end
How would I make it wait to print the message only after I've clicked twice?
8543 posts
Posted 05 November 2013 - 07:56 PM
Split into new topic.
Well, if all you want is to ensure that you get two mouse click events in a row, you can do dumb tricks like this:
if (os.pullEvent()) == "mouse_click" and (os.pullEvent()) == "mouse_click" then
But if you want anything more complex than two mouse clicks anywhere any time apart with no other events in between, you'd need to do it differently.
11 posts
Location
So Cal
Posted 05 November 2013 - 08:36 PM
Split into new topic.
Well, if all you want is to ensure that you get two mouse click events in a row, you can do dumb tricks like this:
if (os.pullEvent()) == "mouse_click" and (os.pullEvent()) == "mouse_click" then
But if you want anything more complex than two mouse clicks anywhere any time apart with no other events in between, you'd need to do it differently.
Yeah that worked. Can't believe I didn't think of that :D/> Thanks a million.