Its in the name i want to add more then one monitor to my program. I tryed
hi = { 1, 2, 3, 4 }
local mon = peripheral.wrap("monitor_" ..hi)
but it didnt work. I could use some help btw what i am doing is a huge powerpoint presentation and i need mon.write all over so i need it on more then one mon.
I need help making a wired modem send signals to multiple mon
Started by AnDwHaT5, Mar 22 2013 11:35 AM
6 replies to this topic
#1
Posted 22 March 2013 - 11:35 AM
#2
Posted 22 March 2013 - 11:50 AM
Try this (untested):
local tWrap = { peripheral.wrap('right'), peripheral.wrap('left'), --etc..
}
for i = 1, #tWrap do
mon = tWrap[i]
mon.write('hi')
end
#3
Posted 22 March 2013 - 11:51 AM
yes but i have 4 monitors which are 1,2,3, and 4 in there wired modem how will that help?
#4
Posted 22 March 2013 - 11:54 AM
ahh let me be more specific in one cable
#5
Posted 22 March 2013 - 12:02 PM
I figured it out i used and and added more them one together i will make a tutorial.
#7
Posted 22 March 2013 - 12:21 PM
To get and write to multiple monitors through a modem, it's usually best to use modem.getNamesRemote.
And I'll go ahead and point to the NetGroup API I have linked in my signature, that'll probably help you out a bit if you don't feel like looping through the peripherals yourself.
local modem = peripheral.wrap('back') -- wrap whichever modem on your computer is connecting your monitors
local names = modem.getNamesRemote()
for i=1, #names do
local mon = peripheral.wrap(names[i])
-- your drawing operations
end
And I'll go ahead and point to the NetGroup API I have linked in my signature, that'll probably help you out a bit if you don't feel like looping through the peripherals yourself.
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users












