Is there a way using lua to remove effects and particles from clients’ screens?
Do you have the references of those particles?
No, but is there a way to “get” the effects and particles? Like how you get players with player.GetAll() and entities with ents.GetAll().
Last try… Bump.
If nobody replies maybe is because no ones know
I don’t know how can you get ALL particles spawned in game, maybe no one else knows, maybe you should rework it than keep waiting
for _, v in pairs( ents.FindByClass( 'info_particle*' ) ) do v:Remove() end for _, v in pairs( ents.FindByClass( 'env_particle*' ) ) do v:Remove() end
env_particlelight and env_particlescript are created by the engine, otherwise info_particle_system appears to be the GMod standard (for ParticleEffect, util.Effect, etc. I’m not positive though)
I have no idea how this will behave on the serverside and/or clientside, but if I had to guess they’d exist on both.
Edit: Ok maybe I was wrong about the creation on serverside. In my tests using ParticleEffect and util.Effect on the server didn’t add anything to #ents.GetAll()
Here’s the real question; why do you need to do that anyway?
Particles don’t randomly persist for no reason.
Do you have broken addons that are leaving permanent junk particles?
You probably have broken addons.
Try removing or fixing your broken addons instead of looking for a hacky bandaid for it.
Well, yeah they don’t persist, but they sure as hell love causing client lag. Especailly if it’s one of those big explosion effects that kinda spread out in quite a big radius. None of the addons are broken. But anyways, seeing how there probably is no way to do this in lua, I’m going to close the thread.