Entity Attribute: Entity Effects Last edited 4 months ago2022-03-28 10:47:52 UTC

Entity Effects are the effects that can be applied onto entities. It can be done with the addition of pev->effects in programming or adding effects key value in any entity properties in mapping.


According to the code in const.h, these are the available effects in the vanilla game.
// entity effects
#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
To use these effects, simply add the effect definition in the pev->effects argument. (e.g.: pev->effects = EF_BRIGHTLIGHT)


Mappers can easily add effects key value to use these effects for their entities (Turn off Smart Edit first). The entities must be brushed-tied (usually starts with prefix func_ and must be tied with an origin texture, similar to doors, or else its origin will be the map origin. Example of the effects:
Entity effects #1Entity effects #1
Entity effects #4Entity effects #4
Entity effects #8Entity effects #8
Entity effects #64Entity effects #64
Effect setupEffect setup


Example map


You must log in to post a comment. You can login or register a new account.