Jump to content




Auto Open Modem?


  • You cannot reply to this topic
2 replies to this topic

#1 3ydney

  • Members
  • 53 posts
  • LocationAdelaide, Australia.

Posted 22 January 2013 - 06:21 PM

How can I open every modem side using a table?

#2 theoriginalbit

    Semi-Professional ComputerCrafter

  • Moderators
  • 7,332 posts
  • LocationAustralia

Posted 22 January 2013 - 06:23 PM

This uses the function getSides in the redstone (rs) API which returns a table of the sides... it then iterates through and using the peripheral API checks to see if the peripheral is a modem, if it is open the modem...
for _,v in pairs( rs.getSides() ) do
  if peripheral.getType( v ) == "modem" then
	rednet.open( v )
  end
end


#3 3ydney

  • Members
  • 53 posts
  • LocationAdelaide, Australia.

Posted 22 January 2013 - 06:25 PM

Thanks SO much... I was just about to try that!





2 user(s) are reading this topic

0 members, 2 guests, 0 anonymous users