Posted 26 February 2014 - 08:21 AM
I've ben trying to get a forcefield to turn off when a player gets near but I can't seem to find ANY way of doing this.
I have a redstone torch attached to the computer. I just need a signal to come on if a player, any player is present
So I would like 2 things here…
How would I solve this?
And what variables can I take from the proximity sensor commands and how would I do so? Since I keep getting confused about it.
My current attempt so far isn't…great:
os.loadAPI("ocs/apis/sensor")
prox = sensor.wrap("back")
while true do
for name, details in pairs(targets)
if details.name == nil then
redstone.setOutput("left",false)
else
redstone.setOutput("left",true)
end
end
I have a redstone torch attached to the computer. I just need a signal to come on if a player, any player is present
So I would like 2 things here…
How would I solve this?
And what variables can I take from the proximity sensor commands and how would I do so? Since I keep getting confused about it.
My current attempt so far isn't…great:
os.loadAPI("ocs/apis/sensor")
prox = sensor.wrap("back")
while true do
for name, details in pairs(targets)
if details.name == nil then
redstone.setOutput("left",false)
else
redstone.setOutput("left",true)
end
end