This tutorial will show you how to create a simple Shotgun weapon in the Unreal Tournament project, using C++.
Some existing C++ & Unreal Engine knowledge is needed.
- Engine version: 4.6+
- Skill level: Beginner - Intermediate
- Unreal Tournament Jan 2015 or Later
A shotgun is one of the most prototypical first-person shooter weapons. While Unreal Tournament has the Flak Cannon, which in some respects resembles a shotgun, it lacks a true shotgun weapon. In this tutorial I intend to demonstrate a simple and straightforward way to go about building a shotgun weapon within the Unreal Tournament project. I will also cover some of the more common features you might want to incorporate to make your shotgun code more flexible.
In videogames, shotguns typically have the following characteristics:
- Fires a cluster of instant-hit shots in a single burst
- Shots spread out quickly by distance
- Damage to target falls off by distance
- High single shot damage, long reload time
- Spread pattern may vary from shotgun to shotgun