-
Notifications
You must be signed in to change notification settings - Fork 4
TE_BUBBLETRAIL
GeckoN edited this page Jan 31, 2017
·
4 revisions
Spawns sprites along a line or from a single point. Sprites float upwards and disappear once they reach their max height.
The max height is set as the lowest point on the line plus the height value.
Type | Name | Description |
---|---|---|
Vector | start | Spawn line start |
Vector | end | Spawn line end (can be same as start) |
string | sprite | Sprite to display (alpha transparency) |
float | height | Height at which sprites disappear |
uint8 | count | Number of sprites to spawn |
float | speed | Upward speed. |
void CUtility::BubbleTrail(const Vector& in vecFrom, const Vector& in vecTo, int iCount)
void te_bubbletrail(Vector start, Vector end,
string sprite="sprites/bubble.spr", float height=128.0f,
uint8 count=16, float speed=16.0f,
NetworkMessageDest msgType=MSG_BROADCAST, edict_t@ dest=null)
{
NetworkMessage m(msgType, NetworkMessages::SVC_TEMPENTITY, dest);
m.WriteByte(TE_BUBBLETRAIL);
m.WriteCoord(start.x);
m.WriteCoord(start.y);
m.WriteCoord(start.z);
m.WriteCoord(end.x);
m.WriteCoord(end.y);
m.WriteCoord(end.z);
m.WriteCoord(height);
m.WriteShort(g_EngineFuncs.ModelIndex(sprite));
m.WriteByte(count);
m.WriteCoord(speed);
m.End();
}