Env spark: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
mNo edit summary
(updates)
Line 1: Line 1:
[[File:env_spark.jpg|thumb|300px|right|env_spark with directional, glowing medium sized sparks]]
{{lang|Env spark}}
[[File:env_spark.jpg|thumb|500px|right|<code>env_spark</code> with directional, glowing medium-sized sparks. By default, the sparks jump up a bit from the origin of the entity, so if you are attempting to create a sparks like this, you must use the ''Directional'' flag and point the entity downwards.]]
{{base point|env_spark|sprite=1}} It is used to create sparks at its origin.


{{base point|env_spark|sprite=1}} It is used to create sparks at its origin.
{{code class|CEnvSpark|EnvSpark.cpp}}
{{note|By default, the sparks jump up a bit from the origin of the entity, so if you are attempting to create a situation like in the picture on the right, you must use the '''Directional''' flag and direct the entity downwards.}}
 
{{clearleft}}


== Keyvalues ==
==Flags==
{{KV|Max Delay|string|The longest delay between sparks (in seconds).}}
*64: Start ON
{{KV|Magnitude|choices|The size of the sparks.}}
*128: Glow
:* 1 : Small
*256: Silent
:* 2 : Medium
*512: Directional
:* 5 : Large
:* 8 : Huge
{{KV|Spark Trail Length|choices|Length of the spark trails.}}
:* 1 : Short
:* 2 : Medium
:* 3 : Long
{{KV Targetname}}
{{KV Parentname}}
{{KV Angles}}


== Flags ==
==Keyvalues==
* 64 : Start ON
{{KV|Max Delay (MaxDelay)|string|The longest delay between sparks (in seconds). If this value is changed with {{ent|AddOutput}}, the change will only take effect after the entity sparks again.}}
* 128 : Glow
{{KV|Magnitude (Magnitude)|int|The amount of the sparks.
* 256 : Silent
:*1: Small
* 512 : Directional
:*2: Medium
:*5: Large
:*8: Huge}}
{{KV|Spark Trail Length (TrailLength)|int|Length of the spark trails. Other numbers may be entered to create extremely long or short trails.
:*1: Short
:*2: Medium
:*3: Long}}
{{KV BaseEntity}}


== Inputs ==
==Inputs==
{{IO|StartSpark|Start the spark effect.}}
{{IO|StartSpark|Start the spark effect.}}
{{IO|StopSpark|Stop the spark effect.}}
{{IO|StopSpark|Stop the spark effect.}}
{{IO|ToggleSpark|Toggle the on/off state of the spark effect.}}
{{IO|ToggleSpark|Toggle the on/off state of the spark effect.}}
{{IO|SparkOnce|Spark once.}}
{{IO|SparkOnce|Spark once.}}
{{I Targetname}}
{{I BaseEntity}}
{{I Parentname}}


== Outputs ==
==Outputs==
{{O Targetname}}
{{IO|OnSpark|nofgd=1|Fired when the sparks emit.}}
{{O BaseEntity|l4d=1}}


[[Category:Special effects]]
[[Category:Special effects]]

Revision as of 00:00, 2 October 2018

English (en)Translate (Translate)
env_spark with directional, glowing medium-sized sparks. By default, the sparks jump up a bit from the origin of the entity, so if you are attempting to create a sparks like this, you must use the Directional flag and point the entity downwards.

Template:Base point It is used to create sparks at its origin.

C++ In code, it is represented by theCEnvSparkclass, defined in theEnvSpark.cppfile.

Flags

  • 64: Start ON
  • 128: Glow
  • 256: Silent
  • 512: Directional

Keyvalues

Max Delay (MaxDelay) ([todo internal name (i)]) <string>
The longest delay between sparks (in seconds). If this value is changed with AddOutput, the change will only take effect after the entity sparks again.
Magnitude (Magnitude) ([todo internal name (i)]) <integer>
The amount of the sparks.
  • 1: Small
  • 2: Medium
  • 5: Large
  • 8: Huge
Spark Trail Length (TrailLength) ([todo internal name (i)]) <integer>
Length of the spark trails. Other numbers may be entered to create extremely long or short trails.
  • 1: Short
  • 2: Medium
  • 3: Long


Inputs

StartSpark
Start the spark effect.
StopSpark
Stop the spark effect.
ToggleSpark
Toggle the on/off state of the spark effect.
SparkOnce
Spark once.


Outputs

OnSpark  !FGD
Fired when the sparks emit.