This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
Qtbear's profile picture

Spawn Tutorials with monitors

Started by Qtbear, 17 August 2012 - 04:28 PM
Qtbear #1
Posted 17 August 2012 - 06:28 PM
Hi, i'm kinda new on tekkit, i've tryied to make some programs on the monitor with computercraft, my goal is create some "tutorials" for the new players on the screen, in the past with craftbukkit i've used the wood sign so with tekkit i wanna use the monitors, i wanna make like 5/6 different tutorial programs to run on the monitors, for now i've created some programs only using the print("") option, the problem is that if i restart the server i've to go to each monitor and start the tutorial program again, is there a way to autostart a default program on my monitors or some way for doing this thing?
KaoS #2
Posted 17 August 2012 - 06:32 PM
just name the program startup and it launches when the turtle/computer starts up
Cranium #3
Posted 17 August 2012 - 06:41 PM
Dang…ninja'd
Qtbear #4
Posted 17 August 2012 - 11:17 PM
ok, done, and how can i change the zise of the text?
Cranium #5
Posted 17 August 2012 - 11:31 PM
You can do this using the peripherals API. Try this:

local mon = peripheral.wrap("side") --designate the side of the monitor here
mon.setTextScale(1) --can be set from 0.5 to 5 in increments of 0.5
mon.write("Your bigger text here")
Basically use the first line at the top of your printing area, and then replace your print commands with mon.write().
Keep in mind that mon.write does not automatically go to the next line like print does, so you will have to designate the next line manually(by using mon.setCursorPos(x,y), or by adding "n" at the end of your lines.
Pharap #6
Posted 18 August 2012 - 12:41 AM
ok, done, and how can i change the zise of the text?

Follow Cranium's example.
But one thing I will add. So you don't have to keep doing mon.write,
use term.redirect(mon) and then use the standard print and write and it should output there.
Cranium #7
Posted 18 August 2012 - 12:55 AM
Follow Cranium's example.
But one thing I will add. So you don't have to keep doing mon.write,
use term.redirect(mon) and then use the standard print and write and it should output there.
I never liked term.redirect() because it does not allow me to do anything on the terminal until it's been restored. This way, if you want it to just display one thing on a monitor, you can have your regular menu system working, and use both at the same time. I used this(to great effect) for my train system to display little throwaway monitors that just said what the terminal here did, without putting up ugly signs.
Pharap #8
Posted 18 August 2012 - 01:06 AM
Follow Cranium's example.
But one thing I will add. So you don't have to keep doing mon.write,
use term.redirect(mon) and then use the standard print and write and it should output there.
I never liked term.redirect() because it does not allow me to do anything on the terminal until it's been restored. This way, if you want it to just display one thing on a monitor, you can have your regular menu system working, and use both at the same time. I used this(to great effect) for my train system to display little throwaway monitors that just said what the terminal here did, without putting up ugly signs.
Well yeah, but it's good if you are going to write loads of stuff to just a monitor, keeping it separate from a terminal.
I would say just run the program on a monitor were it not for wanting to change the monitor's text size.
jacobc436 #9
Posted 18 August 2012 - 05:08 AM
How do i add lines to it, though?
Cranium #10
Posted 18 August 2012 - 06:08 AM

mon = peripheral.wrap("side")
mon.setCursorPos(1,1)
mon.write("line one here")
mon.setCursorPos(1,2)
mon.write("line two here")
Qtbear #11
Posted 18 August 2012 - 02:11 PM
thanks guys <3<3<3
jacobc436 #12
Posted 18 August 2012 - 04:19 PM
Yeah, thanks!