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

[Question] Adventure on Monitor?

Started by JTTCOTE, 17 December 2012 - 03:28 PM
JTTCOTE #1
Posted 17 December 2012 - 04:28 PM
Is there any way to have the output from an adventure game output on your monitor? I was going to try doing it myself by adding a monitor.write after every print line, but apparently you can't edit adventure (or at least not by typing "edit adventure"). So is there any way of having my adventure game show up on a monitor?
theoriginalbit #2
Posted 17 December 2012 - 04:32 PM
have you tried to use the monitor program?

monitor left adventure
JTTCOTE #3
Posted 17 December 2012 - 04:54 PM
Okay then…thanks! And my that was quick. Wish you could type on the monitor though, but oh well. Or at the very least have it say what you're typing on the computer…
theoriginalbit #4
Posted 17 December 2012 - 04:57 PM
what can I say I'm bored and this is how i fill in time, refresh the browser every 5 mins or so and answer.

yeh it is a downside to monitors. have been considering writing a peripheral for CC to fix this. but its at the back of the projects list.
remiX #5
Posted 17 December 2012 - 11:21 PM
You can type on the monitor but you have to edit the program to have term.redirect(monitor) or something like that :)/>
theoriginalbit #6
Posted 17 December 2012 - 11:23 PM
You can type on the monitor but you have to edit the program to have term.redirect(monitor) or something like that :)/>

what? using the monitor program dan200 has put into CC does all that, monitor right adventure will run adventure on the monitor and input goes through the terminal.
Kingdaro #7
Posted 18 December 2012 - 02:19 AM
I did something like this once with a mining turtle and rednet. I overwrote the write() and print() functions to both send signals back to my computer and output to the turtle's screen while it excavated.

For here, you could just do the same, but instead of sending a rednet signal, just get a monitor object and print to your screen and the monitor's screen.


local monitor = peripheral.wrap('someside')
local _print, _write = print, write

function write(...)
  monitor.write(...)
  _write(...)
end

function print(...)
  write(..., '\n')
end
Except I'm not sure if this will fully work, since there's this weird glitch with monitors and \n, not sure if that was fixed. Also because not all term functions are fully reimplemented.
theoriginalbit #8
Posted 18 December 2012 - 02:28 AM
Please: Can this be marked [solved]. OPs question has been solved.