Effect flags (GoldSrc): Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
 
(13 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{tabs|Effect flags|goldsrc=1|source=1}}{{stub}}
{{LanguageBar}}
{{TabsBar|main=gs|base=Effect flags}}
{{stub}}
A set of bitflags for configuring client-side visual effects.
A set of bitflags for configuring client-side visual effects.


Line 16: Line 18:
#define EF_FIBERCAMERA 1024// fiber camera
#define EF_FIBERCAMERA 1024// fiber camera
</source>
</source>
{{fl|1|EF_BRIGHTFIELD|The "pollen" particles that appear when a [[monster]] is placed inside a wall.}}
{{fl|1|[[EF_BRIGHTFIELD (GoldSrc)|EF_BRIGHTFIELD]]|The [https://valvedev.info/guides/properly-avoiding-the-pollen-sprites-in-half-life/ "pollen" or "firefly" particles] that appear when a [[monster]] is placed inside a wall.}}
{{fl|2|EF_MUZZLEFLASH|A single-frame [[elight]] with the RGB(255,192,64) at [[attachment]] 0.}}
{{fl|2|[[EF_MUZZLEFLASH (GoldSrc)|EF_MUZZLEFLASH]]|A single-frame [[elight]] with the RGB(255,192,64) at [[attachment]] 0.}}
{{fl|4|EF_BRIGHTLIGHT|A bright [[dlight]] of RGB(250,250,250) at entity origin.}}
{{fl|4|[[EF_BRIGHTLIGHT (GoldSrc)|EF_BRIGHTLIGHT]]|Emits a [[dlight]] of RGB(250,250,250) and a random radius of 400 to 431 from the origin.}}
{{fl|8|EF_DIMLIGHT|A dim [[dlight]] of RGB(100,100,100) at entity origin.}}
{{fl|8|[[EF_DIMLIGHT (GoldSrc)|EF_DIMLIGHT]]|Emits a [[dlight]] of RGB(100,100,100) and a random radius of 200 to 231 from the origin.}}
{{fl|16|EF_INVLIGHT|Get MDL lighting from the ceiling instead of from the floor. This has no effect if the model is currently receiving sunlight from a [[light_environment (GoldSrc)|light_environment]]. Keep in mind that only world brushes (including [[func_group]] and [[func_detail (GoldSrc)|func_detail]]) contribute to MDL lighting.}}
{{fl|16|[[EF_INVLIGHT (GoldSrc)|EF_INVLIGHT]]|Get MDL lighting from the ceiling instead of from the floor. This has no effect if the model is currently receiving sunlight from a [[light_environment (GoldSrc)|light_environment]]. Keep in mind that only world brushes (including [[func_group]] and [[func_detail (GoldSrc)|func_detail]]) contribute to MDL lighting.}}
{{fl|32|EF_NOINTERP|Don't [[interpolation|interpolate]] on the next frame.{{warning|Causes crashes.}}}}
{{fl|32|[[EF_NOINTERP (GoldSrc)|EF_NOINTERP]]|Don't [[interpolation|interpolate]] on the next frame.}}
{{fl|64|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.}}
:{{bug|hidetested=1|Causes crashes{{cn}}.}}
:If used on a model entity using a [[SPR]], allows framerates above 10 Hz.
{{fl|64|[[EF_LIGHT (GoldSrc)|EF_LIGHT]]|Emits a [[dlight]] of RGB(100,100,100) and a radius of 200 from the entity origin, and render {{file|sprites/animglow01|spr}} using glow rendermode if present.}}  
{{fl|128|[[EF_NODRAW (GoldSrc)|EF_NODRAW]]|Entity is completely ignored by the client, and stops drawing the entity.}}
:{{modernImportant|Can cause prediction errors if a player proceeds to collide with it on the server.}}
{{modernConfirm|Do flags 256, 512, and 1024 work in all games, or only {{czds|2|nt=3}}?}}


== FGD entries ==
== FGD entries ==
These can either be added individually to a entity as needed, or made a BaseClass at the top of the FGD to be inherited.
These can either be added individually to an entity as needed, or made a BaseClass at the top of the FGD to be inherited. Note that several entities override this keyvalue; for example, the  {{codelink|MonsterInit()}} run as part of most [[monster]]s' spawn function resets this key to 0, disabling any user-set values.
=== {{jack|2}} ===
=== {{jack|2}} ===
<source lang=c>
<source lang=c>
Line 47: Line 54:
<source lang=c>
<source lang=c>
effects(flags) : "Effect Flags"  =
effects(flags) : "Effect Flags"  =
[
0 : "0 - None"
1 : "1 - EF_BRIGHTFIELD" : "swirling cloud of particles"
2 : "2 - EF_MUZZLEFLASH" : "single frame ELIGHT on entity attachment 0"
4 : "4 - EF_BRIGHTLIGHT" : "DLIGHT centered at entity origin"
8 : "8 - EF_DIMLIGHT" : "player flashlight"
16 : "16 - EF_INVLIGHT" : "get lighting from ceiling, instead of from floor"
32 : "32 - EF_NOINTERP" : "don't interpolate the next frame"
64 : "64 - EF_LIGHT" : "rocket flare glow sprite"
128 : "128 - EF_NODRAW" : "don't draw entity"
256 : "256 - EF_NIGHTVISION" : "player nightvision"
512 : "512 - EF_SNIPERLASER" : "sniper laser effect"
1024 : "1024 - EF_FIBERCAMERA" : "fiber camera"
]
</source>
=== Other ===
<source lang=c>
effects(choices) : "Effect Flags" : 0 : "For configuring visual effects. If you want to combine effects, simply type in the sum of the effect numbers, e.g., '72' for 64+8." =
[
[
0 : "0 - None"
0 : "0 - None"
Line 52: Line 78:
2 : "2 - EF_MUZZLEFLASH: single frame ELIGHT on entity attachment 0"
2 : "2 - EF_MUZZLEFLASH: single frame ELIGHT on entity attachment 0"
4 : "4 - EF_BRIGHTLIGHT: DLIGHT centered at entity origin"
4 : "4 - EF_BRIGHTLIGHT: DLIGHT centered at entity origin"
8 : "8 - EF_DIMLIGHT : player flashlight"
8 : "8 - EF_DIMLIGHT: player flashlight"
16 : "16 - EF_INVLIGHT : get lighting from ceiling, instead of from floor"
16 : "16 - EF_INVLIGHT: get lighting from ceiling, instead of from floor"
32 : "32 - EF_NOINTERP : don't interpolate the next frame"
32 : "32 - EF_NOINTERP: don't interpolate the next frame"
64 : "64 - EF_LIGHT : rocket flare glow sprite"
64 : "64 - EF_LIGHT: rocket flare glow sprite"
128 : "128 - EF_NODRAW : don't draw entity"
128 : "128 - EF_NODRAW: don't draw entity"
256 : "256 - EF_NIGHTVISION : player nightvision"
256 : "256 - EF_NIGHTVISION: player nightvision"
512 : "512 - EF_SNIPERLASER : sniper laser effect"
512 : "512 - EF_SNIPERLASER: sniper laser effect"
1024 : "1024 - EF_FIBERCAMERA : fiber camera"
1024 : "1024 - EF_FIBERCAMERA: fiber camera"
]
]
</source>
</source>
== External links ==
* {{twhl|Entity Attribute: Entity Effects}}


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

Latest revision as of 16:01, 4 June 2025

English (en)Translate (Translate)

Stub

This article or section is a stub. You can help by expanding it.

A set of bitflags for configuring client-side visual effects.

Flags

#define	EF_BRIGHTFIELD			1	// swirling cloud of particles
#define	EF_MUZZLEFLASH 			2	// single frame ELIGHT on entity attachment 0
#define	EF_BRIGHTLIGHT 			4	// DLIGHT centered at entity origin
#define	EF_DIMLIGHT 			8	// player flashlight
#define EF_INVLIGHT				16	// get lighting from ceiling
#define EF_NOINTERP				32	// don't interpolate the next frame
#define EF_LIGHT				64	// rocket flare glow sprite
#define EF_NODRAW				128	// don't draw entity
#define EF_NIGHTVISION			256 // player nightvision
#define EF_SNIPERLASER			512 // sniper laser effect
#define EF_FIBERCAMERA			1024// fiber camera
EF_BRIGHTFIELD : [1]
The "pollen" or "firefly" particles that appear when a monster is placed inside a wall.
EF_MUZZLEFLASH : [2]
A single-frame elight with the RGB(255,192,64) at attachment 0.
EF_BRIGHTLIGHT : [4]
Emits a dlight of RGB(250,250,250) and a random radius of 400 to 431 from the origin.
EF_DIMLIGHT : [8]
Emits a dlight of RGB(100,100,100) and a random radius of 200 to 231 from the origin.
EF_INVLIGHT : [16]
Get MDL lighting from the ceiling instead of from the floor. This has no effect if the model is currently receiving sunlight from a light_environment. Keep in mind that only world brushes (including func_group and func_detail) contribute to MDL lighting.
EF_NOINTERP : [32]
Don't interpolate on the next frame.
Icon-Bug.pngBug:Causes crashes[citation needed].
If used on a model entity using a SPR, allows framerates above 10 Hz.
EF_LIGHT : [64]
Emits a dlight of RGB(100,100,100) and a radius of 200 from the entity origin, and render 🖿sprites/animglow01.spr using glow rendermode if present.
EF_NODRAW : [128]
Entity is completely ignored by the client, and stops drawing the entity.
Icon-Important.pngImportant:Can cause prediction errors if a player proceeds to collide with it on the server.
Confirm:Do flags 256, 512, and 1024 work in all games, or only Condition Zero Deleted Scenes Deleted Scenes?

FGD entries

These can either be added individually to an entity as needed, or made a BaseClass at the top of the FGD to be inherited. Note that several entities override this keyvalue; for example, the MonsterInit() run as part of most monsters' spawn function resets this key to 0, disabling any user-set values.

J.A.C.K. J.A.C.K.

effects(choices) : "Effect Flags" : 0 : "For configuring visual effects. If you want to combine effects, simply type in the sum of the effect numbers, e.g., '72' for 64+8." =
[
	0 : "0 - None"
	1 : "1 - EF_BRIGHTFIELD" : "swirling cloud of particles"
	2 : "2 - EF_MUZZLEFLASH" : "single frame ELIGHT on entity attachment 0"
	4 : "4 - EF_BRIGHTLIGHT" : "DLIGHT centered at entity origin"
	8 : "8 - EF_DIMLIGHT" : "player flashlight"
	16 : "16 - EF_INVLIGHT" : "get lighting from ceiling, instead of from floor"
	32 : "32 - EF_NOINTERP" : "don't interpolate the next frame"
	64 : "64 - EF_LIGHT" : "rocket flare glow sprite"
	128 : "128 - EF_NODRAW" : "don't draw entity"
	256 : "256 - EF_NIGHTVISION" : "player nightvision"
	512 : "512 - EF_SNIPERLASER" : "sniper laser effect"
	1024 : "1024 - EF_FIBERCAMERA" : "fiber camera"
]

TrenchBroom TrenchBroom

effects(flags) : "Effect Flags"  =
[
	0 : "0 - None"
	1 : "1 - EF_BRIGHTFIELD" : "swirling cloud of particles"
	2 : "2 - EF_MUZZLEFLASH" : "single frame ELIGHT on entity attachment 0"
	4 : "4 - EF_BRIGHTLIGHT" : "DLIGHT centered at entity origin"
	8 : "8 - EF_DIMLIGHT" : "player flashlight"
	16 : "16 - EF_INVLIGHT" : "get lighting from ceiling, instead of from floor"
	32 : "32 - EF_NOINTERP" : "don't interpolate the next frame"
	64 : "64 - EF_LIGHT" : "rocket flare glow sprite"
	128 : "128 - EF_NODRAW" : "don't draw entity"
	256 : "256 - EF_NIGHTVISION" : "player nightvision"
	512 : "512 - EF_SNIPERLASER" : "sniper laser effect"
	1024 : "1024 - EF_FIBERCAMERA" : "fiber camera"
]

Other

effects(choices) : "Effect Flags" : 0 : "For configuring visual effects. If you want to combine effects, simply type in the sum of the effect numbers, e.g., '72' for 64+8." =
[
	0 : "0 - None"
	1 : "1 - EF_BRIGHTFIELD: swirling cloud of particles"
	2 : "2 - EF_MUZZLEFLASH: single frame ELIGHT on entity attachment 0"
	4 : "4 - EF_BRIGHTLIGHT: DLIGHT centered at entity origin"
	8 : "8 - EF_DIMLIGHT: player flashlight"
	16 : "16 - EF_INVLIGHT: get lighting from ceiling, instead of from floor"
	32 : "32 - EF_NOINTERP: don't interpolate the next frame"
	64 : "64 - EF_LIGHT: rocket flare glow sprite"
	128 : "128 - EF_NODRAW: don't draw entity"
	256 : "256 - EF_NIGHTVISION: player nightvision"
	512 : "512 - EF_SNIPERLASER: sniper laser effect"
	1024 : "1024 - EF_FIBERCAMERA: fiber camera"
]

External links