Scrap Mechanic

Scrap Mechanic

ScriptableComputer
waffle (mkel) 2024년 3월 29일 오후 5시 32분
working antennae networks?
im not the most intelligent creature on this planet.
i dunno know to make these antenna thingamalangs work.
thanks gewts <3.
waffle (mkel) 님이 마지막으로 수정; 2024년 3월 29일 오후 6시 02분
< >
전체 댓글 1개 중 1~1개 표시 중
waffle (mkel) 2024년 3월 30일 오후 11시 46분 
Hey, buddy. I can tell you arent the most intelligent creature on this planet.
anyways, take this for free, idiot.

connect a port to the computer, and an antenna to the port.
connect a terminal too.
add this into the sender computer:

display = getDisplays()[1]
port = getPorts()[1]

terminal = getComponents("terminal")[1]
terminal.clear()
text = terminal.read()
if text then
display.clear()
display.drawText(1,1,text)
display.flush()
port.send(text)
end

make sure to keep this on, and the second computer as the receiver.
receiver computer will be connected to a display, and same port/antenna setup with the code:

local port = getPorts()[1]
local display = getDisplays()[1]

function callback_loop()

local package = port.nextPacket()
port.clear()

if package then
display.clear()
display.drawText(1,1,package)
display.flush()
end

end

thanks, buddy:steamthumbsup: :steamhappy:
< >
전체 댓글 1개 중 1~1개 표시 중
페이지당 표시 개수: 1530 50