Camera and Monitor - LemADEC/WarpDrive GitHub Wiki
Introduction
Camera and Monitor blocks allow viewing other areas inside or outside your vessel. When combined with a laser, they are used to target and fire the weapon. You may refer to Laser setup (basic) for an example of Monitor and Laser Camera.
Video channel
Cameras and monitors are linked through a wireless communication. Since we can have multiple camera operating at the same time, each of them needs to use a different Video channel to emit their signal. To view a specific camera on a monitor, ones needs to tune it to that Camera's Video channel.
Multiple monitors can read from the same Video Channel, so you can share the view voluntarily, or not... Multiple camera with the same Video Channel will jam each others; with a bit of luck, your monitor will catch the closest Camera on that Video Channel, but there's no guarantee about that.
Building
1- Camera
Place the Camera block where you want to watch, it'll your 'eye' position. Needless to say, any block in the way will reduce your viewing capacity.
A Camera needs to be tuned to Video channel so a Monitor can catch the signal. In our case, we'll use Video Channel 7089.
2- Temporary computer for Camera
To configure our Camera, we'll temporarily place a Computer right under it.
Right click the computer to open it's console.
Open the LUA interpreter by typing the following command:
lua
To access the Camera, we need to open its proxy (OpenComputers) or wrap it (ComputerCraft). Type the command related to your computer:
-- for ComputerCraft
camera = peripheral.wrap("top")
-- for OpenComputers
camera = component.warpdriveCamera
Then we setup the Beam frequency and Video channel through the API:
camera.videoChannel(7089)
Right click the Camera with an empty hand to confirm its setup.
You may now dismount that Computer.
3- Monitor
When attached to a Camera, the monitor becomes a viewing station: you can orient and zoom to see the area around the camera.
To link our monitor with our Camera, we need to set its Video Channel to same value: 7089.
4- Temporary computer for Monitor
To configure the Monitor, we'll temporarily place a Computer right under it.
Right click the computer to open it's console.
Open the LUA interpreter by typing the following command:
lua
To access the Monitor, we need to open its proxy (OpenComputers) or wrap it (ComputerCraft). Type the command related to your computer:
-- for ComputerCraft
monitor = peripheral.wrap("top")
-- for OpenComputers
monitor = component.wrapdriveMonitor
Then we setup the Video channel through the API:
monitor.videoChannel(7089)
Right click the Monitor with an empty hand to confirm its setup.
You may now dismount that Computer.
Usage
Once built, you can right click the Monitor with an empty hand to pick a target.
Your in-game GUI will change to a view at the Camera location. From there, you can:
- move your mouse around to select a target
- use left click to cycle zoom level
- use right click to exit the monitor
Warning: if your in creative, left click will break the monitor!
Hints
- read carefully what's above, there's a lot of hints in there :)
- when loading a new area, it may take a few seconds for your monitor to resync with the camera. During that time, the monitor will report the video channel has being 'invalid'.