Particles on models: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
No edit summary
m (Robot: fixing template case.)
Line 30: Line 30:
:Must match the name of an attachment point in the model. This field is only needed if the <code>attachment_type</code> is one that uses an attachment point.
:Must match the name of an attachment point in the model. This field is only needed if the <code>attachment_type</code> is one that uses an attachment point.


{{todo|How are already-emitted particles affected by start/follow?}}
{{TODO|How are already-emitted particles affected by start/follow?}}


[[Category:Particle System]]
[[Category:Particle System]]
[[Category:QC Keyvalues]]
[[Category:QC Keyvalues]]

Revision as of 20:17, 19 January 2009

Particle Effects can be attached to models by adding a "particles" section the model's .qc file. Particles specified in this manner will be created whenever an entity switches to using the model. This usually occurs when an entity is spawned for the first time, but can also happen when an entity dynamically switches models.

Within the .qc's $keyvalues section, the format is as follows:

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

	<further effects>
}
name
Must match the name of one of the .pcf files in the particles/ directory.
attachment_type
Must match one of the valid attachment types. These are:
start_at_origin
The particle effect is created at the origin of the entity it's attached to. The effect doesn't move.
start_at_attachment
The particle effect is created on an attachment point on the entity it's attached to. The effect doesn't move.
follow_origin
The particle effect is created at the origin of the entity it's attached to. The effect is updated to move with the entity's origin.
follow_attachment
The particle effect is created on an attachment point on the entity it's attached to. The effect is updated to move with the attachment point.
attachment_point
Must match the name of an attachment point in the model. This field is only needed if the attachment_type is one that uses an attachment point.
Todo: How are already-emitted particles affected by start/follow?