forked from baso88/SC_AngelScript
-
Notifications
You must be signed in to change notification settings - Fork 0
TE_FIREFIELD
wootguy edited this page Nov 29, 2025
·
4 revisions
Spawns randomly positioned sprites in a cube or on a square plane.
| Type | Name | Description |
|---|---|---|
| Vector | pos | Center point of the effect |
| uint16_t | radius | Size of the cube or square (distance from center point to a side) |
| const char* | sprite | Sprite to display (alpha transparency) |
| uint8_t | count | Number of sprites to spawn |
| uint8_t | 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_t | life | Time to display sprites (seconds * 0.1 +/- some random amount) |
void te_firefield(Vector pos, uint16_t radius=128,
const char* sprite="sprites/grenade.spr", uint8_t count=128,
uint8_t flags=30, uint8_t life=5,
int msgType=MSG_BROADCAST, edict_t* dest=NULL)
{
MESSAGE_BEGIN(msgType, SVC_TEMPENTITY, dest);
WRITE_BYTE(TE_FIREFIELD);
WRITE_COORD(pos.x);
WRITE_COORD(pos.y);
WRITE_COORD(pos.z);
WRITE_SHORT(radius);
WRITE_SHORT(MODEL_INDEX(sprite));
WRITE_BYTE(count);
WRITE_BYTE(flags);
WRITE_BYTE(life);
MESSAGE_END();
}