Particles In Animations: Difference between revisions
No edit summary |
m (Added more info to particle code) |
||
Line 22: | Line 22: | ||
<code>{ event AE_WPN_UNHIDE 120 }</code> | <code>{ event AE_WPN_UNHIDE 120 }</code> | ||
Also these | Also these two can be used to act as a "start and stop" of a particle system on a given model, 0 the particle is hidden until 120. | ||
Note: these dont work after the latest source update | Note: these dont work after the latest source update (works in source2009) | ||
[[Category:Particle System]] | [[Category:Particle System]] | ||
[[Category:Modeling]] | [[Category:Modeling]] |
Revision as of 02:13, 11 January 2012
Particle Effects can be created in animations by using an anim event. Particle effects specified in this manner will be created every time the entity fires that anim event. So if you really want a single particle effect that keeps pumping out particles over time, you want to specify the effect in the model instead.
The anim event is AE_CL_CREATE_PARTICLE_EFFECT. It takes a string parameter that contains the particle effect options, separated by spaces. So, the .qc entry format for this particle effect is as follows:
{ event AE_CL_CREATE_PARTICLE_EFFECT <frame number> "<particle effect name> <attachment type> <attachment point>" }
<particle effect 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
<attachment type>
is one that uses an attachment point.
{ event AE_WPN_HIDE 0 }
{ event AE_WPN_UNHIDE 120 }
Also these two can be used to act as a "start and stop" of a particle system on a given model, 0 the particle is hidden until 120. Note: these dont work after the latest source update (works in source2009)