Jan 3, 2025
Its Time To Make a Gun *in game*
Finally were now able to shoot, sort of, well we can shoot red debug lines. Creating this pistol has been fairly easy considering it is very similar to the flare gun I created already. The one main difference is this has ammo and not just a bool of if its loaded or not. With this ammo came the real difference as I needed to keep track of how much ammo is in the gun with multiple different ways the player can interact with this gun. Such as loading in more ammo, shooting the gun, but also being able to keep track of all this while the player is able to leave this gun in a storage locker take it out of their inventory or even drop it on the ground. Because of this I added a feature that I didn't even think to add when I made the flare gun. Inside the players inventory component it will keep track of the weapons ammo but also keep track of what item id that weapon was. This allows for the ability to have multiple pistols in the game while each one can be manipulated in any way possible but still keeping the correct ammo inside it. Along with the gun I also created a similar ADS mechanic to the flare gun with a just as similar placeholder animation for this action. Of course with a gun that you can shoot there also needs to be a way to reload this weapon. For this I created the pistol ammo items with a very cool programmer art icon of the exact same gun icon but smaller. Thankfully this ammo is very easy to implement thanks to the convenient inventory system and item data table I created before. It was as easy as making a new row in a data table assigning some values and making a new child blueprint off the base item class.











