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 (disableshadows)
- Prevents the entity from creating cheap render-to-texture shadows, or lightmap shadows if the entity is a
prop_static. Does not affect shadow mapping.
- Disable ShadowDepth (disableshadowdepth)
- Used to disable rendering into shadow depth (for projected textures) for this entity.
- Projected Texture Cache (shadowdepthnocache)
- 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 , parenting this entity to another can break your map.
- Render Mode
- Set a non-standard rendering mode on this entity.
- Render FX / Transparency (0 - 255)
- Transparency amount, requires a Render Mode other than Normal. 0 is invisible, 255 is fully visible.
- Render Color (R G B)
- Color tint.
- Disable Receiving Shadows
- Prevent the entity from receiving shadows on itself.
- Render FX
- 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
- 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
- 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.
- Change the NPC class that does not collide with the brush.
- 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 from the world.
- Removes this entity and its children from the world. Note:Entities already remove orphaned children upon being removed, but this input removes all children on the same frame, being marginally faster than
- Adds a keyvalue/output to 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 depending on the entity. Can also be invoked by firing an output that does not specify an input.
- Execute a VScript file from disk, without file extension. The script contents are merged with the script scope of the receiving entity.
- 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.
- Execute a VScript function in the scope of the receiving entity.
- Send this entity to a spot in the map. If the entity is parented to something, it will be offset from the parent by this amount.
- Set this entity's angles.
- 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.
- This output fires when the entity is killed and removed from the game.