From Valve Developer Community
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
Note: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
- Include the entity's server .cpp and .h files (found in
#define USE_MONITORSat the top of
- Fix a multiplayer bug in
- Minimum Light Level
- The minimum level of ambient light that hits this brush.
- Used to control the solidity/collision of these brushes.
- 0: Toggle - The solidity can be toggled together with its visibility.
- 1: Never Solid
- 2: Always Solid
- Solid BSP
- Set this if this brush is in hierarchy with a moving object of some kind, and the player can stand on this brush.
- NPC class excluded from collisions
- If an NPC classname (i.e. npc_zombie) is specified here, NPCs of that type won't collide with these brushes.
- Invert NPC class exclusion
- If set, then the excluded NPC class will consider this brush solid, and all other NPC classes will consider it non-solid.
- Configures whether this brush casts lightmap shadows.
- Start Disabled (StartDisabled)
- Stay dormant until activated (probably with the
Enableinput).Tip:If Solidity is Toggle, disabling func_brush also makes it non-solid.
- Origin (X Y Z)
- The position of this entity's center in the world. Rotating entities typically rotate around their origin.
- Disable shadows
- Prevent the entity from creating cheap render-to-texture shadows. Does not affect shadow mapping.
- Disable ShadowDepth
<boolean>(New with Portal 2)
- Used to disable rendering into shadow depth (for projected textures) for this entity.
- Projected Texture Cache
<choices>(New with Portal 2)
- Used to hint projected texture system whether it is sufficient to cache shadow volume of this entity or to force render it every frame instead.
- 0 : Default
- 1 : No cache - render every frame
- 2 : Cache it - render only once
- Specifies a movement parent. An entity will maintain its initial offset from its parent. An attachment point can be added to the end of the name, separated by a comma. Warning: In Counter-Strike: Source
- Render Mode (rendermode)
- Set a non-standard rendering mode on this entity.
- Render FX / Transparency (0 - 255) (renderamt)
- Transparency amount, requires a Render Mode other than Normal. 0 is invisible, 255 is fully visible.
- Render Color (R G B) (rendercolor)
- Color tint.
- Disable Receiving Shadows (disablereceiveshadows)
- Prevent the entity from receiving shadows on itself.
- Render FX (renderfx)
- Preset pattern of appearance effects.
- Global Entity Name
- Name by which this entity is linked to another entity in a different map. When the player transitions to a new map, entities in the new map with globalnames matching entities in the previous map will have the previous map's state copied over their state.
- Entity Scripts
<scriptlist>(New with Left 4 Dead 2)
- Space delimited list of VScript files (without file extension) that are executed after all entities have spawned. The scripts are all executed in the same script scope, later ones overwriting any identical variables and functions.
- Script think function
<string>(New with Left 4 Dead 2)
- Name of a function in this entity's script which will be called automatically every 100 milliseconds (ten times a second) for the duration of the script. It can be used to create timers or to simulate autonomous behavior. The return value (if present) will set the time until the next call. Note:Try to avoid expensive operations in this function, as it may cause performance problems.
- Camera name
- The camera to render.
- Sets the brush's alpha value.
SetExcluded(New with Source 2007)
- Change the NPC class that does not collide with the brush.
SetInvert(New with Source 2007)
- Whether to reverse the NPC class exclusion rule
- Enable/disable this entity from performing its task. It might also disappear from view.
- Move with this entity. See Entity Hierarchy (parenting).
- Change this entity to attach to a specific attachment point on its parent. The entity will teleport so that the position of its root bone matches that of the attachment. Entities must be parented before being sent this input.
- As above, but without teleporting. The entity retains its position relative to the attachment at the time of the input being received.
- Removes this entity from the the movement hierarchy, leaving it free to move independently.
- Sets the entity's transparency to a number from 0 (invisible) to 255 (fully visible). Requires the entity to have its Render Mode (rendermode) set to a number other than
- Sets an RGB color for the entity.
- Removes this entity and any entities parented to it from the world.
- Functions the same as
Kill, although entities with a large number of children are killed marginally faster.
- Evaluates a keyvalue/output on this entity. It can be potentially very dangerous, use with care.
<output name> <targetname>:<inputname>:<parameter>:<delay>:<max times to fire, -1 means infinite>
- Fire the
OnUseroutputs; see User Inputs and Outputs.
- Same as a player invoking +use; may not do anything. Can also be invoked by creating an output that does not specify an input.
This input is not included in Valve's FGDs.
<script>(New with Left 4 Dead 2)
- Execute a VScript file from disk, without file extension. The script contents are merged with the script scope of the receiving entity.
<string>(New with Left 4 Dead 2)
- Execute a string of VScript source code in the scope of the entity receiving the input. String quotation may be needed when fired via console. Bug: In , the code is executed in the script scope of the entity that fires the output, not the one receiving the input.Warning: Never try to pass string parameters to a script function with this input. It will corrupt the VMF structure because of the nested quotation marks, which then must be removed manually with a text editor.
<string>(New with Left 4 Dead 2) !FGD
- Execute a VScript function in the scope of the receiving entity. Note:This input is missing from some games FGD files.
<origin>(New with Alien Swarm) !FGD
- Set this entity's origin in the map. Note:This input is missing from some games FGD files.
<angles>(New with Alien Swarm) !FGD
- Set this entity's angles in the map. Note:This input is missing from some games FGD files.
- Enables the entity if it is disabled, and disables if it is enabled.
- Make the entity visible and solid.
- Make the entity invisible and non-solid.
- These Outputs each fire in response to the firing of the like-numbered
FireUser4Input; see User Inputs and Outputs.
OnKilled(New with Left 4 Dead)
- This Output fires when the entity is killed and removed from the game.