4 posts
Posted 22 April 2012 - 03:18 AM
Like the title says, is there a way for the computer to detect something in the world around it?
454 posts
Location
London
Posted 22 April 2012 - 03:42 AM
No. There is only turtle.detect and turtle.compare, which are for turtles.
You could use pressure plates and redstone or buttons, and hook them up to a computer, though.
4 posts
Posted 22 April 2012 - 03:52 AM
What I was wanting was to have it detect when it was night so it would turn on a redstone current for automating my EU generation in Tekkit
1111 posts
Location
Portland OR
Posted 22 April 2012 - 04:18 AM
If you want to turn something on time based you can use os.setAlarm( time ) and use the minecraft time that you want the event to happen as the argument. So if you want it on at 7am minecraft time do something like..
os.setAlarm(7)
evt, e1 = os.pullEvent("alarm")
rs.setOutput("right", true )
4 posts
Posted 22 April 2012 - 04:30 AM
sweet thanks!
4 posts
Posted 22 April 2012 - 05:10 AM
That worked, it took a couple tries to get it right for the event that would be a second alarm, but I got it :)/>/>
92 posts
Posted 22 April 2012 - 05:42 AM
Like the title says, is there a way for the computer to detect something in the world around it?
yes there is :)/>/>
ccSensorsthere is a world sensor that can provide you with the following world values (among other things):
"Sea Level",
"Light Level",
"Rain Strength",
"Raining?",
"Day/Night",
"isThunderStorm",
"SensorHeight",
1111 posts
Location
Portland OR
Posted 25 April 2012 - 12:29 PM
If your running Redpower for v1.25 there is now an adjustable light sensor included in it as well.