In this step you will be finishing off the GrenadeGunPistol Blueprint by adding a particle system, sound, a radial force, and finally cleaning up the gun after the explosion.
Using the techniques learned in previous sections, create a Add Radial Force Component node.
It needs a transform, so create a Make Transform node and connect its output to the Relative Transform pin on the Add Radial Force Component.
Select the Add Radial Force Component and change Impulse Strength to 650.0. Enable Impulse Vel Change, Enable Ignore Owning Actor, and Force Strength to 0.0.
Also, using the + sign on the Object Types to Affect, add a new entry and change it to WorldDynamic. This will allow the force to hit the bot ragdolls.
Next, pull off the Return Value on the Add Radial Force Component, search for and create a Fire Impulse node.
From the output execution pin of that node, add a Spawn Emitter at Location node.
Set its Emitter Template to Boss_Rocket_Explo.
From the output execution pin of that node, add a Spawn Sound at Location node.
Set its Sound to GrenadeExplosion_C_Cue
From the output execution pin of that node, add a Set Ammo Remaining node, which should come in set to 0.
From the output execution pin of that node, add a Force Cleanup node, which will dissolve and destroy the gun.
Create are a Self node (search for Get a reference to self). Pull off Return Value and create a a Get Actor Location node.
Connect the output of the Get Actor Location node to both the Spawn Emitter and Spawn Sound at Location nodes.
Below you can see the full graph.
The graph below has been cleaned up using re-route nodes. These are essentially pass-through nodes that enable you to better organize the connections in a graph and make the graph easier to read.
Click the icon in the upper left corner of this image to copy the Blueprint Graph and paste it into your project.
The GrenadeGunPistol is now complete. In the final step, you'll go over how to test the gun and ideas on where to take it next.