Skip to content

TE_LINE

wootguy edited this page Nov 29, 2025 · 4 revisions

Draws a dotted line between two points. RGBAs with green in them don't seem to work very well.

Parameters

Type Name Description
Vector start Starting point for the line
Vector end End point for the line
uint16_t life Time to display the line (seconds * 0.1)
RGBA c Line RGBA

Example Usage

void te_line(Vector start, Vector end, uint16_t life=32, RGBA c=PURPLE,
    int msgType=MSG_BROADCAST, edict_t* dest=NULL)
{
    MESSAGE_BEGIN(msgType, SVC_TEMPENTITY, dest);
    WRITE_BYTE(TE_LINE);
    WRITE_COORD(start.x);
    WRITE_COORD(start.y);
    WRITE_COORD(start.z);
    WRITE_COORD(end.x);
    WRITE_COORD(end.y);
    WRITE_COORD(end.z);
    WRITE_SHORT(life);
    WRITE_BYTE(c.r);
    WRITE_BYTE(c.g);
    WRITE_BYTE(c.b);
    MESSAGE_END();
}

Clone this wiki locally