monitor_touch event

From ComputerCraft
Jump to: navigation, search
monitor_touch
Event
Returns

Source CC:Tweaked

Occurs every time a player right clicks on an advanced monitor.

Note Note: This event is only called on Advanced Monitors.

ExampleExamplePrint touched coordinates
Prints the touched coordinates every time a player touches a connected Advanced Monitor.
Code
while true do
  local event, peripheral_name, x, y = os.pullEvent("monitor_touch")
  print("A monitor has been pressed at " .. x .. ", " .. y)
end