CNewParticleEffect CreateParticleSystemNoEntity( string effect, Vector pos, Angle ang = Angle( 0, 0, 0 ) )
This was just added in the latest version (2023.05.10). It might only be available on the Dev Branch right now.
Creates a new particle system, and sets control points 0 and 1 to given position, as well as optionally orientation of CP0 to the given angles. See also CreateParticleSystem
The particle effect must be precached with PrecacheParticleSystem and the file its from must be added via game.AddParticles before it can be used!
1 string effect
The name of the effect to create. It must be precached.
2 Vector pos
The position for the particle system.
3 Angle ang = Angle( 0, 0, 0 )
The orientation of the particle system.
The created particle system.
Displays a big explosion effect at the place the player is looking at.
PrecacheParticleSystem( "explosion_huge_g" ) local pos = Entity( 1 ):GetEyeTrace().HitPos CreateParticleSystemNoEntity( "explosion_huge_g", pos )