Skip to content

TE_SPRITETRAIL

GeckoN edited this page Jan 31, 2017 · 4 revisions

Spawns sprites along a line or from a single point. Sprites collide with the world, fall to the ground, and eventually fadeout.

Parameters

Type Name Description
Vector start Spawn line start
Vector end Spawn line end (can be same as start)
string sprite Sprite to display
uint8 count Number of sprites to spawn
uint8 life Time to wait before fading out (seconds * 0.1)
uint8 scale Sprite scale * 0.1
uint8 speed Initial speed (direction = start -> end). Has no effect if the start and end points are the same.
uint8 speedNoise Amount to randomize speed and direction

API Function

No API function exists as of SC 5.02

NetworkMessage Function

void te_spritetrail(Vector start, Vector end, 
	string sprite="sprites/hotglow.spr", uint8 count=2, uint8 life=0, 
	uint8 scale=1, uint8 speed=16, uint8 speedNoise=8,
	NetworkMessageDest msgType=MSG_BROADCAST, edict_t@ dest=null)
{
	NetworkMessage m(msgType, NetworkMessages::SVC_TEMPENTITY, dest);
	m.WriteByte(TE_SPRITETRAIL);
	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(g_EngineFuncs.ModelIndex(sprite));
	m.WriteByte(count);
	m.WriteByte(life);
	m.WriteByte(scale);
	m.WriteByte(speedNoise);
	m.WriteByte(speed);
	m.End();
}
Clone this wiki locally