Funny thing, apparently my common stocks .inc had
PHP Code:
AcceptEntityInput(iChild, "SetParent", iParent, iParent);
Which prevents ClearParent from working properly.
Be sure not to make this mistake ;p
So what do you do to remove particles that linger even if you Stop and Kill them? ("duel_blue" and "duel_red")
PHP Code:
RemoveDuelIcon()
{
new iDuel = EntRefToEntIndex(g_iDuelTargetEntRef);
if (IsValidEnt(iDuel))
{
AcceptEntityInput(iDuel, "ClearParent");
TeleportEntity(iDuel, OFF_THE_MAP, NULL_VECTOR, NULL_VECTOR);
//DelayEntityInput(iDuel, "Stop", 0.05);
DelayEntityInput(iDuel, "Kill", 0.1);
g_iDuelTargetEntRef = INVALID_ENTREF;
}
}
The "Kill" input has to be sent later apparently, else the entity dies in place and leaves its remnants.
duel_icon particles apparently have a long lifetime which is why the particle persists even after the entity is destroyed.
__________________