Effects

Custom Effects for Version V1.1.0u onwards

ma_effect

The first parameter defines the effect to use.
There are 19 effects to choose from

The first 3 effects use the standard interface effects and should be compatbile with all source mods.

The limitation is that you cannot filter who will see the effect.

  1. Beam
  2. Smoke
  3. Sparks

The next group use the temp_ents system that is not exposed typically to a server plugin module and is not guaranteed to work on all source mods.

  1. Beam Ent Point
  2. Beam Ents
  3. Beam Follow
  4. Beam Points
  5. Beam Laser
  6. Beam Ring
  7. Beam Ring Point
  8. Dynamic Light
  9. Explosion
  10. Glow Sprite
  11. Funnel
  12. Metal Sparks
  13. Show Line
  14. Smoke
  15. Sparkes
  16. Sprite

ma_effect 10 would be for the Beam Ring Point (ma_beacon uses this)
ma_effect 3 would be for the Sparks effect (ma_explode uses this)

Filter types for temp_ent type effects.

For effects 4 - 19 a filter must be specified as the next parameter that will define who sees the effect on their screen.

The filter consists of a series of letters and numbers

A = all players see it
T = all of team A see it (for CSS team A are Terrorists)
C = all of team B see it (for CSS team B are Counter Terrorists)
S = all of the spectators see it
D = all of the dead players see it
E = exclude any dead players from seeing it.

A number can follow which defines the number of user ids to add to the filter. If I specify a number of 2 then the next 2 parameters should contain the user ids of the players who will see the effect.

Examples: -

If I want all dead players to see the effect and 2 extra players: -

ma_effect 10 D2 123 124 (where 123 and 124) are the user ids of the two extra players

If I want all terrorists to see the effect but exclude dead players

ma_effect 5 TE

If I want just three user defined players to see it

ma_effect 10 3 123 124 125 (where 123, 125 and 125 are the user ids of the three players)

The individual effects and their assocated parameters.

Any examples shown are performed on de_dust at CT spawn point and assumes you have the following texturelist.txt file

"texturelist.txt"
{
   // List textures to be available for custom effects via ma_effect
   // The first label is the name you use within the ma_effect command to reference
   // the sprite texture, the second is the location of the sprite itself withing /hl2/materials/
   // You can view the sprites from the Valve Hammer Editor.

   "lightning"      "sprites/lgtning.vmt"
   "smoke"         "sprites/steam1.vmt"
   "blueglow"      "sprites/blueglow1.vmt"
   "crystalbeam"      "sprites/crystal_beam1.vmt"
}

The following effect parameters are just a pure interface to the exact effect parameters used within the SDK.
When referring to a model name or halo name I mean the alias name you have given the texture within the texturelist.cfg file.
If you don't want a model or halo to be used specify the word NULL. For the most part, halo models are not required.

Each parameter has a type which restricts the range of numbers you can use: -

Byte = 0 - 255
Int = -2147483647 to 2147483648
Float = floating point precision

Effect 1 :- Beam

X Y Z - Start position of the beam
X Y Z - End position of the beam
Model Name
Halo Name
Frame Start Index - usually 0 (Byte)
Frame Rate - Frame rate of the animation of the model (Byte)
Life - Time in seconds that the effect lasts for (Float)
Width - Width of the beam at the start position (Byte)
End Width - Width of the beam at the end position (Byte)
Fade Length - Time in seconds of fade out (Byte)
Noise - Noise coefficient (Byte)
Red - Red component (Usually 255) (Byte)
Green - Green component (Usually 255) (Byte)
Blue - Blue component (Ususally 255) (Byte)
Alpha - Translucancy of beam (usually 255) (Byte)
Speed - Speed of beam (Byte)

Example command:-

ma_effect 1 138 -1548 64 138 -1548 264 lightning NULL 0 0 10 10 10 0 1 255 255 255 255 30

Effect 2 :- Smoke

X Y Z - Position of smoke
Model Name
Scale - Scale of smoke (Float)
Frame Rate - Frame Rate of smoke animation (Float)

