Jump to content

Computercraft


Mike3715

Recommended Posts

Okay so im making a sign with monitors and computer craft but how do i make mutiple lines of writing i can only make one how do i make more heres the coding

mon=peripheral.wrap("right")

mon.clear()

mon.setTextScale(5)

mon.setCursorPos(4,4)

mon.write("Hello")

Link to comment
Share on other sites

You're better off not using the peripheral api. Simply,

term.clear()

term.setCursorPos(4,4)

print("line 1")

print("line 2")

Etc.

Then when you run the program, do "monitor right [program]". If you want this to be your startup program, create a new program called startup and type:

shell.run(monitor right [program])

I had the same problem today, I have no idea why there is no mon.print() method.

Link to comment
Share on other sites

You only need to use the peripheral api in that way if you want the user to be interacting with the terminal at the same time you are displaying on a monitor.

For example, if you made a connect 4 game, you could display the board on a large monitor with a computer hooked up to wait for rednet messages and update the board accordingly. Each player would then have a computer that sends their move over rednet to the first computer.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...