October 2016
Intermediate to advanced
452 pages
9h 47m
English
Let's look at how we can destroy an Actor.
Actor as your base class.Actor, add the following code to the BeginPlay function:SetLifeSpan(10);
Actor into the viewport within the Editor.Actor instance disappears after 10 seconds, having destroyed itself.BeginPlay function so that it executes when the game starts.SetLifeSpan(10);: The SetLifeSpan function allows us to specify a duration in seconds, after which the Actor calls its own Destroy() method.Read now
Unlock full access