This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
rightman's profile picture

Using ccSensors to detect handheld item

Started by rightman, 14 April 2013 - 06:22 AM
rightman #1
Posted 14 April 2013 - 08:22 AM
I have been trying to build a program that can do something based on if a player is holding a specific item in their hand. But i have had a huge sum total of zero luck on this project and i could really use some much needed help.

My problem seems to be that I have not been able to figure out exactly how to get the handheld item information out of the returned dictionary from the sensor.

I already have found a good program out there that will output rs signal if someone comes close, but i wanted to modify it so that it would only activate upon that player holding a specific item, like a password of sorts
Sariaz #2
Posted 14 April 2013 - 08:36 PM
Are you using ccsensors or open ccsensors? If you are using ccsensors I can not help you since I don't use that.
rightman #3
Posted 15 April 2013 - 01:32 PM
No I am using just ccsensors
Sariaz #4
Posted 15 April 2013 - 02:02 PM
Ok then I cant help you besides that from what i remember of it I'm not sure that it tells you what there holding but that may not be true anymore. Either way id personally switch to openccsensors as i have found it to be more reliable and flexible.