Particles on models

From Valve Developer Community
(Redirected from Particles On Models)
Jump to: navigation, search

Particles can be attached to models with the $keyvalues QC command. Adding a particles section to it allows any number of effects to spawn on the model, and optionally to follow it around.

Note.png Note: Particles will not appear if the model is used with prop_static.
Tip.png Tip: To attach particles to models programmatically, see Particles In Code.


Within the $keyvalues block:

		name			"<particle effect name>"
		attachment_type		<attachment type>
		attachment_point	<name of attachment point>

	<further effects>
The name of a particle system. NOT the name of a .pcf file!
Must match one of the valid attachment types. These are:
The effect spawns at the origin or an attachment of the model. After this, it moves independently. Good for very short effects like explosions or blood spurts.
The effect spawns at the origin or an attachment of the model. After this it follows the origin/attachment, rotating and moving to maintain its relative position. Good for long-term emmisive effects like smoke or trails.
The attachment point at which the particle system should spawn, if applicable.

From the point of view of the particle system, you can use several initialisers and operators which will affect how it behaves if it is set to follow an attachment or an origin. The motion of the particles can "follow" the control point by using the Movement Lock to Control Point operator.

You can also use the Position on Model Random initializer to spawn the system dynamically across the model.