Poll

What platform would you run Quetoo on if it was on Steam?:

The Emit Entity

The misc_emit entity is a client-sided entity type used to enrich your levels with non-vital information such as static models, particle torches, flickering lights, and ambient sounds. This entity is highly customizable based on several key-value pairs.

Similar to Quake 2's spawnflags key-value pair, a set of flags exists for enabling certain misc_emit features. Whenever possible, these are automatically resolved by the game engine based on the key-value pairs you have set on the entity. Still, you will sometimes need to add these values to the flags key-value pair manually.

    EMIT_LIGHT      1
    EMIT_SPARKS     2
    EMIT_STEAM      4
    EMIT_FLAME      8
    EMIT_CORONA     16
    EMIT_SOUND      32
    EMIT_MODEL      64
flags
A bit-masked integer value; see above. When possible, flags are automatically resolved by the game engine based on the presence of other key-value pairs described below. However, some flag values must manually be set.
angles
3 positive floating point values in degrees, these provide directional information. Applicable to EMIT_SPARKS EMIT_MODEL.
color
3 positive floating point values, these provide rgb color information. Applicable to EMIT_LIGHT EMIT_CORONA.
count
A positive integer value which provides particle count information. Applicable to EMIT_SPARKS. Default is 12.
drift
A positive floating point value which provides some variance to event frequency. Values greater than 0.0 and smaller than 5.0 are most useful. Applicable to EMIT_LIGHT EMIT_SPARKS EMIT_STEAM EMIT_FLAME EMIT_SOUND. Default is 0.01.
hz
A positive floating point value which provides an event frequency baseline. Applicable to EMIT_LIGHT EMIT_SPARKS EMIT_STEAM EMIT_FLAME EMIT_SOUND. Use the drift key to add variance. Sane defaults are used where possible.
model
The game path of a model file, e.g. outpost/tree. The model must be a static mesh (i.e. not animated). It will be positioned according to the angles key. Applicable only to EMIT_MODEL, which is set when this key is present.
radius
A single floating point value which provides radius information. Applicable to EMIT_LIGHT EMIT_CORONA EMIT_FLAME. Defaults are 1.5, 12.0 and 1.0 respectively.
sound
The game path of a sound sample, e.g. aghast/drip. When no hz value is provided to emits which have a sound key, they are treated as looped ambient sounds. Applicable only to EMIT_SOUND, which is set when this key is present.
velocity
3 floating point values in units, these provide directional velocity information. Applicable to EMIT_STEAM
attenuation
Determines the size of the area in which a given sound is heard. Default is 1. Lower values will increase the range of the sound, whereas higher values will make the sound more localized. Setting this to -1 will make a sound play globally. Applicable to EMIT_SOUND

Examples

A torch flame, automatically accompanied by a crackling fire sound effect:

{
    // entity 1
    "classname" "misc_emit"
    "origin" "-24 512 256"
    "flags" "8"
 }

An ambient drip:

{
    // entity 2
    "classname" "misc_emit"
    "origin" "786 1284 16"
    "sound" "aghast/drip"
}

A flickering light with sparks:

{
    // entity 3
    "classname" "misc_emit"
    "origin" "-224 640 -64"
    "angles" "0 270 0"
    "flags" "3"
    "color" "1.0 0.9 0.5"
    "radius" "1.25"
    "count" "20"
    "hz" "0.25"
    "drift" "0.5"
}

A steam emitter, pointing downward and slightly north-east, and automatically accompanied by a hissing sound effect:

{
    // entity 4
    "classname" "misc_emit"
    "origin" "216 -48 512"
    "flags" "4"
    "velocity" "10 10 -40"
}

A static mesh tree:

{
    // entity 5
    "classname" "misc_emit"
    "origin" "-1024 -42 168"
    "model" "outpost/tree"
    "angles" "4 270 0"
}