-
Notifications
You must be signed in to change notification settings - Fork 4
TE_BEAMENTS
GeckoN edited this page Jan 31, 2017
·
4 revisions
An additive sprite beam between two moving entities.
Type | Name | Description |
---|---|---|
CBaseEntity@ | start | Entity target for the beam to follow (start) |
CBaseEntity@ | end | Entity target for the beam to follow (end) |
string | sprite | Sprite used to display the beam |
uint8 | frameStart | Starting frame for the beam sprite |
uint8 | frameRate | Frame rate of the beam sprite (FPS * 0.1) |
uint8 | life | How long to display the beam (seconds * 0.1) |
uint8 | width | Width of the beam (units * 0.1) |
uint8 | noise | Noise amplitude (units * 0.1) |
Color | c | Beam color and brightness |
uint8 | scroll | Scroll rate of the beam sprite |
No API function exists as of SC 5.02
void te_beaments(CBaseEntity@ start, CBaseEntity@ end,
string sprite="sprites/laserbeam.spr", int frameStart=0,
int frameRate=100, int life=10, int width=32, int noise=1,
Color c=PURPLE, int scroll=32,
NetworkMessageDest msgType=MSG_BROADCAST, edict_t@ dest=null)
{
NetworkMessage m(msgType, NetworkMessages::SVC_TEMPENTITY, dest);
m.WriteByte(TE_BEAMENTS);
m.WriteShort(start.entindex());
m.WriteShort(end.entindex());
m.WriteShort(g_EngineFuncs.ModelIndex(sprite));
m.WriteByte(frameStart);
m.WriteByte(frameRate);
m.WriteByte(life);
m.WriteByte(width);
m.WriteByte(noise);
m.WriteByte(c.r);
m.WriteByte(c.g);
m.WriteByte(c.b);
m.WriteByte(c.a); // actually brightness
m.WriteByte(scroll);
m.End();
}