Posted 21 November 2012 - 03:30 PM
how do i make it run code by clicking things i no its possilbe with cc 1.4.1
while true do
e, p1, p2, p3 = os.PullEvent()
if e == "mouse_click" then
-- if mouse click
elseif e == "mouse_drag" then
-- if mouse drag
end
end
p1 is 1 or 2, left or right click - I thinkwhile true do
e, p1, p2, p3 = os.PullEvent()
if e == "mouse_click" then
-- if mouse click
-- p1 is which button (left or right)
-- 1 is left
-- 2 is right
elseif e == "mouse_drag" then
-- if mouse drag
-- p1 is X co-ord
-- p2 is Y co-ord
elseif e == "mouse_scroll" then
-- if you use the scroll button
-- p1 is up or down (-1 for up, 1 for down
-- p2 is X co-ord
-- p3 is Y co-ord
end
end