Game Development Reference
In-Depth Information
bullet
As the
Delay
node is broken for my current version of Unreal Engine, I had to find a way
to ask the bullet to wait for a while after it is spawned and then destroy itself.
The best and most efficient way to fix the
Delay
node was using a
timeline
node and set-
ting its duration to
4
seconds. Then, when the animation finished, I called
Destroy Actor
.
The rest of the calculations of the bullet were done using
OnComponentBeingOverlap
and checking the overlapped components.
If the overlapped component had an
enemy
tag then I just called
Destroy actor
to destroy
the parent actor that holds this component. Finally, I used a quick search method such as
Get All Actors Of Class
to look for the
uiText
class and called its
setScore
custom event
to add
1
to the score and the UI.
Search WWH ::
Custom Search