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
string sprite Sprite to display (alpha transparency)
float height Height at which sprites disappear
uint8 count Number of sprites to spawn
float speed Upward speed.

API Function

void Bubbles(const Vector& in vecMins, const Vector& in vecMaxs, int iCount)

NetworkMessage Function

void te_bubbles(Vector mins, Vector maxs, 
    string sprite="sprites/bubble.spr", float height=128.0f, 
    uint8 count=16, float speed=16.0f, 
    NetworkMessageDest msgType=MSG_BROADCAST, edict_t@ dest=null)
{
    NetworkMessage m(msgType, NetworkMessages::SVC_TEMPENTITY, dest);
    m.WriteByte(TE_BUBBLES);
    m.WriteCoord(mins.x);
    m.WriteCoord(mins.y);
    m.WriteCoord(mins.z);
    m.WriteCoord(maxs.x);
    m.WriteCoord(maxs.y);
    m.WriteCoord(maxs.z);
    m.WriteCoord(height);
    m.WriteShort(g_EngineFuncs.ModelIndex(sprite));
    m.WriteByte(count);
    m.WriteCoord(speed);
    m.End();
}

Clone this wiki locally