Skip to content

TE_BEAMCYLINDER

GeckoN edited this page Jan 31, 2017 · 4 revisions

A ring-shaped beam that expands over time. The orientation of the cylinder can't be changed.

Parameters

Type Name Description
Vector pos Center point of the cylinder
float radius Max radius of the cylinder
string sprite Sprite used to draw the beam
uint8 startFrame Starting frame for the beam sprite
uint8 frameRate Frame rate of the beam sprite (FPS * 0.1) (has no effect)
uint8 life Time to display the beam (seconds * 0.1)
uint8 width Width of the beam / height of the cylinder
uint8 noise Noise amplitude of the beam (units * 0.1) (has no effect)
Color c Color of the beam sprite
uint8 scrollSpeed Scroll speed of the beam sprite (has no effect)

API Function

No API function exists as of SC 5.02

NetworkMessage Function

void te_beamcylinder(Vector pos, float radius, 
	string sprite="sprites/laserbeam.spr", uint8 startFrame=0, 
	uint8 frameRate=16, uint8 life=8, uint8 width=8, uint8 noise=0, 
	Color c=PURPLE, uint8 scrollSpeed=0, 
	NetworkMessageDest msgType=MSG_BROADCAST, edict_t@ dest=null)
{
	NetworkMessage m(msgType, NetworkMessages::SVC_TEMPENTITY, dest);
	m.WriteByte(TE_BEAMCYLINDER);
	m.WriteCoord(pos.x);
	m.WriteCoord(pos.y);
	m.WriteCoord(pos.z);
	m.WriteCoord(pos.x);
	m.WriteCoord(pos.y);
	m.WriteCoord(pos.z + radius);
	m.WriteShort(g_EngineFuncs.ModelIndex(sprite));
	m.WriteByte(startFrame);
	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);
	m.WriteByte(scrollSpeed);
	m.End();
}
Clone this wiki locally