Example command:-

ma_effect 2 138 -1548 64 smoke 100 10

Effect 3 :- Sparks

X Y Z - Position of the sparks
Magnitude - Magnitude of the sparks (Int)
Trail Length - Trail Length of the sparks (Int)

Example command:-

ma_effect 3 138 -1548 84 200 30

Effect 4 :- Beam Ent Point
(not sure if this is usable from Mattie's Event scripts due to ent indexes being required although they can be set to 0).

Filter - Who sees the effect
Delay - Delay in seconds before effect is shown (Float)
Start Entity index - Entity index effect starts from (Int)
X Y Z - Start position
End Entity index - Entity index effect ends at (Int)
X Y Z - End position
Model Name
Halo Name
Frame Start Index - usually 0 (Int)
Frame Rate - Frame rate of the animation of the model (Int)
Life - Time in seconds that the effect lasts for (Float)
Width - Width of the beam at the start position (Float)
End Width - Width of the beam at the end position (Float)
Fade Length - Time in seconds of fade out (Int)
Amplitude - Amplitude of beam (Float)
Red - Red component (Usually 255) (Int)
Green - Green component (Usually 255) (Int)
Blue - Blue component (Ususally 255) (Int)
Alpha - Translucancy of beam (usually 255) (Int)
Speed - Speed of beam (Int)

Example command:-

ma_effect 4 A 0 0 138 -1548 64 0 138 -1548 264 crystalbeam NULL 0 10 20 20 40 0 0 255 255 255 255 4

Effect 5 :- Beam Ents
(not sure if this is usable from Mattie's Event scripts due to ent indexes being required).

Filter - Who sees the effect
Delay - Delay in seconds before effect is shown (Float)
Start Entity index - Entity index effect starts from (Int)
End Entity index - Entity index effect ends at (Int)
Model Name
Halo Name
Frame Start Index - usually 0 (Int)
Frame Rate - Frame rate of the animation of the model (Int)
Life - Time in seconds that the effect lasts for (Float)
Width - Width of the beam at the start position (Float)
End Width - Width of the beam at the end position (Float)
Fade Length - Time in seconds of fade out (Int)
Amplitude - Amplitude of beam (Float)
Red - Red component (Usually 255) (Int)
Green - Green component (Usually 255) (Int)
Blue - Blue component (Ususally 255) (Int)
Alpha - Translucancy of beam (usually 255) (Int)
Speed - Speed of beam (Int)

Effect 6 :- Beam Follow
(Effect sort of follows entity)

Filter - Who sees the effect
Delay - Delay in seconds before effect is shown (Float)
Entity index - Entity index effect starts from (Int)
Model Name
Halo Name
Life - Time in seconds that the effect lasts for (Float)
Width - Width of the beam at the start position (Float)
End Width - Width of the beam at the end position (Float)
Fade Length - Time in seconds of fade out (Float)
Red - Red component (Usually 255) (Int)
Green - Green component (Usually 255) (Int)
Blue - Blue component (Ususally 255) (Int)
Alpha - Translucancy of beam (usually 255) (Int)

Example command:-

ma_effect 6 A 0 2 smoke NULL 20 100 100 1 255 255 255 255

Effect 7 :- Beam Points

Filter - Who sees the effect
Delay - Delay in seconds before effect is shown (Float)
X Y Z - Start position
X Y Z - End position
Model Name
Halo Name
Frame Start Index - usually 0 (Int)
Frame Rate - Frame rate of the animation of the model (Int)
Life - Time in seconds that the effect lasts for (Float)
Width - Width of the beam at the start position (Float)
End Width - Width of the beam at the end position (Float)
Fade Length - Time in seconds of fade out (Int)
Amplitude - Amplitude of beam (Float)
Red - Red component (Usually 255) (Int)
Green - Green component (Usually 255) (Int)
Blue - Blue component (Ususally 255) (Int)
Alpha - Translucancy of beam (usually 255) (Int)
Speed - Speed of beam (Int)

Example command:-

ma_effect 7 A 0 138 -1548 64 138 -1548 264 lightning NULL 0 10 20 5 50 0 1 255 255 255 255 10

Effect 8 :- Beam Laser

Filter - Who sees the effect
Delay - Delay in seconds before effect is shown (Float)
Start Entity index - Entity index effect starts from (Int)
End Entity index - Entity index effect ends at (Int)
Model Name
Halo Name
Frame Start Index - usually 0 (Int)
Frame Rate - Frame rate of the animation of the model (Int)
Life - Time in seconds that the effect lasts for (Float)
Width - Width of the beam at the start position (Float)
End Width - Width of the beam at the end position (Float)
Fade Length - Time in seconds of fade out (Int)
Amplitude - Amplitude of beam (Float)
Red - Red component (Usually 255) (Int)
Green - Green component (Usually 255) (Int)
Blue - Blue component (Ususally 255) (Int)
Alpha - Translucancy of beam (usually 255) (Int)
Speed - Speed of beam (Int)

Effect 9 :- Beam Ring

Filter - Who sees the effect
Delay - Delay in seconds before effect is shown (Float)
Start Entity index - Entity index effect starts from (Int)
End Entity index - Entity index effect ends at (Int)
Model Name
Halo Name
Frame Start Index - usually 0 (Int)
Frame Rate - Frame rate of the animation of the model (Int)
Life - Time in seconds that the effect lasts for (Float)
Width - Width of the beam (Float)
Spread - Spread of the beam (Float)
Fade Length - Time in seconds of fade out (Int)
Amplitude - Amplitude of beam (Float)
Red - Red component (Usually 255) (Int)
Green - Green component (Usually 255) (Int)
Blue - Blue component (Ususally 255) (Int)
Alpha - Translucancy of beam (usually 255) (Int)
Speed - Speed of beam (Int)
Beam Flags - Set to 0 for default (See beam_flags.h in Valve SDK for more)

Beam Flags from SDK (Copyright Valve)
FBEAM_STARTENTITY = 0x00000001,
FBEAM_ENDENTITY = 0x00000002,
FBEAM_FADEIN = 0x00000004,
FBEAM_FADEOUT = 0x00000008,
FBEAM_SINENOISE = 0x00000010,
FBEAM_SOLID = 0x00000020,
FBEAM_SHADEIN = 0x00000040,
FBEAM_SHADEOUT = 0x00000080,
FBEAM_ONLYNOISEONCE = 0x00000100, // Only calculate our noise once
FBEAM_NOTILE = 0x00000200,
FBEAM_USE_HITBOXES = 0x00000400, // Attachment indices represent hitbox indices instead when this is set.
FBEAM_STARTVISIBLE = 0x00000800, // Has this client actually seen this beam's start entity yet?
FBEAM_ENDVISIBLE = 0x00001000, // Has this client actually seen this beam's end entity yet?
FBEAM_ISACTIVE = 0x00002000,
FBEAM_FOREVER = 0x00004000,
FBEAM_HALOBEAM = 0x00008000, // When drawing a beam with a halo, don't ignore the segments and endwidth

Effect 10 :- Beam Ring Point

Filter - Who sees the effect
Delay - Delay in seconds before effect is shown (Float)
X Y Z - Origin of beam ring
Start Radius - Start radius of ring beam (Float)
End Radius - End radius of ring beam (Float)
Model Name
Halo Name
Frame Start Index - usually 0 (Int)
Frame Rate - Frame rate of the animation of the model (Int)
Life - Time in seconds that the effect lasts for (Float)
Width - Width of the beam (Float)
Spread - Spread of the beam (Float)
Amplitude - Amplitude of beam (Float)
Red - Red component (Usually 255) (Int)
Green - Green component (Usually 255) (Int)
Blue - Blue component (Ususally 255) (Int)
Alpha - Translucancy of beam (usually 255) (Int)
Speed - Speed of beam (Int)
Beam Flags - Set to 0 for default (See beam_flags.h in Valve SDK for more)

Example command:-

ma_effect 10 A 0 138 -1548 74 16 256 lightning NULL 0 10 20 15 10 1 255 50 128 255 0 0

Effect 11 :- Dynamic Light
Filter - Who sees the effect
Delay - Delay in seconds before effect is shown (Float)
X Y Z - Origin of light
Red - Red component (Usually 255) (Int)
Green - Green component (Usually 255) (Int)
Blue - Blue component (Ususally 255) (Int)
Exponent - Exponent component of light (Int)
Radius - Radius of light (Float)
Time - Life of light in seconds (Float)
Decay - Decay of the light in seconds I think (Float)

Example command:-

ma_effect 11 A 0 138 -1548 100 255 128 128 10 100 10 1

Effect 12 :- Explosion

Filter - Who sees the effect
Delay - Delay in seconds before effect is shown (Float)
X Y Z - Origin of light
Model Name
Scale - Scale of explosion (Float)
Frame Rate - Frame Rate of explosion animation (Float)
Flags - Flags for explosion (See below or tempentity.h in SDK) (Int)
Radius - Radius of explosion (Int)
Magnitude - Magnitude of the explosion (Int)

Hex Values for explosion flags. Add the hex values together to form a final flag number to use

(Copyright Valve).

0x0 // all flags clear makes default Half-Life explosion
0x1 // sprite will be drawn opaque (ensure that the sprite you send is a non-additive sprite)
0x2 // do not render dynamic lights
0x4 // do not play client explosion sound
0x8 // do not draw particles
0x10 // sprite will be drawn alpha
0x20 // rotate the sprite randomly
0x40 // do not draw a fireball
0x80 // do not draw smoke with the fireball

Example command:-

ma_effect 12 A 0 138 -1548 100 lightning 10 10 32 200 255

Effect 13 :- Glow Sprite

Filter - Who sees the effect
Delay - Delay in seconds before effect is shown (Float)
X Y Z - Position of sprite
Model Name
Life - Time in seconds that the effect lasts for (Float)
Size - Size of the sprite (Float)
Brightness - Brightness of the sprite (Int)

Example command:-

ma_effect 13 A 0 138 -1548 200 blueglow 20 5 255

Effect 14 :- Funnel

This only appears to use blank textures (purple/black checkerboard) at the moment

Filter - Who sees the effect
Delay - Delay in seconds before effect is shown (Float)
X Y Z - Position of funnel
Model Name
Reverse Funnel - Reverse the funnel (Int)

Effect 15 :- Metal Sparks

Filter - Who sees the effect
Delay - Delay in seconds before effect is shown (Float)
X Y Z - Position of sparks

Example command:-

ma_effect 15 A 0 138 -1548 100

Effect 16 :- Show Line

This only appears to use blank textures (purple/black checker board) at the moment.

Filter - Who sees the effect
Delay - Delay in seconds before effect is shown (Float)
X Y Z - Position of start of line
X Y Z - Position of end of line

Effect 17 :- Smoke

Filter - Who sees the effect
Delay - Delay in seconds before effect is shown (Float)
X Y Z - Position of smoke
Model Name
Scale - Scale of smoke (Float)
Frame Rate - Frame Rate of smoke (Float)

Example command:-

ma_effect 17 A 0 138 -1548 64 smoke 100 2

Effect 18 :- Sparks

Filter - Who sees the effect
Delay - Delay in seconds before effect is shown (Float)
X Y Z - Position of the sparks
Magnitude - Magnitude of the sparks (Int)
Trail Length - Trail Length of the sparks (Int)

Example command:-

ma_effect 18 A 0 138 -1548 94 255 1

Effect 19 :- Sprite

Filter - Who sees the effect
Delay - Delay in seconds before effect is shown (Float)
X Y Z - Position of sprite
Model Name
Size - Size of the sprite (Float)
Brightness - Brightness of the sprite (Int)

Example command:-

ma_effect 19 A 0 138 -1548 94 smoke 10 64