This article's documentation is for anything that uses the Source engine. Click here for more information.
This article's documentation is for Source 2. Click here for more information.

func_monitor

From Valve Developer Community
Jump to: navigation, search
Info.png
This entity is not in the Counter-Strike: Source FGD by default .
See below for instructions on making it available.
class hierarchy
CFuncMonitor defined in Func_Monitor.cpp
CFuncBrush
CBaseEntity

func_monitor is a brush entity available in all Source Source and Source 2 Source 2 games except Left 4 Dead series Left 4 Dead series. It displays a real-time scene captured from a point_camera somewhere else in the world.

In Source Source for the entity to work, the surface(s) on which the camera view will be displayed must have a material with $basetexture _rt_Camera. Stock materials that work are dev\dev_combinemonitor* and dev\dev_tvmonitor*.

A broadcast from Dr. Breen.
Icon-Bug.pngBug:Cameras may fail to network properly in multiplayer. See below for a code fix. Fixed in Team Fortress 2
Note.pngNote:Unless you set up multiple render textures in your mod's binaries, only one point_camera can be rendered at any one time. The first camera in the map will appear on all monitors.
Code: To enable monitors in your non-HL2 mod, you must:
  • Include the entity's client .cpp file (found in \client\hl2\).
  • Include the entity's server .cpp and .h files (found in \server\hl2\).
  • #define USE_MONITORS at the top of \client\viewrender.cpp and \client\view.cpp.
  • Fix a multiplayer bug in CPointCamera::CPointCamera() by setting m_bActive to true.

Keyvalues


Targetname:
Name (targetname) <string>
The targetname that other entities refer to this entity by.
Camera name (target) <targetname>
The camera to render.

Inputs

SetCamera <targetname>
Sets the camera to use for this monitor. Takes the name of a point_camera entity in the map.
Toggle
Enables the entity if it is disabled, and disables if it is enabled.
Enable
Make the entity visible and solid.
Disable
Make the entity invisible and non-solid.

See also