Skip to content

TE_LINE

GeckoN edited this page Jan 31, 2017 · 4 revisions

Draws a dotted line between two points. Colors with green in them don't seem to work very well.

Parameters

Type Name Description
Vector start Starting point for the line
Vector end End point for the line
uint16 life Time to display the line (seconds * 0.1)
Color c Line color

API Function

No API function exists as of SC 5.02

NetworkMessage Function

void te_line(Vector start, Vector end, uint16 life=32, Color c=PURPLE,
	NetworkMessageDest msgType=MSG_BROADCAST, edict_t@ dest=null)
{
	NetworkMessage m(msgType, NetworkMessages::SVC_TEMPENTITY, dest);
	m.WriteByte(TE_LINE);
	m.WriteCoord(start.x);
	m.WriteCoord(start.y);
	m.WriteCoord(start.z);
	m.WriteCoord(end.x);
	m.WriteCoord(end.y);
	m.WriteCoord(end.z);
	m.WriteShort(life);
	m.WriteByte(c.r);
	m.WriteByte(c.g);
	m.WriteByte(c.b);
	m.End();
}
Clone this wiki locally