Effect flags: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
(Added some more notes, and edited a bit of information about some of the flags.)
m (→‎Flags: We have pages for some of these...)
Line 11: Line 11:
== Flags ==
== Flags ==


;1 - <code>EF_BONEMERGE</code>
;1 - <code>[[EF_BONEMERGE]]</code>
:Merges bones of names shared with a parent entity to the position and direction of the parent's.
:Merges bones of names shared with a parent entity to the position and direction of the parent's.
;2 - <code>EF_BRIGHTLIGHT</code>
;2 - <code>[[EF_BRIGHTLIGHT]]</code>
:Emits a dynamic light of RGB(250,250,250) and a random radius of 400 to 431 from the origin.
:Emits a dynamic light of RGB(250,250,250) and a random radius of 400 to 431 from the origin.
;4 - <code>EF_DIMLIGHT</code>
;4 - <code>[[EF_DIMLIGHT]]</code>
:Emits a dynamic light of RGB(100,100,100) and a random radius of 200 to 231 from the origin.
:Emits a dynamic light of RGB(100,100,100) and a random radius of 200 to 231 from the origin.
;8 - <code>EF_NOINTERP</code>
;8 - <code>EF_NOINTERP</code>
:Don't [[interpolate]] on the next frame.
:Don't [[interpolate]] on the next frame.
{{warning|Causes crashes.}}
{{warning|Causes crashes.}}
;16 - <code>EF_NOSHADOW</code>
;16 - <code>[[EF_NOSHADOW]]</code>
:Don't create a render-to-texture shadow, does not affect projected texture shadows.
:Don't create a render-to-texture shadow, does not affect projected texture shadows.
{{note|Same as disableshadows 1.}}
{{note|Same as disableshadows 1.}}
;32 - <code>EF_NODRAW</code>
;32 - <code>[[EF_NODRAW]]</code>
:Entity is completely ignored by the client, and stops drawing the entity. Can cause prediction errors if a player proceeds to collide with it on the server, use <code>rendermode 10</code> instead if this is a problem.
:Entity is completely ignored by the client, and stops drawing the entity. Can cause prediction errors if a player proceeds to collide with it on the server, use <code>rendermode 10</code> instead if this is a problem.
;64 - <code>EF_NORECEIVESHADOW </code>
;64 - <code>EF_NORECEIVESHADOW </code>
:Don't receive dynamic shadows.
:Don't receive dynamic shadows.
{{note|Same as disablereceiveshadows 1.}}
{{note|Same as disablereceiveshadows 1.}}
;128 - <code>EF_BONEMERGE_FASTCULL</code>
;128 - <code>[[EF_BONEMERGE_FASTCULL]]</code>
:For use with <code>EF_BONEMERGE</code>. If set, the entity will use its parent's origin to calculate whether it is visible; if not set, it will set up parent's bones every frame even if the parent is not in the [[PVS]].
:For use with <code>[[EF_BONEMERGE]]</code>. If set, the entity will use its parent's origin to calculate whether it is visible; if not set, it will set up parent's bones every frame even if the parent is not in the [[PVS]].
;256 - <code>EF_ITEM_BLINK</code>
;256 - <code>[[EF_ITEM_BLINK]]</code>
:Blink an item so that the user notices it. Added for original Xbox, and really not subtle.
:Blink an item so that the user notices it. Added for original Xbox, and really not subtle.
;512 - <code>EF_PARENT_ANIMATES</code>
;512 - <code>[[EF_PARENT_ANIMATES]]</code>
:Assume that the [[parent]] entity is always animating. Causes it to realign every frame.
:Assume that the [[parent]] entity is always animating. Causes it to realign every frame.
{{Note|Does not function with the "effects" keyvalue.}}
{{Note|Does not function with the "effects" keyvalue.}}
Line 39: Line 39:
{{note|Same as drawinfastreflection 1.}}
{{note|Same as drawinfastreflection 1.}}
;2048 - <code>EF_NOSHADOWDEPTH</code>
;2048 - <code>EF_NOSHADOWDEPTH</code>
: Stops [[env_cascade_lighting|env_cascade_light]] from making shadows for this entity.
: Stops [[env_cascade_lighting]] and [[env_projected_texture]] from making shadows for this entity.
{{note|Same as disableshadowdepth 1.}}
{{note|Same as disableshadowdepth 1.}}
;4096 - <code>EF_NOFLASHLIGHT</code>
;4096 - <code>EF_NOFLASHLIGHT</code>

Revision as of 19:57, 28 June 2018

For configuring client-side visual effects.

Usage from Hammer

Effect flags can be configured from Hammer. To do so turn off SmartEdit and add a new keyvalue pair:

effects <n>

'n' is the sum total of the flags you want to use. For example, 66 would mean EF_BRIGHTLIGHT and EF_NORECEIVESHADOW.

Flags

1 - EF_BONEMERGE
Merges bones of names shared with a parent entity to the position and direction of the parent's.
2 - EF_BRIGHTLIGHT
Emits a dynamic light of RGB(250,250,250) and a random radius of 400 to 431 from the origin.
4 - EF_DIMLIGHT
Emits a dynamic light of RGB(100,100,100) and a random radius of 200 to 231 from the origin.
8 - EF_NOINTERP
Don't interpolate on the next frame.
Warning.pngWarning:Causes crashes.
16 - EF_NOSHADOW
Don't create a render-to-texture shadow, does not affect projected texture shadows.
Note.pngNote:Same as disableshadows 1.
32 - EF_NODRAW
Entity is completely ignored by the client, and stops drawing the entity. Can cause prediction errors if a player proceeds to collide with it on the server, use rendermode 10 instead if this is a problem.
64 - EF_NORECEIVESHADOW
Don't receive dynamic shadows.
Note.pngNote:Same as disablereceiveshadows 1.
128 - EF_BONEMERGE_FASTCULL
For use with EF_BONEMERGE. If set, the entity will use its parent's origin to calculate whether it is visible; if not set, it will set up parent's bones every frame even if the parent is not in the PVS.
256 - EF_ITEM_BLINK
Blink an item so that the user notices it. Added for original Xbox, and really not subtle.
512 - EF_PARENT_ANIMATES
Assume that the parent entity is always animating. Causes it to realign every frame.
Note.pngNote:Does not function with the "effects" keyvalue.
1024 - EF_MARKED_FOR_FAST_REFLECTION
Marks the entity to render in fast water reflections.
Note.pngNote:Same as drawinfastreflection 1.
2048 - EF_NOSHADOWDEPTH
Stops env_cascade_lighting and env_projected_texture from making shadows for this entity.
Note.pngNote:Same as disableshadowdepth 1.
4096 - EF_NOFLASHLIGHT
Stops projected textures from making shadows for this entity.
Note.pngNote:Same as disableflashlight 1.

Functions

  • AddEFlags() / SetEFlags()
  • RemoveEFlags()
  • GetEFlags()
  • IsEFlagSet()

External links