- Shotgun will fire more bullets than other weapons, (Burst functionality)
- Its single shoot shotgun with automatic reloading, (custom reload functionality)
- Spread will be different,
- Impulse for ragdoll will be different, (Add ImpulsePower to BaseWeapon)
- Custom animation for FPP Hands to carry shotgun,
This tutorial contains basic knowledge about AI / Animations . It may be complicated for beginners so please take your time to analyze the stuff before implementing. I will create first basic enemy and it will cover:
- Behavior Tree: simple check where to go and go there if aren’t reloading,
- Animations: blending legs with rest of the body (walking -> standing),
- Animations: Playing Montages (reload animation and shoot animation),
- Animations: Look At – enemy upper body will be always rotated to player,
- Animations: TakeDamage effects without having animations,
- Animations: Ragdoll,
- AI: Ammo, Fire and Reloading,
So, let’s keep going! Continue reading
There are lots of ways for dealing damages in games. I will do more advanced stuff:
- Damage will be calculated from weapon and ammo type,
- Critical Chance will be calculated,
- I need to see what’s the damage and if there was a critical hit (UMG),
- I need to see how much HP enemy have,
- I want to have different damage depending on which body part I shoot, (eg head, leg etc)
Let’s gets started!
In this post I would like to work on:
- Increasing spread when shooting,
- Decreasing spread when in idle,
- Dynamic crosshair that will tell me what’s the current spread,
In this post I will create shooting functionality for weapons which will be easy to work with later.
- I want to have couple of ammo types, (plasma, conventional, dum etc) which can be upgraded later,
- Aiming should be physically accurate,
- There should be impact effects,
Military Weapons Silver asset package comes with almost all particles needed for weapons and ready to use: muzzle flashes, impact particles and trails. It have shell mesh as well, but it doesn’t have shell FX added. Before we move forward with next tutorial about weapons let’s create shell particle. It’s super easy!
In this post I will focus on shooting and reloading functionalities. Goals that I want to achieve:
- I want to have easy method for shooting with different weapons,
- If my weapon doesn’t have ammo it should reload automatically,
- I can reload my weapon whenever I want,
- I won’t be able to shoot if I’m changing weapon,
In this post weapon won’t fire any projectile yet but you will learn more about blueprint communication, creating animations in blueprints and doing recoil directly in animation blueprint.
Now if we have our inventory we can start adding new weapons!
- Player can choose which weapon he want to play, (for now it will be placeholder UMG we did in inventory tutorial)
- Player can change weapon during gameplay with animation, (by keyboard now)
- Weapons will attach correctly,
- Hands will update idle animation to correctly hold the weapon,
We won’t be doing shooting / reloading in this post. Let’s focus on basics first.
There is a lot of questions like:
- Can I create whole game using Blueprints only?
- What about performance if I’m using Blueprints?
- Which should I use – Blueprints or C++?
I will try to answer those in this post.