Temporary Entities - baso88/SC_AngelScript GitHub Wiki
Temporary entities are like normal entities except that they automatically kill themselves, use less bandwidth, and don't crash the map if there are too many of them. All effects are visual only and don't deal any damage or interact with other entities. Everything here is created using NetworkMessage, which lets you control which players can see the effect.
The point of this page is to demonstrate what each of the TE_* effects do and how you can customize them. Some of these effects can be created via API functions, but using NetworkMessages can give you a little more flexibility in those cases.
Most of the information presented here is based on this post, Half-Life SDK source files, and testing done by w00tguy and me (GeckonCZ). Please let us know of any inaccuracies or omissions.
See the Code Comments section or the example script if the code snippets are unclear and/or don't work for you.
- Beam Effects
- Explosions & Simple Sprite Effects
- Sprite-based Particle Effects
- Quake-style Effects
- Gibs & Other Model Effects
- Tracer Effects
- Decals
- Miscellaneous
TE_BEAMPOINTS ![]() |
TE_BEAMENTPOINT ![]() |
TE_BEAMENTS ![]() |
TE_BEAMDISK ![]() |
TE_BEAMCYLINDER ![]() |
TE_BEAMTORUS ![]() |
TE_BEAMRING ![]() |
TE_LIGHTNING ![]() |
TE_BEAMSPRITE ![]() |
TE_BEAMFOLLOW ![]() |
TE_KILLBEAM ![]() |
TE_EXPLOSION ![]() |
TE_SMOKE ![]() |
TE_SPARKS ![]() |
TE_SPRITE ![]() |
TE_GLOWSPRITE ![]() |
TE_ARMOR_RICOCHET ![]() |
TE_DLIGHT ![]() |
TE_ELIGHT ![]() |
TE_PLAYERATTACHMENT ![]() |
TE_KILLPLAYERATTACHMENTS ![]() |
TE_SPRITETRAIL ![]() |
TE_BUBBLETRAIL ![]() |
TE_LARGEFUNNEL ![]() |
TE_FIZZ ![]() |
TE_BUBBLES ![]() |
TE_SPRITE_SPRAY ![]() |
TE_SPRAY ![]() |
TE_BLOODSPRITE ![]() |
TE_FIREFIELD ![]() |
TE_PLAYERSPRITES ![]() |
TE_GUNSHOT ![]() |
TE_TAREXPLOSION ![]() |
TE_EXPLOSION2 ![]() |
TE_PARTICLEBURST ![]() |
TE_LAVASPLASH ![]() |
TE_TELEPORT ![]() |
TE_LINE ![]() |
TE_SHOWLINE ![]() |
TE_BOX ![]() |
TE_BLOODSTREAM ![]() |
TE_BLOOD ![]() |
TE_MODEL ![]() |
TE_EXPLODEMODEL ![]() |
TE_BREAKMODEL ![]() |
TE_PROJECTILE ![]() |
TE_TRACER ![]() |
TE_IMPLOSION ![]() |
TE_STREAK_SPLASH ![]() |
TE_USERTRACER ![]() |
I don't recommend using these directly. Use the API functions defined in CUtility instead.
TE_DECAL ![]() |
TE_PLAYERDECAL ![]() |
TE_GUNSHOTDECAL ![]() |
TE_MULTIGUNSHOT ![]() |
TE_DECALHIGH ![]() |
TE_WORLDDECAL ![]() |
TE_WORLDDECALHIGH ![]() |
TE_BSPDECAL ![]() |
TE_TEXTMESSAGE![]() |
![]() |
Palette #1 is slightly modified Quake palette and is used by TE_PARTICLEBURST, TE_BLOOD, TE_BLOODSTREAM, and TE_BLOODSPRITE effects.
Palette #2 is used by tracer effects, namely TE_USERTRACER and TE_STREAK_SPLASH. TE_TRACER uses color #4 from this palette.
Notes:
- This color palette is hardcoded into the engine and only the first 12 colors are defined (index 0 through 11).
- Index 4 holds the Default Tracer Color. Its initial value is
{0,0,0}
(Black), but the actual run-time color depends on a value oftracerred
,tracergreen
andtracerblue
cvars. Opacity is determined bytraceralpha
cvar. Default RGB values are0.8
,0.8
and0.4
. Defaut alpha is0.5
.
Anywhere you see a "sprite" parameter, assume that you can use either a sprite or a model (the same goes for "model" parameters).
When you see a parameter of type "Color", that's referring to a helper class I made. Copy paste this into your script so that the color args work:
class Color
{
uint8 r, g, b, a;
Color() { r = g = b = a = 0; }
Color(uint8 _r, uint8 _g, uint8 _b, uint8 _a = 255 ) { r = _r; g = _g; b = _b; a = _a; }
Color (Vector v) { r = int(v.x); g = int(v.y); b = int(v.z); a = 255; }
string ToString() { return "" + r + " " + g + " " + b + " " + a; }
}
const Color RED(255,0,0);
const Color GREEN(0,255,0);
const Color BLUE(0,0,255);
This script includes all code snippets in one file.
Load the plugin and say /te #
where #
is index of the effect you want to test. For example, to test TE_EXPLOSION effect say:
/te 3
See DoEffect() function for more information. Some of these functions have API equivalents, so just use those unless you have special needs.