I have error log. In game nothing bad happens, but I have error message like this:
Error Blueprint Runtime Error:
Attempted to access CollisionComponent
via property K2Node_Event_OtherComp,
but CollisionComponent is pending kill
from node: Branch in graph: EventGraph
in object: BulletProjectile with
description: Attempted to access
CollisionComponent via property
CollisionComponent is pending kill
I’m closing it now, this is very old question. Now I use a lot IsValid check - when you put it on projectile it will work only when is valid, means exists in world and not begin destroy. If is or will be destroyed, you not need additional actions, so it will be ignored and no more error messages like this. IsValid check is very important and it should be used in many other situations where actor, projectile etc can be destroyed and not only. Sometime it is not yet created and game code can want to do something with object, so before is good to add IsValid.
Return true if the object is usable : non-null and not pending kill
This can be pure or normal.
Two solutions, I use both sometimes for same particle.
First and correct way is set particle lifetime (in particle editor). Here various settings. And on create check Auto Destroy [x].
Second - destroy it manually after time or before creating new one. I have it for gun muzzle, it have lifetime but with abusive spawn it sometimes can’t be destroyed normal way. So I have it as variable - after spawn, set variable from this particle. Then, when you will spawn new one same type, to not overlap do another test IsValid. If this particle variable is valid - destroy it and set variable as none.
Here how it looks. I have custom event destroy after time. But this event is also fired before another shot, if particle is valid. I’m not sure this is best solution, but works as expected and I have no issues with it.