Skip to content

TE_BEAMRING

wootguy edited this page Nov 29, 2025 · 4 revisions

A circular beam drawn between two moving entities. Unlike the other circular beam effects, this one can be rotated to different orientations.

Parameters

Type Name Description
CBaseEntity* start Entity target for the beam to follow (start)
CBaseEntity* end Entity target for the beam to follow (end)
const char* sprite Sprite used to draw the beam
uint8_t startFrame Starting frame for the beam sprite
uint8_t frameRate Frame rate of the beam sprite (FPS * 0.1)
uint8_t life Time to display the beam (seconds * 0.1)
uint8_t width Width of the beam / height of the torus
uint8_t noise Noise amplitude of the beam (units * 0.1)
RGBA c RGBA of the beam sprite
uint8_t scrollSpeed Scroll speed of the beam sprite

Example Usage

void te_beamring(CBaseEntity* start, CBaseEntity* end, 
    const char* sprite="sprites/laserbeam.spr", uint8_t startFrame=0, 
    uint8_t frameRate=16, uint8_t life=8, uint8_t width=8, uint8_t noise=0, 
    RGBA c=PURPLE, uint8_t scrollSpeed=0, 
    int msgType=MSG_BROADCAST, edict_t* dest=NULL)
{
    MESSAGE_BEGIN(msgType, SVC_TEMPENTITY, dest);
    WRITE_BYTE(TE_BEAMRING);
    WRITE_SHORT(start->entindex());
    WRITE_SHORT(end->entindex());
    WRITE_SHORT(MODEL_INDEX(sprite));
    WRITE_BYTE(startFrame);
    WRITE_BYTE(frameRate);
    WRITE_BYTE(life);
    WRITE_BYTE(width);
    WRITE_BYTE(noise);
    WRITE_BYTE(c.r);
    WRITE_BYTE(c.g);
    WRITE_BYTE(c.b);
    WRITE_BYTE(c.a);
    WRITE_BYTE(scrollSpeed);
    MESSAGE_END();
}

Clone this wiki locally