This article's documentation is for anything that uses the Source engine. Click here for more information.

Env spark: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
m (ext link to AKG tut)
No edit summary
 
(31 intermediate revisions by 18 users not shown)
Line 1: Line 1:
{{wrongtitle|title=env_spark}}
{{LanguageBar}}
==Entity Description==
{{CD|CEnvSpark|file1=EnvSpark.cpp}}
An entity used to create sparks at its origin.
{{This is a|point entity|name=env_spark|sprite=1}} It is used to create sparks at its origin.
==Keyvalues==
__NOTOC__
* {{kv targetname}}
 
* {{kv parentname}}
[[File:env_spark.jpg|right|thumb|200px|<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.]]
* {{kv angles}}
 
* '''MaxDelay'''
 
: <integer> The longest delay between sparks (in seconds).
 
* '''Magnitude'''
== Flags ==
: <integer> The size of the sparks. Feel free to try other values than the following:
{{fl|64|Start ON}}
:{|
{{fl|128|Glow}}
! Literal Value || Description
{{fl|256|Silent}}
|-
{{fl|512|Directional}}
| 1 || Small
 
|-
== Keyvalues ==
| 2 || Medium
{{KV Targetname}}
|-
{{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.}}
| 5 || Large
{{KV|Magnitude|intn=Magnitude|choices|The amount of the sparks.
|-
:*1: Small
| 8 || Huge
:*2: Medium
|}
:*5: Large
* '''TrailLength'''
:*8: Huge}}
: <choices> Spark Trail Length
{{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
! Literal Value || Description
:*2: Medium
|-
:*3: Long}}
| 1 || Short
 
|-
== Inputs ==
| 2 || Medium
{{I|StartSpark|Start the spark effect.}}
|-
{{I|StopSpark|Stop the spark effect.}}
| 3 || Long
{{I|ToggleSpark|Toggle the on/off state of the spark effect.}}
|}
{{I|SparkOnce|Spark once.}}
==Flags==
 
* 64 : Start ON
== Outputs ==
* 128 : Glow
{{O|OnSpark|nofgd=1|Fired when the sparks emit.}}
* 256 : Silent
 
* 512 : Directional
[[Category:Special effects]]
==Inputs==
* {{i targetname}}
* {{i parentname}}
* '''StartSpark'''
: Start the spark effect.
* '''StopSpark'''
: Stop the spark effect.
* '''ToggleSpark'''
: Toggle the on/off state of the spark effect.
* '''SparkOnce'''
: Spark once.
==Outputs==
* {{o targetname}}
==External links==
*[http://www.akilling.org/akg/tutorials/wiseElec.asp Shocking]
[[Category:Entities]]

Latest revision as of 10:03, 25 September 2024

English (en)Translate (Translate)
C++ Class hierarchy
CEnvSpark
CPointEntity
CBaseEntity
C++ EnvSpark.cpp
Env spark.png

env_spark is a point entity available in all Source Source games. It is used to create sparks at its origin.


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.


Flags

Start ON : [64]
Glow : [128]
Silent : [256]
Directional : [512]

Keyvalues

Name (targetname) <string>[ Edit ]
The name that other entities refer to this entity by, via Inputs/Outputs or other keyvalues (e.g. parentname or target).
Also displayed in Hammer's 2D views and Entity Report.
See also:  Generic Keyvalues, Inputs and Outputs available to all entities

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.