Posted 20 October 2015 - 11:57 AM
In my game
local Sec
Sec = 0
while true do
Local event, x, y = os.pullEvent("mouse_clicked")
If event == "mouse_clicked" and x < 3 or event == "mouse_drag" and x < 3 then
Sec = Sec + 1
sleep(1)
end
end
how do I detect how long the mouse is HELD down
local Sec
Sec = 0
while true do
Local event, x, y = os.pullEvent("mouse_clicked")
If event == "mouse_clicked" and x < 3 or event == "mouse_drag" and x < 3 then
Sec = Sec + 1
sleep(1)
end
end
how do I detect how long the mouse is HELD down
Edited on 20 October 2015 - 10:02 AM