Difference between revisions of "Advanced Monitor"
From ComputerCraft Wiki
(Minor Revision) |
MathManiac0 (Talk | contribs) (Added instructions how to call monitor functions and the four exclusive Adv. Monitor methods.) |
||
Line 7: | Line 7: | ||
|Output=Advanced_Monitor | |Output=Advanced_Monitor | ||
}} | }} | ||
+ | ==Using an Advanced Monitor== | ||
+ | ''See [[[Peripheral (API)]] for more details.'' | ||
+ | |||
+ | To use an Advanced Monitor, you need to call a method using the Peripheral API. This is one example: | ||
+ | |||
+ | peripheral.call("side", "function", var1, var2, ...) | ||
+ | |||
+ | For example: | ||
+ | |||
+ | peripheral.call("top", "write", "Hello World!") | ||
+ | |||
+ | You can also "wrap" the peripheral side to a variable: | ||
+ | |||
+ | local monitor = peripheral.wrap("top") | ||
+ | |||
+ | now, you can call functions that way. | ||
+ | |||
+ | monitor.write("Hello World!") | ||
+ | |||
+ | there are four new functions: | ||
+ | |||
+ | [[monitor.setTextColor]]([[color (API)|(color)]]) | ||
+ | |||
+ | [[monitor.setTextColour]]([[colour (API)|(colour)]]) | ||
+ | |||
+ | [[monitor.setBackgroundColor]]([[color (API)|(color)]]) | ||
+ | |||
+ | [[monitor.setBackgroundColour]]([[colour (API)|(colour)]]) |
Revision as of 12:35, 14 November 2012
The Advanced Monitor is a new, improved version of the monitor. It has the ability to show coloured text and programs on the screen. It is also golden colored on it's sides, similar to the advanced computer. For available colors, see Colors API.
Recipe
Using an Advanced Monitor
See [[[Peripheral (API)]] for more details.
To use an Advanced Monitor, you need to call a method using the Peripheral API. This is one example:
peripheral.call("side", "function", var1, var2, ...)
For example:
peripheral.call("top", "write", "Hello World!")
You can also "wrap" the peripheral side to a variable:
local monitor = peripheral.wrap("top")
now, you can call functions that way.
monitor.write("Hello World!")
there are four new functions:
monitor.setTextColour((colour))