Effect flags: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
No edit summary
No edit summary
Line 1: Line 1:
For configuring client-side visual effects. Not available on the server.
For configuring client-side visual effects. Not available on the server.
== Usage from Hammer ==
Effect flags can be configured from Hammer. To do so turn off [[SmartEdit]] and add a new keyvalue pair:
effects <n>
'<code>n</code>' is the sum total of the flags you want to use. For example, 66 would mean <code>EF_BRIGHTLIGHT</code> and <code>EF_NORECEIVESHADOW</code>.


== Flags ==
== Flags ==


;[[EF_BONEMERGE]]
;1 - EF_BONEMERGE
:Performs [[bone merge]] on client side.
:Merges bones of names shared with a parent entity to the position and direction of the parent's.
;[[EF_BRIGHTLIGHT]]
;2 - EF_BRIGHTLIGHT
:Emit a [[DLIGHT]] from [[origin]].
:Emits a dynamic light of RGB(250,250,250) and a random radius of 400 to 431 from the origin.
;[[EF_DIMLIGHT]]
;4 - EF_DIMLIGHT
:Player flashlight.
:Emits a dynamic light of RGB(100,100,100) and a random radius of 200 to 231 from the origin.
;[[EF_NOINTERP]]
;8 - EF_NOINTERP
:Don't [[interpolate]] the next frame.
:Don't [[interpolate]] the next frame.
;[[EF_NOSHADOW]]
;16 - EF_NOSHADOW
:Don't cast a shadow. {{todo|Does this still apply to shadow maps?}}
:Don't cast a shadow. {{todo|Does this also apply to shadow maps?}}
;[[EF_NODRAW]]
;32 - EF_NODRAW
:Don't transmit the entity to the client.
:Don't transmit the entity to the client. Can cause prediction errors if a player proceeds to collide with it.
;[[EF_NORECEIVESHADOW]]
;64 - EF_NORECEIVESHADOW
:Don't receive shadows.
:Don't receive dynamic shadows.
;[[EF_BONEMERGE_FASTCULL]]
;128 - EF_BONEMERGE_FASTCULL
:For use with EF_BONEMERGE. If this is set, then it places this ent's origin at its parent and uses the parent's [[bbox]] + the max extents of the [[aiment]]. Otherwise, it sets up the parent's bones every frame to figure out where to place the aiment, which is inefficient because it'll setup the parent's bones even if the parent is not in the [[PVS]].
: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 if the parent is not in the [[PVS]].
;[[EF_ITEM_BLINK]]
;256 - EF_ITEM_BLINK
:Blink an item so that the user notices it.
:Blink an item so that the user notices it. Added for Xbox 1, and really not very subtle.
;[[EF_PARENT_ANIMATES]]
;512 - EF_PARENT_ANIMATES
:Always assume that the [[parent]] entity is animating.
:Assume that the [[parent]] entity is always animating. Causes it to realign every frame.  


[[Category:Flags]]
[[Category:Flags]]

Revision as of 08:21, 4 July 2008

For configuring client-side visual effects. Not available on the server.

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 the next frame.
16 - EF_NOSHADOW
Don't cast a shadow.
Todo: Does this also apply to shadow maps?
32 - EF_NODRAW
Don't transmit the entity to the client. Can cause prediction errors if a player proceeds to collide with it.
64 - EF_NORECEIVESHADOW
Don't receive dynamic shadows.
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 if the parent is not in the PVS.
256 - EF_ITEM_BLINK
Blink an item so that the user notices it. Added for Xbox 1, and really not very subtle.
512 - EF_PARENT_ANIMATES
Assume that the parent entity is always animating. Causes it to realign every frame.