Garry's Mod Wiki

PrecacheParticleSystem

PrecacheParticleSystem( string particleSystemName )

Description

Precaches the particle with the specified name.

Arguments

1 string particleSystemName
The name of the particle system.

Example

Example usage of the function. Precaches "ExplosionCore_wall" particle from "particles/explosion.pcf", a Team Fortress 2 particle file.

You can find a list of particles inside a .pcf file using the Particle Editor Tool

game.AddParticles( "particles/explosion.pcf" ) PrecacheParticleSystem( "ExplosionCore_wall" ) if ( SERVER ) then -- A test console command to see if the particle works, spawns the particle where the player is looking at. concommand.Add( "particleitup", function( ply, cmd, args ) ParticleEffect( "ExplosionCore_wall", ply:GetEyeTrace().HitPos, Angle( 0, 0, 0 ) ) end ) end

Page Links


Special Pages


Wikis

?

Render Time: 77ms

DB GetPage 36
Generate Html 7
SaveChanges (1) 10
Render Body 0
Render Sidebar 20