If you are looking to create a monitor that:
a. only has 1 camera displayed on the screen at all times
b. switches between different cameras on 1 monitor
Sorry guys but there is no way that there can be 2 monitors with 2 different cameras taking footage, it is illegal in the source engine.
However I am going to show u how to make a monitor.
Open up hammer and create a new map or open a map in which you want to insert the monitor into.
Draw and create a block using the brush tool that is square.
While it is still highlighted click the To Entity
button at the right hand side of the screen. We want to change it into a func_monitor
, although you can use other entities to show a camera, this will be explained later.
Using the entity tool create an entity called a point_camera
and point it at something in which you would like to view. If you had just created a new map for this as a test, create something that you will be able to see on the camera, in my case I'm going to just go through he hl2 prefabs and insert a couple of random things.
Click the entity tool and in the drop down menu choose prefabs to the right. Choose 'combine_ballspawner'. Then hit enter when you choose a spot in which you would like to create the prefab.
Now make the point_camera and in the name property put in camera01
(Sorry to disappoint you people but you cannot see yourself in a camera, however it can see other players...)
Anyway... using the texture application tool, click on the front face of your monitor and click browse for a list of textures. In filters type in monitor, we want to click the one called dev_monitornonoise
Apply this to the front of your square and in the texture application (with the front face selected) click 'fit'.
Open up the func_monitor's properties and in the one that says camera put 'camera01'. This is so then the monitor can reference the camera.
That is it for a simple monitor, keep reading if you want a monitor that switches between cameras.
How to make a monitor that has multiple cameras.
Using what we made above we want to add several entities in order to achieve this. First of all we need to place a couple more cameras around the area. Just to make it simple make 1 or 2 more cameras so then you do not need to add as many outputs.
Just to be boring, name these camera02, and camera03 in their name property (alt+enter). If you go to flags you will notice one that says "starts off", tick this for both cameras that you have just placed in. This is so then the cameras do not interfere with the monitor just yet.
Also create a logic_timer, a math_counter and a logic_case somewhere around your monitor. These are the things we will need to change the monitor to the different cameras.
First of all in your logic_timer, enter a name and put a value in the field that says "refire interval". I put mine at 5 (so then the camera willc hange every 5 seconds).
In the tab that says outputs we need add a new output with the parameters like so:
Don't worry if you havent got a monitor_counter just yet because you are going to name the math_counter you placed before to that name.
Go ahead and open up your math counter. In the name property call it 'monitor_counter'. Just to make this a bit easier, instead of starting the math_counter at a 0 value, we are going to set it so then the start value is at '1' to match the numbers of the cameras.
Inside the outputs we need to add a couple of things. First of all we need to set the math_counter so when it reaches its' max value it resets back to 1.
Add another output and enter these values:
What this essentially does is parse the current value of the math_counter to the logic_case (monitor_case) so then it can decide what camera to show on the monitor. Again; don't worry if you haven't named your logic_case yet. We are going to do that now.
Inside the logic_cases' properties enter these few things:
Make sure that you only enter different numbers on each line (e.g. Case01 and Case02 both cannot be 1) so then it can correctly decide which camera to pick.
Inside the output tab click add and type in:
If you haven't names your monitor, make sure you enter a name for these outputs.
Anyway that is it! Compile your map and see the monitor change to the different cameras!