Skip to content

TE_SPRITE_SPRAY

GeckoN edited this page Jan 31, 2017 · 4 revisions

Throws sprites in some direction. Sprites have gravity, fade out, and pass through the world.

Parameters

Type Name Description
Vector pos Point to spray sprites from
Vector dir Direction of the spray
string sprite Sprite to display (alpha transparency)
uint8 count Number of sprites to spawn
uint8 speed Initial sprite speed
uint8 noise Amount to randomize speed and direction

API Function

No API function exists as of SC 5.02

NetworkMessage Function

void te_spritespray(Vector pos, Vector dir, 
	string sprite="sprites/bubble.spr", uint8 count=8, 
	uint8 speed=16, uint8 noise=255,
	NetworkMessageDest msgType=MSG_BROADCAST, edict_t@ dest=null)
{
	NetworkMessage m(msgType, NetworkMessages::SVC_TEMPENTITY, dest);
	m.WriteByte(TE_SPRITE_SPRAY);
	m.WriteCoord(pos.x);
	m.WriteCoord(pos.y);
	m.WriteCoord(pos.z);
	m.WriteCoord(dir.x);
	m.WriteCoord(dir.y);
	m.WriteCoord(dir.z);
	m.WriteShort(g_EngineFuncs.ModelIndex(sprite));
	m.WriteByte(count);
	m.WriteByte(speed);
	m.WriteByte(noise);
	m.End();
}
Clone this wiki locally