←  Ask a Pro

ComputerCraft | Programmable Computers for Minecraft

»

mouse_Click not working

SkipTam's Photo SkipTam 31 Mar 2019

Hi Everyone,
i have a small problem. Somehow this script does not trigger and i do not understand why. Can anyone help me?

https://pastebin.com/PrWah3D7

thanks!
Quote

SkipTam's Photo SkipTam 31 Mar 2019

Please close thread...
Problem was Layer 8.
Quote

CCTech's Photo CCTech 02 Apr 2019

You haven't checked which button gets clicked on line 17:
if x > 5 and x < 8 and y == 2 then

It should look like:
if parm1 == 1 and x > 5 and x < 8 and y == 2 then -- 1 is tthe left mouse button. I don't really know about the both other

Everything else should be fine as far as I know
Quote

Dog's Photo Dog 02 Apr 2019

View PostCCTech, on 02 April 2019 - 07:11 PM, said:

You haven't checked which button gets clicked on line 17:
if x > 5 and x < 8 and y == 2 then

It should look like:
if parm1 == 1 and x > 5 and x < 8 and y == 2 then -- 1 is tthe left mouse button. I don't really know about the both other

Everything else should be fine as far as I know

It doesn't matter if the button is checked. If there is no check for the button then all 3 buttons are considered valid.
Quote

CCTech's Photo CCTech 03 Apr 2019

View PostDog, on 02 April 2019 - 09:06 PM, said:

View PostCCTech, on 02 April 2019 - 07:11 PM, said:

You haven't checked which button gets clicked on line 17:
if x > 5 and x < 8 and y == 2 then

It should look like:
if parm1 == 1 and x > 5 and x < 8 and y == 2 then -- 1 is tthe left mouse button. I don't really know about the both other

Everything else should be fine as far as I know

It doesn't matter if the button is checked. If there is no check for the button then all 3 buttons are considered valid.

Really? It never worked for me though when I forgot checking it... Well.. questions over questions :P
Quote