Triggers (Generator)

From Doomsday Wiki
Jump to: navigation, search

State triggered

State triggering means that the generator is spawned when any mobj enters the state the generator has been associated with. The mobj in question will become the source of the generator. State triggering is especially useful with "one time" effects such as explosions.

Note: This trigger method should be avoided with things that have a loop of states (if the spawn flag is not also used). This can lead to generators being spawned more frequently than necessary (perhaps breaching the active generator limit).

Type triggered

All type triggered generators are spawned at the beginning of a level. Each type triggered generator definition gets its own particle generator entity. Type triggering makes the generator multi-sourced: all mobjs in the level with one of the types associated with the generator will act as particle sources.

Note: A fairly large number of particles need to be allocated in the definition as all mobjs in the map will share the same generator.

Syntax Example

The following snippet illustrates the typical form of generators using the type triggered method:

Code:
Generator {
}

Damage triggered

Damage triggered generators are spawned when a mobj of given type receives damage.

Limitation: Damage triggered particle generators currently do not work on client side (netgames and demos).

Flat triggered

Flat triggering works a bit differently. The map is periodically checked for any planes (floors and ceilings) with the specified flat assigned as it's texture. A generator is spawned for all planes that match the associated flat. The sector to which the plane belongs will become the source of the generator. The origin of the particles can be the ceiling or floor plane, or the space in between. The default behaviour can be modified using the floor, ceiling and space flags. Each plane can have only one generator (therefore each sector can have up to two generators).

Map triggered

Map triggered generators are all spawned in the beginning of a map, but only if the level has a map ID that matches the generator's. Map triggered generators use Center to define their origin because they have no object to act as a source.

Note: When using map triggered generators it's probably best to set Max age and Spawn age to -1, to allow the generator to operate indefinitely.