Control Point (particles)

From Valve Developer Community
Revision as of 13:43, 9 August 2014 by Cs italy (talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Control Points are used to pass data into and between particle systems. A system can have up to 64, each of which can store the following:

The meanings of these values are flexible however, and "cheats" such storing an RGB colour in the origin value are supported.

Particle systems inherit the control points of their parents.

Note:Control Points 0 (vecOrigin) and 1 (vecStart) are defined when dispatching from the server. Be aware of this when choosing which CPs to use in your system.


Within a particle system

Use one of these Operators:

In a map

Fill in the fields of the info_particle_system used to spawn the system. CP0 is the origin of the entity.

In code

See Particles In Code#Control points.

In a QC

Confirm:It is not possible to configure control points when compiling a model.
However, see the Position on Model Random initializer.

Mapping to other values

Mapping functions

Remap Control Point to Scalar
Remap Distance to Control Point to Scalar
Remap Distance Between Two Control Points to Scalar
Remap Control Point to Vector
Note:There is no 'CP to Vector' operator, just this initializer. The reasons for this omission are not clear.
Remap Control Point to Scalar
Remap Initial Distance to Control Point to Scalar

Potential targets

Creation time
Roll speed
Alpha alternate
Sequence number
Sequence number 1
Trail length
Particle ID
RGB Colour (normalised)


These sample values from CPs rather than remapping their literal values:

Spawning children at control points

By default, child systems spawn at their parent's origin. To change this, use one of the "Position" Initializers with a reference to the appropriate CP number.