Skip to content

TE_SPRITE

wootguy edited this page Nov 29, 2025 · 4 revisions

An animated sprite. Plays once.

Parameters

Type Name Description
Vector pos Center point for the effect
const char* sprite Animated sprite (additive)
uint8_t scale Sprite scale * 0.1
uint8_t alpha Sprite opacity

Example Usage

void te_sprite(Vector pos, const char* sprite="sprites/zerogxplode.spr", 
    uint8_t scale=10, uint8_t alpha=200, 
    int msgType=MSG_BROADCAST, edict_t* dest=NULL)
{
    MESSAGE_BEGIN(msgType, SVC_TEMPENTITY, dest);
    WRITE_BYTE(TE_SPRITE);
    WRITE_COORD(pos.x);
    WRITE_COORD(pos.y);
    WRITE_COORD(pos.z);
    WRITE_SHORT(MODEL_INDEX(sprite));
    WRITE_BYTE(scale);
    WRITE_BYTE(alpha);
    MESSAGE_END();
}

Clone this wiki locally