TE BEAMENTS
Jump to navigation
Jump to search
An additive sprite beam between two moving entities.
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, RGBA c=RGBA_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(); }
- 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)
- RGBA c Beam color and brightness
- uint8 scroll Scroll rate of the beam sprite