Skip to content

TE_BUBBLES

wootguy edited this page Nov 29, 2025 · 4 revisions

Spawns sprites inside of box. Sprites float upwards and disappear once they reach their max height.

Parameters

Type Name Description
Vector mins Bottom-left-back corner of the box
Vector maxs Top-right-front corner of the box
const char* sprite Sprite to display (alpha transparency)
float height Height at which sprites disappear
uint8_t count Number of sprites to spawn
float speed Upward speed.

Example Usage

void te_bubbles(Vector mins, Vector maxs, 
    const char* sprite="sprites/bubble.spr", float height=128.0f, 
    uint8_t count=16, float speed=16.0f, 
    int msgType=MSG_BROADCAST, edict_t* dest=NULL)
{
    MESSAGE_BEGIN(msgType, SVC_TEMPENTITY, dest);
    WRITE_BYTE(TE_BUBBLES);
    WRITE_COORD(mins.x);
    WRITE_COORD(mins.y);
    WRITE_COORD(mins.z);
    WRITE_COORD(maxs.x);
    WRITE_COORD(maxs.y);
    WRITE_COORD(maxs.z);
    WRITE_COORD(height);
    WRITE_SHORT(MODEL_INDEX(sprite));
    WRITE_BYTE(count);
    WRITE_COORD(speed);
    MESSAGE_END();
}

Clone this wiki locally