TE BEAMENTPOINT
Jump to navigation
Jump to search
An additive sprite beam between a moving entity and a static point.
void te_beamentpoint(CBaseEntity@ target, Vector end, string sprite="sprites/laserbeam.spr", int frameStart=0, int frameRate=100, int life=10, int width=32, int noise=1, RGBA c=PURPLE, int scroll=32, NetworkMessageDest msgType=MSG_BROADCAST, edict_t@ dest=null) { NetworkMessage m(msgType, NetworkMessages::SVC_TEMPENTITY, dest); m.WriteByte(TE_BEAMENTPOINT); m.WriteShort(target.entindex()); m.WriteCoord(end.x); m.WriteCoord(end.y); m.WriteCoord(end.z); 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@ target Entity target for the beam to follow
- Vector end End position of the beam
- 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