6. Adding Visual Effects

Choose your OS:

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.

Steps

  1. Using the techniques learned in previous sections, create a Add Radial Force Component node.

    image alt text

  2. 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.

    image alt text

  3. 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.

    image alt text

  4. 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.

    image alt text

  5. Next, pull off the Return Value on the Add Radial Force Component, search for and create a Fire Impulse node.

    image alt text

  6. From the output execution pin of that node, add a Spawn Emitter at Location node.

    image alt text

  7. Set its Emitter Template to Boss_Rocket_Explo.

    image alt text

  8. From the output execution pin of that node, add a Spawn Sound at Location node.

  9. Set its Sound to GrenadeExplosion_C_Cue

    image alt text

  10. From the output execution pin of that node, add a Set Ammo Remaining node, which should come in set to 0.

  11. From the output execution pin of that node, add a Force Cleanup node, which will dissolve and destroy the gun.

    image alt text

  12. Create are a Self node (search for Get a reference to self). Pull off Return Value and create a a Get Actor Location node.

    image alt text

  13. Connect the output of the Get Actor Location node to both the Spawn Emitter and Spawn Sound at Location nodes.

    image alt text

  14. 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.

    Copy Node Graph

    Click the icon in the upper left corner of this image to copy the Blueprint Graph and paste it into your project.

Results

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.