CFunc_Dust

From Source Entities
Jump to navigation Jump to search

Code classes:

CFunc_Dust is a base class for two similar dust-emitting entities.

Warning: This entity can cause CUtlLinkedList overflow crashes in multiplayer! Use particles instead or reduce Particles Per Second.

Note: The default material used by the dust sprites is particle/sparkles.vmt. This is missing from some games, in which case you'll have to copy it from another game. It is normally extremely low-res, so consider overriding this .vmt with a custom one.

Note: The dust is affected by env_wind. This effect is not preventable, except in Csgo-small.png.

Keyvalues[edit | edit source]

Particle Color (R G B) (Color) <color255>
Color of the sprites.
Particles Per Second (SpawnRate) <integer>
Number of particles to spawn, per second.
Minimum Particle Size (SizeMin) <float>
Minimum size sprites can be.
Maximum Particle Size (SizeMax) <float>
Maximum size sprites can be.
Maximum Particle Speed (SpeedMax) <int>
Maximum speed that the particles can move after spawning.
Minimum Particle Lifetime (LifetimeMin) <integer>
Minimum number of seconds until each particle dies. Particles live for a random duration between this and Maximum Particle Lifetime.
Maximum Particle Lifetime (LifetimeMax) <integer>
Maximum number of seconds until each particle dies.
Maximum Visible Distance (DistMax) <integer>
Maximum distance at which particles are visible. They fade to transparency at this distance.
Fall Speed (Not in FGD) (FallSpeed) <float>
Extra downward speed applied to the sprites.
Alpha (Alpha) <integer>
Translucency of the particles. 0 means that they are invisible, 255 means opaque.
Frozen (Frozen) <boolean>
Spawns the number of sprites specified in Particles Per Second, then freezes them all in place. The sprites will never go away, except if the entity is Killed.
Start Disabled (StartDisabled) <boolean>
Stay inactive until sent TurnOn.
Affected By Wind (AffectedByWind) <boolean> (only available in Csgo-small.png)
Allows/disallows env_wind to push the dust sprites.

Inputs[edit | edit source]

TurnOn
Turns the emitter on.
TurnOff
Turns the emitter off.