Env spark: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
(massive img)
m (Fix internal name format, fix expected value types for KVs)
Line 14: Line 14:


==Keyvalues==
==Keyvalues==
{{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.}}
{{KV|Max Delay|intn=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.}}
{{KV|Magnitude (Magnitude)|int|The amount of the sparks.
{{KV|Magnitude|intn=Magnitude|choices|The amount of the sparks.
:*1: Small
:*1: Small
:*2: Medium
:*2: Medium
:*5: Large
:*5: Large
:*8: Huge}}
:*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.
{{KV|Spark Trail Length|intn=TrailLength|choices|Length of the spark trails. Other numbers may be entered to create extremely long or short trails.
:*1: Short
:*1: Short
:*2: Medium
:*2: Medium

Revision as of 04:45, 3 April 2021

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) <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) <choices>
The amount of the sparks.
  • 1: Small
  • 2: Medium
  • 5: Large
  • 8: Huge
Spark Trail Length (TrailLength) <choices>
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.