Difference between revisions of "TE SMOKE"

From Sven Co-op
Jump to navigation Jump to search
(Created page with "An animated sprite that moves upward at 30 units per second. Plays once. frame|TE_SMOKE <pre> void te_smoke(Vector pos, string sprite="sprites/steam1.spr...")
 
m
 
Line 22: Line 22:
 
* <code>uint8 scale</code> Sprite scale * 0.1
 
* <code>uint8 scale</code> Sprite scale * 0.1
 
* <code>uint8 frameRate</code> Frame rate of the sprite (FPS * 0.1)
 
* <code>uint8 frameRate</code> Frame rate of the sprite (FPS * 0.1)
 +
[[Category:Scripting]]

Latest revision as of 13:41, 31 May 2025

An animated sprite that moves upward at 30 units per second. Plays once.

TE_SMOKE
void te_smoke(Vector pos, string sprite="sprites/steam1.spr", 
	int scale=10, int frameRate=15,
	NetworkMessageDest msgType=MSG_BROADCAST, edict_t@ dest=null)
{
	NetworkMessage m(msgType, NetworkMessages::SVC_TEMPENTITY, dest);
	m.WriteByte(TE_SMOKE);
	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.End();
}
  • Vector pos Center point for the effect
  • string sprite Animated smoke sprite (alpha transparency)
  • uint8 scale Sprite scale * 0.1
  • uint8 frameRate Frame rate of the sprite (FPS * 0.1)