Hey! I am new to programming in UE4. In my game, I am trying to create a small gunSmoke effect that comes out of the barrel of a gun after it has been fired. I managed to get a nice particle and the code set up to instantiate it, but I have no idea of how to get rid of it. Is there a way to set a time for the emmitter to stop spawning particles? Here is what I am using to spawn the particles:
if (gunSmoke != NULL)
{
UGameplayStatics::SpawnEmitterAttached(
gunSmoke, //UParticleSystem*
Mesh1P,
"wpSocket",
FVector(0, 0, 0), //relative offset
FRotator(0, 0, 0), //relative rotation
EAttachLocation::KeepRelativeOffset,
true //auto delete on completion
);
}