Temporary Effects

From Sven Co-op
Revision as of 18:11, 20 February 2025 by Outerbeast (talk | contribs) (Created page with "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 ef...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

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.

1 Contents

1.1 Beam Effects

TE_BEAMPOINTS File:Images/TE BEAMPOINTS.gif TE_BEAMENTPOINT File:Images/TE BEAMENTPOINT.gif
TE_BEAMENTS File:Images/TE BEAMENTS.gif TE_BEAMDISK File:Images/TE BEAMDISK.gif
TE_BEAMCYLINDER File:Images/TE BEAMCYLINDER.gif TE_BEAMTORUS File:Images/TE BEAMTORUS.gif
TE_BEAMRING File:Images/TE BEAMRING.gif TE_LIGHTNING File:Images/no preview.png
TE_BEAMSPRITE File:Images/TE BEAMSPRITE.gif TE_BEAMFOLLOW File:Images/TE BEAMFOLLOW.gif
TE_KILLBEAM File:Images/no preview.png

1.2 Explosions & Simple Sprite Effects

TE_EXPLOSION File:Images/TE EXPLOSION.gif TE_SMOKE File:Images/TE SMOKE.gif
TE_SPARKS File:Images/TE SPARKS.gif TE_SPRITE File:Images/TE SPRITE.gif
TE_GLOWSPRITE File:Images/TE GLOWSPRITE.gif TE_ARMOR_RICOCHET File:Images/TE ARMOR RICOCHET.gif
TE_DLIGHT File:Images/TE DLIGHT.gif TE_ELIGHT File:Images/TE ELIGHT.gif
TE_PLAYERATTACHMENT File:Images/TE PLAYERATTACHMENT.gif TE_KILLPLAYERATTACHMENTS File:Images/no preview.png

1.3 Sprite-based Particle Effects

TE_SPRITETRAIL File:Images/TE SPRITETRAIL.gif TE_BUBBLETRAIL File:Images/TE BUBBLETRAIL.gif
TE_LARGEFUNNEL File:Images/TE LARGEFUNNEL.gif TE_FIZZ File:Images/TE FIZZ.gif
TE_BUBBLES File:Images/TE BUBBLES.gif TE_SPRITE_SPRAY File:Images/TE SPRITE SPRAY.gif
TE_SPRAY File:Images/TE SPRAY.gif TE_BLOODSPRITE File:Images/TE BLOODSPRITE.gif
TE_FIREFIELD File:Images/TE FIREFIELD.gif TE_PLAYERSPRITES File:Images/TE PLAYERSPRITES.gif

1.4 Quake-style Effects

TE_GUNSHOT File:Images/TE GUNSHOT.gif TE_TAREXPLOSION File:Images/TE TAREXPLOSION.gif
TE_EXPLOSION2 File:Images/TE EXPLOSION2.gif TE_PARTICLEBURST File:Images/TE PARTICLEBURST.gif
TE_LAVASPLASH File:Images/TE LAVASPLASH.gif TE_TELEPORT File:Images/TE TELEPORT.gif
TE_LINE File:Images/TE LINE.gif TE_SHOWLINE File:Images/TE SHOWLINE.gif
TE_BOX File:Images/TE BOX.gif TE_BLOODSTREAM File:Images/TE BLOODSTREAM.gif
TE_BLOOD File:Images/TE BLOOD.gif

1.5 Gibs & Other Model Effects

TE_MODEL File:Images/TE MODEL.gif TE_EXPLODEMODEL File:Images/TE EXPLODEMODEL.gif
TE_BREAKMODEL File:Images/TE BREAKMODEL.gif TE_PROJECTILE File:Images/TE PROJECTILE.gif

1.6 Tracer Effects

TE_TRACER File:Images/TE TRACER.gif TE_IMPLOSION File:Images/TE IMPLOSION.gif
TE_STREAK_SPLASH File:Images/TE STREAK SPLASH.gif TE_USERTRACER File:Images/TE USERTRACER.gif

1.7 Decals

I don’t recommend using these directly. Use the API functions defined in CUtility instead.

TE_DECAL File:Images/TE DECAL.gif TE_PLAYERDECAL File:Images/TE PLAYERDECAL.gif
TE_GUNSHOTDECAL File:Images/TE GUNSHOTDECAL.gif TE_MULTIGUNSHOT File:Images/TE MULTIGUNSHOT.gif
TE_DECALHIGH File:Images/no preview.png TE_WORLDDECAL File:Images/no preview.png
TE_WORLDDECALHIGH File:Images/no preview.png TE_BSPDECAL File:Images/no preview.png

1.8 Miscellaneous

TE_TEXTMESSAGE
File:Images/no preview.png
 
File:Images/transparent.png

2 Engine Color Palettes

2.1 Palette #1

Palette #1 is slightly modified Quake palette and is used by TE_PARTICLEBURST, TE_BLOOD, TE_BLOODSTREAM, and TE_BLOODSPRITE effects.

File:Images/engine palette 1.png

2.2 Palette #2

Palette #2 is used by tracer effects, namely TE_USERTRACER and TE_STREAK_SPLASH. TE_TRACER uses color #4 from this palette.

File:Images/engine palette 2.png

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 of tracerred, tracergreen and tracerblue cvars. Opacity is determined by traceralpha cvar. Default RGB values are 0.8, 0.8 and 0.4. Defaut alpha is 0.5.

3 Code Comments

Anywhere you see a “sprite” parameter, assume that you can use either a sprite or a model (the same goes for “model” parameters).

See DoEffect() function for more information. Some of these functions have API equivalents, so just use those unless you have special needs.