Raised This Month: $51 Target: $400
 12% 

[TF2] Killing some particles


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
girl
Junior Member
Join Date: Dec 2011
Old 06-19-2012 , 18:32   [TF2] Killing some particles
Reply With Quote #1

Code:
public Action:RemoveParticle( Handle:timer, any:particle ) {
    if ( particle >= 0 && IsValidEntity(particle) ) {
        new String:classname[32];
        GetEdictClassname(particle, classname, sizeof(classname));
        if (StrEqual(classname, "info_particle_system", false)) {
            AcceptEntityInput(particle, "stop");
            AcceptEntityInput(particle, "Kill");
            particle = -1;
        }
    }
}
This function works fine at removing most particles, but fails to get rid of some particles like "diamondback_enemytag_skull_helper" and the duel floating particle (for in TF2 when you start a duel with someone). They fail to properly disappear when ordered to accept "stop" or "kill" and linger indefinitely. I am creating them as normal particle systems and most particles I create this way are properly destroyed when I call this function.

Is there a third input I should be including in here (like... "end" or "finish" or "finishloop" or "pretty please stop")? Or are there just some particles that cannot be removed through accepting entity input?
__________________
mini-Dev for Advanced Weaponiser 2. Have SM scripting experience and want to help contribute scripts/weapons to AW2? Drop by the forums and send me (girl) or "Mecha the Slag" a PM.

Last edited by girl; 06-19-2012 at 22:09.
girl 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 11:24.


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