forked from baso88/SC_AngelScript
-
Notifications
You must be signed in to change notification settings - Fork 0
TE_SPRITETRAIL
wootguy edited this page Nov 29, 2025
·
4 revisions
Spawns sprites along a line or from a single point. Sprites collide with the world, fall to the ground, and eventually fadeout.
| Type | Name | Description |
|---|---|---|
| Vector | start | Spawn line start |
| Vector | end | Spawn line end (can be same as start) |
| const char* | sprite | Sprite to display |
| uint8_t | count | Number of sprites to spawn |
| uint8_t | life | Time to wait before fading out (seconds * 0.1) |
| uint8_t | scale | Sprite scale * 0.1 |
| uint8_t | speed | Initial speed (direction = start -> end). Has no effect if the start and end points are the same. |
| uint8_t | speedNoise | Amount to randomize speed and direction |
void te_spritetrail(Vector start, Vector end,
const char* sprite="sprites/hotglow.spr", uint8_t count=2, uint8_t life=0,
uint8_t scale=1, uint8_t speed=16, uint8_t speedNoise=8,
int msgType=MSG_BROADCAST, edict_t* dest=NULL)
{
MESSAGE_BEGIN(msgType, SVC_TEMPENTITY, dest);
WRITE_BYTE(TE_SPRITETRAIL);
WRITE_COORD(start.x);
WRITE_COORD(start.y);
WRITE_COORD(start.z);
WRITE_COORD(end.x);
WRITE_COORD(end.y);
WRITE_COORD(end.z);
WRITE_SHORT(MODEL_INDEX(sprite));
WRITE_BYTE(count);
WRITE_BYTE(life);
WRITE_BYTE(scale);
WRITE_BYTE(speedNoise);
WRITE_BYTE(speed);
MESSAGE_END();
}