TE EXPLOSION
Jump to navigation
Jump to search
The standard Half-Life explosion. The sprite moves upward at 8 units per second.
void te_explosion(Vector pos, string sprite="sprites/zerogxplode.spr", int scale=10, int frameRate=15, int flags=0, NetworkMessageDest msgType=MSG_BROADCAST, edict_t@ dest=null) { NetworkMessage m(msgType, NetworkMessages::SVC_TEMPENTITY, dest); m.WriteByte(TE_EXPLOSION); m.WriteCoord(pos.x); m.WriteCoord(pos.y); m.WriteCoord(pos.z); m.WriteShort(g_EngineFuncs.ModelIndex(sprite)); m.WriteByte(scale); m.WriteByte(frameRate); m.WriteByte(flags); m.End(); }
Type | Name | Description |
---|---|---|
Vector | pos | Center point for the effect |
string | sprite | Animated explosion sprite (additive or alpha transparency) |
uint8 | scale | Sprite scale * 0.1 |
uint8 | frameRate | Frame rate of the sprite (FPS * 0.1) |
uint8 | 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 |