TE_DLIGHT - baso88/SC_AngelScript GitHub Wiki

A spherical dynamic light that fades over time.

Parameters

Type Name Description
Vector pos Center point for the effect
uint8 radius Radius of the light sphere (units * 10)
Color c Light color
uint8 life Time to display the light (seconds * 0.1)
uint8 decayRate Light fade speed

API Function

No API function exists as of SC 5.02

NetworkMessage Function

void te_dlight(Vector pos, uint8 radius=32, Color c=PURPLE, 
	uint8 life=255, uint8 decayRate=50,
	NetworkMessageDest msgType=MSG_BROADCAST, edict_t@ dest=null)
{
	NetworkMessage m(msgType, NetworkMessages::SVC_TEMPENTITY, dest);
	m.WriteByte(TE_DLIGHT);
	m.WriteCoord(pos.x);
	m.WriteCoord(pos.y);
	m.WriteCoord(pos.z);
	m.WriteByte(radius);
	m.WriteByte(c.r);
	m.WriteByte(c.g);
	m.WriteByte(c.b);
	m.WriteByte(life);
	m.WriteByte(decayRate);
	m.End();
}