User Tools

Site Tools


ded:generator_triggers

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
ded:generator_triggers [2017-03-20 08:02]
skyjake
ded:generator_triggers [2017-03-20 08:02] (current)
skyjake [State triggered]
Line 1: Line 1:
 +====== Particle generator triggers ======
 +
 +
 +===== 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.
 +
 +This trigger method should be avoided with [[thing]]s that have a loop of states (if the [[generator#​Flags|spawn]] flag is not also used). This can lead to generators being spawned more frequently than necessary (perhaps breaching the [[generator#​Limitations|active generator limit]]).
 +
 +
 +===== Thing type triggered =====
 +
 +
 +All //thing type// triggered generators are spawned at the beginning of a level. Each thing type triggered generator definition gets its own particle generator entity. Type triggering makes the generator multi-sourced:​ all [[mobj]]s 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.</​note>​
 +
 +
 +==== Syntax Example ====
 +
 +The following snippet illustrates the typical form of generators using the type triggered method:
 +
 +  Generator {
 +      Mobj = "​SKULL"; ​  # Named mobj type ID
 +      Spawn Age = -1;   # No spawn age limit
 +      Max Age = -1;     # No max age limit
 +      Particles = 600;  # Large number of particles
 +      # ... more definition statements ...
 +  }  ​
 +
 +===== Damage triggered =====
 +
 +//Damage// triggered generators are spawned when a [[mobj]] of given type receives damage.
 +
 +<​note>​Damage triggered particle generators currently do not work on client side (netgames and demos).</​note>​
 +
 +
 +===== Flat triggered =====
 +
 +
 +//Flat// triggering works a bit differently. The map is periodically checked for any [[plane]]s (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 [[generator#​Flags|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 you may want to set ''​Max age''​ and ''​Spawn age''​ to **-1**, to allow the generator to operate indefinitely.</​note>​
 +
 +
  
ded/generator_triggers.txt ยท Last modified: 2017-03-20 08:02 by skyjake