Skip to content

TE_FIREFIELD

GeckoN edited this page Jan 31, 2017 · 5 revisions

Spawns randomly positioned sprites in a cube or on a square plane.

Parameters

Type Name Description
Vector pos Center point of the effect
uint16 radius Size of the cube or square (distance from center point to a side)
string sprite Sprite to display (alpha transparency)
uint8 count Number of sprites to spawn
uint8 flags Combinable options:
1 : All sprites will drift upwards
2 : 50% of the sprites will drift upwards
4 : Loop sprites at 15fps instead of playing one cycle stretched to fit the "life" time
8 : Display sprites at 50% opacity
16 : Spawn sprites on a flat plane instead of in cube
uint8 life Time to display sprites (seconds * 0.1 +/- some random amount)

API Function

No API function exists as of SC 5.02

NetworkMessage Function

void te_firefield(Vector pos, uint16 radius=128, 
	string sprite="sprites/grenade.spr", uint8 count=128, 
	uint8 flags=30, uint8 life=5,
	NetworkMessageDest msgType=MSG_BROADCAST, edict_t@ dest=null) 
{
	NetworkMessage m(msgType, NetworkMessages::SVC_TEMPENTITY, dest);
	m.WriteByte(TE_FIREFIELD);
	m.WriteCoord(pos.x);
	m.WriteCoord(pos.y);
	m.WriteCoord(pos.z);
	m.WriteShort(radius);
	m.WriteShort(g_EngineFuncs.ModelIndex(sprite));
	m.WriteByte(count);
	m.WriteByte(flags);
	m.WriteByte(life);
	m.End();
}
Clone this wiki locally