Zombie Shooter

I created this project to further improve my Unreal Engine 4 skills.
With this project I wanted to learn more about AI, pickups, HUD and fractured meshes.

With that in mind I created a game where you have to fight your way through zombies to get to an object that you should pickup and then bring it back to where you started.
Since I also wanted to learn about fractured meshes I took some of the default meshes and made them to fractured meshes. I added some blueprint functionality to them so that when they are shot at or the player is colliding with them, they explode.

The game has 1 level.
The file is around 330MB large.


Download the game

Blueprints
In this long blueprint I shoot a raycast from the center of the camera and forward. At the hitpoint of the raycast I add a smoke particle and a decal so that the player can more easily see where the shot landed. I also add some rotation in the Z and Y axis to simulate recoil.

In this blueprint I check if the left mouse button is pressed, and if it is pressed I open a gate which do a sequence between a delay and firing the weapon. When the player releases the left mouse button the gate is closed and the weapon will stop firing.

In this blueprint I check if the player has press R to reload. I then play a reload sound and set the ammocount back to 30.

In this blueprint I change the location of the weapon mesh to simulate that the player is aiming down the sights. I also change the movement speed so that the player is slower while aiming down the sights and is also more accurate.

In this blueprint I play an animation so that the mesh is rotating and going up and down slowly. I also check that when the player is colliding with the mesh I play a sound and add 20 health points. I also do a clamp on the health points so that the player can’t have anymore than 100 health points.
The blueprint for the grenades is more or less the same, but I add 1 grenade to the grenade amount instead, and the player can have a maximum of 5 grenades.

In this blueprint I check if the player is colliding with the mesh or if the mesh takes any damage. When that happens I wake the mesh’s rigidbody and add a radial force so that the fractured parts fly away.

In this blueprint I check the health of the AI and the range to the player. If the health gets below 0 the AI will ragdoll and then disappear after 10 seconds.
If the player is within the aggro range of the AI the AI will start running towards the player.

In this blueprint I check if the AI is colliding with the player. If the player is colliding with the AI the AI will explode and apply damage to the player.

Pictures