Problem spawning bullets [UE 4.27]

Hello. I’m spawning bullets fired from a pistol and want to destroy them in 2 seconds. The problem is that only the last bullet fired is destroyed. How to fix it? Thanks!

I assume you’re spawning them rapidly?

By the time the DestroyActor node runs, the reference only points to the latest bullet.

You need to make the bullet a blueprint. That blueprint destroys itself after 2 seconds.

2 Likes

Try this.

It can also be done in the class defaults of the bullet actor:


Alternatively, place the Delay inside the bullet actor, on its Begin Play.

1 Like