Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases now! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Unreal Engine 4 Game Development Essentials

You're reading from   Unreal Engine 4 Game Development Essentials Master the basics of Unreal Engine 4 to build stunning video games

Arrow left icon
Product type Paperback
Published in Feb 2016
Publisher
ISBN-13 9781784391966
Length 266 pages
Edition 1st Edition
Tools
Arrow right icon
Authors (2):
Arrow left icon
Satheesh P.V Satheesh P.V
Author Profile Icon Satheesh P.V
Satheesh P.V
Satheesh PV Satheesh PV
Author Profile Icon Satheesh PV
Satheesh PV
Arrow right icon
View More author details
Toc

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 connect our DestroyAfter variable to the duration of Delay.

  • Right-click on the graph and search for Spawn Emitter At Location. This node will spawn the given particle effect at the specified location and rotation. Connect Delay to this node and set a...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime