Garry's Mod Wiki

CNewParticleEffect

This object represents a .pcf ( Orange Box ) particle system. Created by Entity:CreateParticleEffect and CreateParticleSystem.

Methods

CNewParticleEffect:AddControlPoint( number cpID, Entity ent, number partAttachment, string entAttachment = nil, Vector offset = Vector( 0, 0, 0 ) )
Adds a control point to the particle system. This function will not work if the CNewParticleEffect:GetOwner entity is not valid
boolean CNewParticleEffect:GetAutoUpdateBBox()
string CNewParticleEffect:GetEffectName()
Returns the name of the particle effect this system is set to emit.
boolean CNewParticleEffect:GetHighestControlPoint()
Returns the highest control point number for given particle system.
Entity CNewParticleEffect:GetOwner()
Returns the owner of the particle system, the entity the particle system is attached to.
Vector, Vector CNewParticleEffect:GetRenderBounds()
Returns the bounding box of the particle effect, including all the particles it emitted.
boolean CNewParticleEffect:IsFinished()
Returns whether the particle system has finished emitting particles or not.
boolean CNewParticleEffect:IsValid()
Returns whether the particle system is valid or not.
boolean CNewParticleEffect:IsViewModelEffect()
Returns whether the particle system is intended to be used on a view model?
CNewParticleEffect:Render()
Forces the particle system to render using current rendering context. Can be used to render the particle system in vgui panels, etc. Used in conjunction with CNewParticleEffect:SetShouldDraw.
CNewParticleEffect:Restart()
Forces the particle system to restart emitting particles.
CNewParticleEffect:SetControlPoint( number cpID, Vector value )
Sets a value for given control point.
CNewParticleEffect:SetControlPointEntity( number cpID, Entity parent )
Sets an entity to given control point for particle to use.
CNewParticleEffect:SetControlPointForwardVector( number cpID, Vector forward )
Sets the forward direction for given control point.
CNewParticleEffect:SetControlPointOrientation( number cpID, Vector forward, Vector right, Vector up )
Sets the orientation for given control point.
CNewParticleEffect:SetControlPointParent( number childID, number parentID )
Essentially makes child control point follow the parent control point.
CNewParticleEffect:SetControlPointRightVector( number cpID, Vector right )
Sets the right direction for given control point.
CNewParticleEffect:SetControlPointUpVector( number cpID, Vector upward )
Sets the upward direction for given control point.
CNewParticleEffect:SetIsViewModelEffect( boolean isViewModel )
Set whether this particle effect is a view model effect or not. This will have an effect on attachment positioning and other things.
CNewParticleEffect:SetShouldDraw( boolean should )
Forces the particle system to stop automatically rendering. Used in conjunction with CNewParticleEffect:Render.
CNewParticleEffect:SetSortOrigin( Vector origin )
Sets the sort origin for given particle system. This is used as a helper to determine which particles are in front of which.
CNewParticleEffect:StartEmission( boolean infiniteOnly = false )
Starts the particle emission.
CNewParticleEffect:StopEmission( boolean infiniteOnly = false, boolean removeAllParticles = false, boolean wakeOnStop = false )
Stops the particle emission.
CNewParticleEffect:StopEmissionAndDestroyImmediately()
Stops particle emission and destroys all particles instantly. Also detaches the particle effect from the entity it was attached to. This function will work identically to CNewParticleEffect:StopEmission( false, true ) if CNewParticleEffect:GetOwner entity is not valid. Consider using CNewParticleEffect:StopEmission( false, true ) instead, which has same effect, but doesn't require owner entity, and does't detach the particle system from its entity.