Sorry if that title is a bit of a mouthful. Basically, what I'm trying to do is make a donator specific plugin that will allow donators to choose a particle effect that they can walk around with, parented to them.
I've got things going for the most part, however when parenting the particle effect to the player, it trails as the player moves until the particles decay. What I want is for the particle system to be constrained to the player so that the ENTIRE system moves with the player.
To better understand, here's how the particles behave now:
What I'm using to create the particle is a slightly modified function from some TF2 particle plugin for projectiles:
Code:
stock CreateParticle(client, String:szParticleEffectName[])
{
new iParticle = CreateEntityByName("info_particle_system");
if (IsValidEdict(iParticle))
{
decl Float:fPosition[3];
GetEntPropVector(client, Prop_Send, "m_vecOrigin", fPosition);
TeleportEntity(iParticle, fPosition, NULL_VECTOR, NULL_VECTOR);
DispatchKeyValue(iParticle, "effect_name", szParticleEffectName);
SetVariantString("!activator");
AcceptEntityInput(iParticle, "SetParent", client, iParticle, 0);
DispatchSpawn(iParticle);
ActivateEntity(iParticle);
AcceptEntityInput(iParticle, "Start");
}
}
Having that trail is a bit undesirable, as at least in this particular game, you have instances where you need to get away from somebody or they'll kill you. And with a particle effect, well, that makes you that much more of an easy target.
I'm unsure if the issue is with the particle effect itself or if it's with the script. I'd also be interested in doing this with a set of custom particles, however without having a modified particles_manifest.txt (or the ability to download the custom particle effect) it doesn't seem like it can be done. Though I'm sure you can force it to download, I was wondering if maybe it would be possible to append to particles_manifest.txt, as with this particular game, it does not use .vpk files.
Any help is greatly appreciated.