forked from baso88/SC_AngelScript
-
Notifications
You must be signed in to change notification settings - Fork 0
TE_BEAMDISK
wootguy edited this page Nov 29, 2025
·
4 revisions
An additive sprite disk that expands over time. The orientation of the disk can't be changed.
| Type | Name | Description |
|---|---|---|
| Vector | pos | Center point of the disk |
| float | radius | Max radius of the disk |
| const char* | sprite | Sprite used to cover the disk |
| uint8_t | startFrame | Starting frame for the disk sprite |
| uint8_t | frameRate | Frame rate of the disk sprite (FPS * 0.1) **(has no effect)** |
| uint8_t | life | Time to display the disk (seconds * 0.1) |
| RGBA | c | RGBA of the disk sprite |
| uint8_t | scrollSpeed | If set to 10 or greater, the disk starts out fully stretched to infinity and appears to rotate. Values < 10 have no effect. |
void te_beamdisk(Vector pos, float radius,
const char* sprite="sprites/laserbeam.spr", uint8_t startFrame=0,
uint8_t frameRate=16, uint8_t life=8, RGBA c=PURPLE, uint8_t scrollSpeed=0,
int msgType=MSG_BROADCAST, edict_t* dest=NULL)
{
MESSAGE_BEGIN(msgType, SVC_TEMPENTITY, dest);
WRITE_BYTE(TE_BEAMDISK);
WRITE_COORD(pos.x);
WRITE_COORD(pos.y);
WRITE_COORD(pos.z);
WRITE_COORD(pos.x);
WRITE_COORD(pos.y);
WRITE_COORD(pos.z + radius);
WRITE_SHORT(MODEL_INDEX(sprite));
WRITE_BYTE(startFrame);
WRITE_BYTE(frameRate);
WRITE_BYTE(life);
WRITE_BYTE(1); // "width" - has no effect
WRITE_BYTE(0); // "noise" - has no effect
WRITE_BYTE(c.r);
WRITE_BYTE(c.g);
WRITE_BYTE(c.b);
WRITE_BYTE(c.a);
WRITE_BYTE(scrollSpeed);
MESSAGE_END();
}