622 Game Development and Simulation with Unreal Technology
In this tutorial we implemented the visual effects for when our projectiles hit an
object. We want to create a spark-like effect to show that the projectiles hit the
object at a high speed and created the spark.
To achieve this effect, we cannot directly use any of the particle systems
that come with the Starter Content. However, the Starter Content comes
with a spa rk effect that we can mo dify to suit our needs.
We first duplicated the P_Sparks effects fro m the Starter Content in or-
der to keep the original spark particle system intact. We then opened the du-
plicated spark s pa rticle system in the Cascade Particle Editor and made the
modifications we needed. These modifications included the ch anges to the Color
and Color Over Life modules distributions of the two emitter components in
the particle system to give them a Fiery look. We also made m odifications to the
Spawn and Burst Rat e of these two emitter modules.
Our g ame is almost complete! The only remaining item is to create an effect on the
player and enemy ma te rials to flash with a bright color for a fraction of a second to
give them the effect of being hit and sustaining some damage.
In th e next tutorial, we will impleme nt the hit flash effect by using ma te rial interfaces.
The material interface objects give us the ability to communicate from our blueprint
with the unreal en gine to change the object’s mater ia l at runtime.
FIND ON THE WEBSITE
To find updates to this tutorial and upda te d instructions about its implementa-
tion on othe r UE4 versions, p le ase visit the book’s companion Website at:
http://www.RVRLAB.com/UE4Book/
TUTORIAL 9.15 Player and Enemy’s Hit Visual Effects
In this tutorial we will add some visual feedback for when the player or an
enemy is hit. To achieve this, we will set up a network to make some changes
to the materials in such a way that it flashes when the object is hit.
SETTING UP THE MATERIALS
Let us first create a material with an ember c olor and a relatively high emissive
property. This will be the material we will use as a flash.
1. Go to the main editor and create a new material. You may create a new folder to