I'm trying to make some kind of a door system using the drawbridges from the mod tConstruct. I want to use the sensor from openperipherals to detect if a player is nearby. I can't get the pripheral to work.
This is my tets build:
https://www.dropbox....21_21.39.47.png
This is what I do:
https://www.dropbox....21_21.43.18.png
As you can see it doens't work! Can you guys hepl me?
Openperipherals sensor peripheral
Started by flaghacker, Feb 21 2014 03:30 PM
4 replies to this topic
#1
Posted 21 February 2014 - 03:30 PM
#2
Posted 21 February 2014 - 05:20 PM
If that really si an openP sensor, and not an OCS sensor (about 90% seem to make that mistake), then the correct function would be
sensor.getPlayerNames()
#3
Posted 22 February 2014 - 03:58 AM
Thanks, I found the function getTargets() somewhere on the internet... It is indeed the sensor from openperipherals. And how do you get the distance?
EDIT: I tested your function and it still doens't work...
https://www.dropbox....22_11.31.46.png
(The sensor is at the right side)
EDIT: I tested your function and it still doens't work...
https://www.dropbox....22_11.31.46.png
(The sensor is at the right side)
Edited by flaghacker, 22 February 2014 - 05:25 AM.
#4
Posted 22 February 2014 - 05:28 AM
If the peripheral is placed on the computer's left side, then you need to use peripheral.wrap("right"), and vice versa. Note that the opposite is true for turtles.
#5
Posted 24 February 2014 - 03:16 PM
Try the following:
i'm having troubles with makeing a door with it xD
for i,v in pairs(sensor.getPlayerNames()) do
print(i, ". ", v)
end
Hope it works 2 user(s) are reading this topic
0 members, 2 guests, 0 anonymous users











