Skip to content

TE_GLOWSPRITE

wootguy edited this page Nov 29, 2025 · 4 revisions

A sprite that slowly fades out after its life expires. Not animated.

Parameters

Type Name Description
Vector pos Center point for the effect
const char* sprite Non-animated Sprite (additive)
uint8_t life Time to wait before fading out (seconds * 0.1)
uint8_t scale Sprite scale * 0.1
uint8_t alpha Sprite opacity

Example Usage

void te_glowsprite(Vector pos, const char* sprite="sprites/glow01.spr", 
    uint8_t life=1, uint8_t scale=10, uint8_t alpha=255, 
    int msgType=MSG_BROADCAST, edict_t* dest=NULL)
{
    MESSAGE_BEGIN(msgType, SVC_TEMPENTITY, dest);
    WRITE_BYTE(TE_GLOWSPRITE);
    WRITE_COORD(pos.x);
    WRITE_COORD(pos.y);
    WRITE_COORD(pos.z);
    WRITE_SHORT(MODEL_INDEX(sprite));
    WRITE_BYTE(life);
    WRITE_BYTE(scale);
    WRITE_BYTE(alpha);
    MESSAGE_END();
}

Clone this wiki locally