TE FIREFIELD
Revision as of 19:42, 22 July 2025 by Outerbeast (talk | contribs) (Created page with "frame|TE_FIREFIELD Spawns randomly positioned sprites in a cube or on a square plane. <pre> void te_firefield(Vector pos, uint16 radius=128, string...")
Spawns randomly positioned sprites in a cube or on a square plane.
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();
}
Vector posCenter point of the effectuint16 radiusSize of the cube or square (distance from center point to a side)string spriteSprite to display (alpha transparency)uint8 countNumber of sprites to spawnuint8 flagsCombinable 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 lifeTime to display sprites (seconds * 0.1 +/- some random amount)
