Stamina and more | Tech Discussion


There was a lot that I did in the background and the foreground of the game. A few early wins that I got out of the way were the integration of console commands to allow players to fill their mana and to activate a god mode which will make them invincible. It was interesting to make  as it created an issue of realizing that we needed to make an enum of damage types to allow the player to take more than one type of damage. This was a great find too as it sets up the basis for blocking.  This is the current console command layout.


The other feature that I integrated was the stamina regeneration and the beginning of the stamina usage for roll. There is still some polishing that is needed to be done on the regeneration but it had an interesting issue of figuring out how to regen over a set rate that is exponential instead of a 1 + 1 incrementation. With that, I looked into the Timeline nodes that Unreal has available. With the timeline, I was able to set up the exponential regeneration which is slow at first but increases the regeneration speed over time. Finding the right amount to regenerate as well as the time was complicated and even then it is still not perfect as I want a delay to work with it to where every time you need to regenerate stamina it not only restarts the timeline with every action but there is a slight delay to the start of the regeneration to make it more of a scarce resource than something that exists to exists at the moment. The next images show the setup for the regeneration.


There were some issues, however. While I did implement a target lock and it works it does not work the way we want. There are quite a few issues with how the target lock works so I am completely reworking it so that way not only can you target lock but you will still be able to roll freely, switch targets, only target a  single enemy and not be able to target through walls. There is a lot to work on and part of that is currently my find nearest enemy is being found through a multi-sphere trace. While I think I am on the right track as it is locating the nearest target, I am not taking into account some edge cases so it needs to be reworked on that aspect.  This is the current find nearest target function. 


One good thing that I I was able to do with the target lock though was that i was able to add a distance check. Once you leave a certain radius the target lock will automatically toggle off. Below is how I integrated it with the event tick camera lock check.

On the non-coding side of the project, I added a new animation for the spells and added a few sounds for a few animations as well to give more multi-sensory feedback.

Next time I will update everyone on the camera situation and I might tackle a reworking of the spell system on the back end as well.


Author: Amara Gitomer

Get Mythicism

Leave a comment

Log in with itch.io to leave a comment.