Skip to content

TE_SPRITE

GeckoN edited this page Jan 31, 2017 · 4 revisions

An animated sprite. Plays once.

Parameters

Type Name Description
Vector pos Center point for the effect
string sprite Animated sprite (additive)
uint8 scale Sprite scale * 0.1
uint8 alpha Sprite opacity

API Function

No API function exists as of SC 5.02

NetworkMessage Function

void te_sprite(Vector pos, string sprite="sprites/zerogxplode.spr", 
	uint8 scale=10, uint8 alpha=200, 
	NetworkMessageDest msgType=MSG_BROADCAST, edict_t@ dest=null)
{
	NetworkMessage m(msgType, NetworkMessages::SVC_TEMPENTITY, dest);
	m.WriteByte(TE_SPRITE);
	m.WriteCoord(pos.x);
	m.WriteCoord(pos.y);
	m.WriteCoord(pos.z);
	m.WriteShort(g_EngineFuncs.ModelIndex(sprite));
	m.WriteByte(scale);
	m.WriteByte(alpha);
	m.End();
}
Clone this wiki locally