11 posts
Posted 02 May 2012 - 03:38 PM
So normally when i want to make a door with password i would just script it on a computer and voila! But now i want it all on the screen. How do i do so when the computer starts up it turns on the programs startup on the screen?
436 posts
Posted 02 May 2012 - 05:24 PM
term.redirect(monitor)
This will push all text outputs to the monitor, if you wrap the monitor with monitor = peripheral.wrap(side). term.restore() will bring it back.
11 posts
Posted 02 May 2012 - 07:10 PM
Im not the best at english XD but i tried the term.redirect(right) and computer lags up with a error. this is what i typed.
term.redirect(right)
print"Hello"
——————————— And non of them worked :S i probbabbly missunderstood something
term.redirect(monitor)
print"Hello"
1604 posts
Posted 02 May 2012 - 07:23 PM
You have to wrap the monitor peripheral first:
local monitor = peripheral.wrap("side") -- replace with the side of the monitor
term.redirect(monitor) -- redirects the output to the monitor
-- Your code goes here
term.restore() -- restores the output to the computer screen
11 posts
Posted 02 May 2012 - 07:42 PM
okay it seems i got alot to learn about this XD what do you guys mean with local? otherwise i think i undeerstand everything and it works now guys! thanks!
436 posts
Posted 02 May 2012 - 08:12 PM
Local means it is only used in that program. Once the program ends, it is forgotten.
11 posts
Posted 02 May 2012 - 08:21 PM
ok thanks :)/>/>