616 Game Development and Simulation with Unreal Technology
10. Set the Emit ter Template to P_Fire.
11. Right-click to th e left of the S pawn Emitter at Location and add a Get Actor
Location.
12. Connect return value o f the Get Actor Location to the Location channel of the
Spawn Emitter at Location.
13. From the Spawn Emitter at Loca tion node dr ag off a new Set Relative Scale
3D node.
14. Set the Re turn Value of the P_Fire Spawn Emitter at Location node to the
target of the Set Relative Scale 3D node. Note: You may have to uncheck the
Context Sensitive option to be able to search for this node.
15. Enter the New Scale 3D values of 5.0, 5.0, 5.0, for X , Y, and Z, respectively.
16. From the Set Relative Sc ale 3D node drag off another Spawn Emitter at
Location node.
17. Set the Emit ter Template o f the second emitter to P_Explosion.
18. Add another Relative Sc ale 3D to the right of the second explosion emitter we
just created.
19. Set the Return Val ue of the P_Explosion Spawn Emitter at Location node
to the target of the second Set Relative Scale 3 D node. No te : You may have to
uncheck the Co ntext Sensitive option to be able to search for this node.
20. Enter th e second New Scale 3D values to 5.0, 5.0, 5.0, for X, Y, and Z, re spec-
tively (see Figure 9.46).
21. Compile and save yo ur blu eprints and your progre ss so far.
22. You can te st drive and see how the player explodes and catches on fire after its
destruction.
What Happened in TUTORIAL 9.13. . .
In this tutorial we set up a mechanism to spawn a particle system whenever th e
player and the enemy die. This will give us a b etter visual effec t to convey to the
player, visually, when an enemy actor is destroyed or when the player actor is
destroyed.
We chose a particle system from the S tarter Content that simulates the
effects of an explosion. We used the destroyed actors location as the spawning
location for our visual e ffect. We also need to m odify the scale of the particle
system to represent the appropriate sizes of the player and the e nemy actors and
the explosion they should create when they are destroyed.
9.9.2 HIT VISUAL EFFECTS
Let us implement some visual effects to enhance our g ame. We want to have the
bullets to burst some spa rks when they h it an enemy or the walls. To do this we will
set up a mechanism to spawn sparks particle systems when a hit event occurs. We