Monday, 23 April 2018

HND Project Week 29

HND Project Week 29

Since i have changed my idea to a 3rd person shooter, i needed to create a weapon system that allows me to shoot projectiles to damage enemies and to switch between several weapons.
This set of code makes it so that the weapon variables such as ammo count and fire rate are stored when changing between them. It also spawns a particle effect to signify a change in weapon. To make the weapon fire it spawns a projectile at a velocity that will propel it forward and will do a certain amount of damage on impact. The left mouse button is to make the gun shoot.
 A piece of code called get aim transform makes it so that the projectile spawned in the same direction that the camera is pointing. This created a problem where you could shoot your self because the player model didn't face the same direction as the camera.
This blueprint makes it so that the actor follows wherever the camera points. This is a bad fix as it makes the character follow the camera wherever it is pointed. Foe example if the player looks at the ground, the actor is rotated so that the whole
body faces the floor.

To restore a players health i have created a trigger volume that sets the current player health to 100 which is the maximum.




No comments:

Post a Comment