-
Notifications
You must be signed in to change notification settings - Fork 4
TE_BEAMFOLLOW
GeckoN edited this page Jan 31, 2017
·
4 revisions
A beam trail that follows a moving entity. The trail will kill itself if the entity is stopped and doesn't start moving within 1 second, or if the beam catches up with itself after the entity has stopped moving.
Type | Name | Description |
---|---|---|
CBaseEntity@ | target | Entity target for the beam to follow |
string | sprite | Sprite used to display the beam |
uint8 | life | Time before the trail fades out (seconds * 0.1) |
uint8 | width | Width of the beam (units * 0.1) |
Color | c | Color and brightness of the beam |
No API function exists as of SC 5.02
void te_trail(CBaseEntity@ target, string sprite="sprites/laserbeam.spr",
uint8 life=100, uint8 width=2, Color c=PURPLE,
NetworkMessageDest msgType=MSG_BROADCAST, edict_t@ dest=null)
{
NetworkMessage m(msgType, NetworkMessages::SVC_TEMPENTITY, dest);
m.WriteByte(TE_BEAMFOLLOW);
m.WriteShort(target.entindex());
m.WriteShort(g_EngineFuncs.ModelIndex(sprite));
m.WriteByte(life);
m.WriteByte(width);
m.WriteByte(c.r);
m.WriteByte(c.g);
m.WriteByte(c.b);
m.WriteByte(c.a);
m.End();
}