Env render (Half-Life: Source): Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
(Created page with "{{tabsBar|main=hls|base=env_render}} {{CD|CRenderFxManager|file1=hl1_ents.cpp}} {{this is a|logical entity|name=env_render|game=Half-Life: Source}} This entity allows you to change the rendering properties of most of the visible entities in the game (monsters, func_walls etc.), while the map is running. The four render properties of the env_render will be copied to its target, unless disabled with the applicable spawnflag. {{tip|{{mono|renderamt}} and {{mono|re...")
 
(Better spawnflag names)
 
(7 intermediate revisions by the same user not shown)
Line 2: Line 2:
{{CD|CRenderFxManager|file1=hl1_ents.cpp}}
{{CD|CRenderFxManager|file1=hl1_ents.cpp}}
{{this is a|logical entity|name=env_render|game=Half-Life: Source}}  
{{this is a|logical entity|name=env_render|game=Half-Life: Source}}  
This entity allows you to change the rendering properties of most of the visible entities in the game ([[monster]]s, [[func_wall]]s etc.), while the map is running. The four render properties of the env_render will be copied to its target, unless disabled with the applicable spawnflag.
This entity allows you to change the rendering properties of most of the visible entities in the game ([[monster]]s, {{mono|[[func_wall]]s}}, etc.), while the map is running. The four render properties of the env_render will be copied to its target, unless disabled with the applicable spawnflag.


{{tip|{{mono|renderamt}} and {{mono|rendercolor}} can be directly assigned with an entity's {{mono|Alpha}} and {{mono|Color}} [[inputs]], which saves an [[edict]] (as env_render is not a server-only entity).}}
{{tip|{{mono|renderamt}} and {{mono|rendercolor}} can be directly assigned with an entity's {{mono|Alpha}} and {{mono|Color}} [[inputs]], which saves an [[edict]] (as env_render is not a server-only entity).{{confirm|[[AddOutput]]ing may work for renderfx and rendermode.}} }}


== Keyvalues ==
== Keyvalues ==
Line 12: Line 12:


== Flags ==
== Flags ==
{{fl|1|No renderfx}}
{{fl|1|Don't copy renderfx}}
{{fl|2|No renderamt}}
{{fl|2|Don't copy renderamt}}
{{fl|4|No rendermode}}
{{fl|4|Don't copy rendermode}}
{{fl|8|No rendercolor}}
{{fl|8|Don't copy rendercolor}}


== Inputs ==
== Inputs ==
{{i|Activate|Copy this entity's render properties to the target entity.}}
{{I|[[Use]] / Activate|param=void|Copy this entity's render properties to the target entity.}}
 
== FGD Code ==
<syntaxhighlight lang="d">
@PointClass base(Targetname, RenderFields) size(-16 -16 -16, 16 16 16) color(100 100 0) line(100 100 0, targetname, target) = env_render : "Render Controls. All of this entity's render properties will be copied to the target, unless disabled with applicable Spawnflags."
[
target(target_destination) : "Target" : : "Entity to copy render properties to."
spawnflags(flags) =
[
1: "Don't copy renderfx" : 0
2: "Don't copy renderamt" : 0
4: "Don't copy rendermode" : 0
8: "Don't copy rendercolor" : 0
]
 
input Activate(void) : "Copy this entity's render properties to the target entity."
]
</syntaxhighlight>

Latest revision as of 13:14, 23 October 2025

C++ Class hierarchy
CRenderFxManager
CBaseEntity
C++ hl1_ents.cpp

env_render is a logical entity available in Half-Life: Source Half-Life: Source. This entity allows you to change the rendering properties of most of the visible entities in the game (monsters, func_walls, etc.), while the map is running. The four render properties of the env_render will be copied to its target, unless disabled with the applicable spawnflag.

Tip.pngTip:renderamt and rendercolor can be directly assigned with an entity's Alpha and Color inputs, which saves an edict (as env_render is not a server-only entity).
Confirm:AddOutputing may work for renderfx and rendermode.

Keyvalues

Name (targetname) <string>[ Edit ]
The name that other entities refer to this entity by, via Inputs/Outputs or other keyvalues (e.g. parentname or target).
Also displayed in Hammer's 2D views and Entity Report.
See also:  Generic Keyvalues, Inputs and Outputs available to all entities

Target (target) <targetname>
Entity to copy render properties to.

RenderFields:

Render Mode (rendermode) <byte choices>
Set a non-standard rendering mode on this entity.
Render Modes
  • 0: Normal
  • 1: Color
  • 2: Texture
  • 3: Glow
  • 4: Solid/Alphatest Obsolete
  • 5: Additive
  • 6: Removed, does nothing Obsolete
  • 7: Additive Fractional Frame
  • 8: Alpha Add
  • 9: World Space Glow
  • 10: Don't Render
Render FX (renderfx) <byte choices>
Various somewhat legacy alpha effects. See render effects.
Render Amount / Transparency (renderamt) <byte>
Transparency amount, requires a Render Mode other than Normal. 0 is invisible, 255 is fully visible.
Render Color (R G B) (rendercolor) <color255>
Color tint.

Flags

Don't copy renderfx : [1]
Don't copy renderamt : [2]
Don't copy rendermode : [4]
Don't copy rendercolor : [8]

Inputs

Use / Activate <void>
Copy this entity's render properties to the target entity.

FGD Code

@PointClass base(Targetname, RenderFields) size(-16 -16 -16, 16 16 16) color(100 100 0) line(100 100 0, targetname, target) = env_render : "Render Controls. All of this entity's render properties will be copied to the target, unless disabled with applicable Spawnflags."
[
	target(target_destination) : "Target" : : "Entity to copy render properties to."
	spawnflags(flags) =
	[
		1: "Don't copy renderfx" : 0
		2: "Don't copy renderamt" : 0
		4: "Don't copy rendermode" : 0
		8: "Don't copy rendercolor" : 0
	]

	input Activate(void) : "Copy this entity's render properties to the target entity."
]