2 posts
Posted 06 July 2012 - 06:39 AM
I'm trying to make a large sign on my server and I can't figure out how to edit font size and get it to display. I'd post my abysmal attempts but none of them are even close… I think. :P/>/> Can some one give me an example of what this coding should look like?
474 posts
Posted 06 July 2012 - 06:42 AM
Here's some example code:
local m = peripheral.wrap(sideofmonitor)
m.setTextScale(fontsize) – fontsize is 1 through 5
2 posts
Posted 06 July 2012 - 06:51 AM
Ok here's what I got:
write ("message")
local m = peripheral.wrap(sideofmonitor)
m.setTextScale(fontsize)
am I close?
1604 posts
Posted 06 July 2012 - 05:42 PM
Here's a more complete example:
local monitorSide = "<side>" -- the side the monitor is on
local textScale = 3 -- the text scale
-- check if the monitor is present
if peripheral.isPresent(monitorSide) and peripheral.getType(monitorSide) == "monitor" then
local mon = peripheral.wrap(monitorSide) -- get the monitor
mon.setTextScale(textScale) -- set the text scale
term.redirect(mon) -- redirect output to the monitor
else
-- monitor not found, exit
print("Monitor not found")
return
end
-- your code here
term.restore() -- restore output to the terminal