Oct 4, 2024
Equitable Items functionality and world interactions
Now that the inventory is finished I've been working on implimenting the items equiptable functionality and some world interaction systems. The first step I needed to create for an equiptable system is setting up an object pooling system for it. This allows for items to be referenced and turned on and moved into place when needed then turned off and moved away when they are put away. This is a much better method than spawning and destroying actors over and over which can tank performance. The first thing I created is the flare gun. This has a very basic placeholder animation of a flare going into the barrel and coming out after it has been fired. When shooting the flare I created a flare projectile that has a niagra component attached for vfx smoke and sparks when the flare is still lit. This flare also needs flare ammo in the players inventory when loading. This function simply checks the players hotbar first and if no ammo is found then moves to the inventory grid. Once one is found it will trigger the reload functionality of the animation. This system is also used for the flashlight as well as other items coming soon. The flashlight being from the '80s and found in an abandoned military base is not the highest quality light source. To stick with this design I decided to use unreals light functions to create a custom light function to allow the flashlight to flicker over time sporadically while it gets closer to the last 25% battery. Once there the light source will flicker much faster and slowly get dimmer as the battery reaches zero. The final equiptable item I created was the hand flare. This flare is fairly basic with the ability to light it playing an animation and starting a niagra vfx. As soon as this is triggered a timer starts that will burn out the flare once it reaches zero. This flare can be thrown or held to light up an area as well as scare off the enemies that are coming up next. The first world interaction I created is a movable object. This object is fairly basic as it is only used to block areas from the player or allow the player to jump up onto new areas. This object can be moved when the player walks into range and hold RMB. Then while moving the player is slowed down and a future animation will play to show the player this object is heavy in turn slowing down the players actions and opening them up to potentially dangerous enemies if they take too long. The last thing I made was a procedural ladder system. This allows for the level designer to have free reign when adding these into the level. Changing step gap and ladder height. This ladder uses various character movement functionality to ensure the player feels slower climbing as well as a controlled fall when they slide down a ladder.















