TE FIREFIELD: Difference between revisions
Jump to navigation
Jump to search
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..." |
Outerbeast (talk | contribs) mNo edit summary |
||
| Line 26: | Line 26: | ||
* <code>uint8 flags</code> Combinable options: | * <code>uint8 flags</code> Combinable options: | ||
1 : All sprites will drift upwards | 1 : All sprites will drift upwards | ||
<br> | |||
2 : 50% of the sprites will drift upwards | 2 : 50% of the sprites will drift upwards | ||
<br> | |||
4 : Loop sprites at 15fps instead of playing one cycle stretched to fit the "life" time | 4 : Loop sprites at 15fps instead of playing one cycle stretched to fit the "life" time | ||
<br> | |||
8 : Display sprites at 50% opacity | 8 : Display sprites at 50% opacity | ||
<br> | |||
16 : Spawn sprites on a flat plane instead of in cube | 16 : Spawn sprites on a flat plane instead of in cube | ||
<br> | |||
* <code>uint8 life</code> Time to display sprites (seconds * 0.1 +/- some random amount) | * <code>uint8 life</code> Time to display sprites (seconds * 0.1 +/- some random amount) | ||
[[Category:Scripting]] | [[Category:Scripting]] | ||
Latest revision as of 15:16, 23 July 2025

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)