Raised This Month: $ Target: $400
 0% 

Killing particle effects


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
x6herbius
Senior Member
Join Date: May 2011
Location: West Sussex, UK
Old 09-01-2011 , 12:56   Killing particle effects
Reply With Quote #1

I'm trying to parent a particle effect to players, which works apart from when I kill it - even though the info_particle_system itself has gone, the particles still hover in the air unanimated. I'm using AcceptEntityInput(ent, "Kill"), should I be doing something else?
x6herbius is offline
Send a message via Skype™ to x6herbius
BrianGriffin
Senior Member
Join Date: Oct 2008
Old 09-02-2011 , 10:45   Re: Killing particle effects
Reply With Quote #2

What game/particle effect are you using? I've never had any of this happen in L4D or TF2.

Are you sure you are killing the particle effect and not something else?

AcceptEntityInput should work (works for me in l4d2). Another way can be:

Code:
SetVariantString("OnUser1 !self:Kill::0.0:-1");
AcceptEntityInput(entityIndex, "AddOutput");
AcceptEntityInput(entityIndex, "FireUser1");
but I don't see why this would work when "kill" doesn't.
BrianGriffin is offline
x6herbius
Senior Member
Join Date: May 2011
Location: West Sussex, UK
Old 09-02-2011 , 11:17   Re: Killing particle effects
Reply With Quote #3

At the moment I'm testing with the duel and nemesis icons (for an assassin and target respectively). I had made my own particle effects but couldn't get them to show up in-game through the code (may have been precaching issues?), so I tested with some stock effects first.
x6herbius is offline
Send a message via Skype™ to x6herbius
BrianGriffin
Senior Member
Join Date: Oct 2008
Old 09-02-2011 , 11:19   Re: Killing particle effects
Reply With Quote #4

Can't get custom particles into the game via Sourcemod. The client refuses to precache particles not in a proper particle_manifest wich you can't change serverside.
BrianGriffin is offline
x6herbius
Senior Member
Join Date: May 2011
Location: West Sussex, UK
Old 09-02-2011 , 12:47   Re: Killing particle effects
Reply With Quote #5

Ah. That might become a problem then.

Is it actually possible to parent an env_sprite_oriented to a player? The way I saw used in a donator plugin was to teleport the sprite OnGameFrame to mimic the client's speed and direction, so I assumed (perhaps wrongly) that SetParent wouldn't work. If it does, sprites should be adequate for me since SetParent should stop them from lagging behind the player and getting in the way if they look backwards.
x6herbius is offline
Send a message via Skype™ to x6herbius
nxlinux
Member
Join Date: Oct 2013
Location: China
Old 10-18-2016 , 13:23   Re: Killing particle effects
Reply With Quote #6

i found some particles cant accept kill command like aircraft_landing_light

this particles cant be stop and killed

code 1:
PHP Code:
SetVariantString("OnUser1 !self:Kill::0.5:-1");
AcceptEntityInput(particle"AddOutput");
AcceptEntityInput(particle"FireUser1");
AcceptEntityInput(particle"Start"); 
code 2:
PHP Code:
public Action:DeleteParticles(Handle:timerany:particle)
{
    
/* Delete particle */
    
if (IsValidEntity(particle) && IsValidEdict(particle))
    {
        new 
String:classname[64];
        
GetEdictClassname(particleclassnamesizeof(classname));
        if (
StrEqual(classname"info_particle_system"false))
        {
            
AcceptEntityInput(particle"stop");
            
AcceptEntityInput(particle"kill");
            
RemoveEdict(particle);
        }
    }

all of that operation not work, why?
nxlinux is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 15:57.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode