Difference between revisions of "TE LINE"

From Sven Co-op
Jump to navigation Jump to search
(Created page with "frame|TE_LINE Draws a dotted line between two points. Colors with green in them don't seem to work very well. <pre> void te_line(Vector start, Vector end,...")
 
m
 
Line 20: Line 20:
 
}</pre>
 
}</pre>
  
Vector start Starting point for the line
+
* Vector start Starting point for the line
Vector end End point for the line
+
* Vector end End point for the line
uint16 life Time to display the line (seconds * 0.1)
+
* uint16 life Time to display the line (seconds * 0.1)
RGBA c Line color
+
* RGBA c Line color
 
[[Category:Scripting]]
 
[[Category:Scripting]]

Latest revision as of 20:15, 7 July 2025

TE_LINE

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

void te_line(Vector start, Vector end, uint16 life=32, RGBA c=RGBA_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();
}
  • Vector start Starting point for the line
  • Vector end End point for the line
  • uint16 life Time to display the line (seconds * 0.1)
  • RGBA c Line color