O'Reilly logo

Unreal Engine 4 Game Development Essentials by Satheesh PV

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Destroying our Blueprint Actor after some seconds

Once we place or spawn this Actor in world we will destroy this actor with a particle effect and sound. To do that:

  • Create a new variable (float) and name it DestroyAfter. Let's give it a default value of five seconds.
  • Go to Event Graph and add a new event called Event BeginPlay. This node is immediately executed when the game starts or when the actor is spawned in the game.
  • Right-click on the graph editor and search for Delay and add it. Connect Event BeginPlay to the Delay node. This node is used to call an action after a number of specified seconds.
  • The Delay node takes a float value, which is used for the duration. After the duration runs out, execution is continued to the next action. We will ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required