forked from baso88/SC_AngelScript
-
Notifications
You must be signed in to change notification settings - Fork 0
TE_EXPLOSION
wootguy edited this page Nov 29, 2025
·
4 revisions
The standard Half-Life explosion. The sprite moves upward at 8 units per second.
| Type | Name | Description |
|---|---|---|
| Vector | pos | Center point for the effect |
| const char* | sprite | Animated explosion sprite (additive or alpha transparency) |
| uint8_t | scale | Sprite scale * 0.1 |
| uint8_t | frameRate | Frame rate of the sprite (FPS * 0.1) |
| uint8_t | flags | Combinable options: 1 : Sprite will be drawn opaque 2 : Do not render the dynamic lights 4 : Do not play the explosion sound 8 : Do not draw the particles |
void te_explosion(Vector pos, const char* sprite="sprites/zerogxplode.spr",
int scale=10, int frameRate=15, int flags=0,
int msgType=MSG_BROADCAST, edict_t* dest=NULL)
{
MESSAGE_BEGIN(msgType, SVC_TEMPENTITY, dest);
WRITE_BYTE(TE_EXPLOSION);
WRITE_COORD(pos.x);
WRITE_COORD(pos.y);
WRITE_COORD(pos.z);
WRITE_SHORT(MODEL_INDEX(sprite));
WRITE_BYTE(scale);
WRITE_BYTE(frameRate);
WRITE_BYTE(flags);
MESSAGE_END();
}