Computer Craft Monitor Help

  • Please make sure you are posting in the correct place. Server ads go here and modpack bugs go here

Death-A-Lot

New Member
Jul 29, 2019
40
0
0
Hi everyone, I'm looking for some basic code to display something on a monitor.

I have three monitors with the computer behind the middle monitor. All I am after is a code that I can edit what it prints to the monitor, the size and colour. The code needs to be centered in the middle of the the three monitors.

I tried doing it myself last night but after nearly two hours I gave up. Or if you can alternatively point me to a decent written tutorial that would be great.

Thanks in advance.
 

Dkittrell

New Member
Jul 29, 2019
378
0
0
Are you just trying to display certain text like an advertisement or something like an item count ? If its just like an advertisement or something you can use an industrial info panel
 

Death-A-Lot

New Member
Jul 29, 2019
40
0
0
Are you just trying to display certain text like an advertisement or something like an item count ? If its just like an advertisement or something you can use an industrial info panel

I just want it to say one thing on the monitors like "exit". Then the same code but displaying something else like "entrance".

So basically it's the same code I can use on different setups but changing what it displays. If that makes sense.



That's what I was using originally, which works until I needed to change the size of the text is change the text itself.

I am more than willing to admit that it is probably very easy to do but I just can't figure it out, I know I'm missing something simple but I just don't know what.
 

Bomb Bloke

New Member
Jul 29, 2019
612
0
0
Apparently your wrapped monitor has a "setTextScale(size)" function, so you'd call that at the start of your code, then just use the regular Term commands to position your cursor and write your text.

Having not used monitors myself, here's what I can only assume is a working sample:

Code:
local m = peripheral.wrap("right") -- Or whatever side the monitor is on
m.clear() -- Just in case the display isn't already empty
m.setTextScale(5) -- This is the largest size, you may want smaller
m.setCursorPos(3,4) -- Or whatever numbers get things nice and centered
m.write("EXIT")