Skip to content
wootguy edited this page Nov 29, 2025 · 4 revisions

Draws an axis-aligned box made up of dotted lines.

Parameters

Type Name Description
Vector mins Bottom-left-back corner of the box
Vector maxs Top-right-front corner of the box
uint16_t life Time to display the box (seconds * 0.1)
RGBA c Line RGBA

Example Usage

void te_box(Vector mins, Vector maxs, uint16_t life=16, RGBA c=PURPLE,
    int msgType=MSG_BROADCAST, edict_t* dest=NULL)
{
    MESSAGE_BEGIN(msgType, SVC_TEMPENTITY, dest);
    WRITE_BYTE(TE_BOX);
    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_SHORT(life);
    WRITE_BYTE(c.r);
    WRITE_BYTE(c.g);
    WRITE_BYTE(c.b);
    MESSAGE_END();
}

Clone this wiki locally