Jump to content




Computer controlled force-field


  • You cannot reply to this topic
1 reply to this topic

#1 Tharr

  • New Members
  • 1 posts

Posted 19 January 2014 - 07:53 AM

I'm trying to use a computer to turn on my tekkit classic force-field. I want to be able to input activate to turn it on and have it stay on. and later input a diffrent passcode to deactivate it. Any tips or suggestions would be very welcomed and apreciated. Also i need it to automaticly run on startup if possable. Many thanks in advance, I hope to one day concour this Lua beast.

#2 CometWolf

  • Members
  • 1,283 posts

Posted 19 January 2014 - 02:14 PM

Im assuming you can use redstone to controll it, so just use the redstone API for that.
to read user input you can use read()
redstone.setOutput("back",false)
while true do
  local input = read()
  if input == "activate" then
    redstone.setOutput("back",true)
  elseif input == "deactivate" then
    redstone.setOutput("back",false)
  end
end
To run it on startup, just name the program "startup".





2 user(s) are reading this topic

0 members, 2 guests, 0 anonymous users