Possession and Player Dash


Jamari Williams - March 10th, 2023

This week, I continued working on possession, specifically for the skeleton, and the player and a few changes here and there to improve the game. 

 The first thing I did this week was creating a dash for the slime. The dash goes makes the player invincible for its duration and cannot be done when in the air. I experimented with using the Launch Character node in Blueprint, but it didn’t offer much versatility in how much speed the dash had over its lifetime. I looked at a couple of other ways online until settling for a timeline and setting the velocity using the output value. I wanted the dash to slow down at the end and a timeline made the most sense for this. 

Another thing I did is create a mana bar. Whenever you use special attacks on possessed enemies, it takes away from your mana. If you don’t have enough mana, you cannot do the attack, and the mana regenerates over time. I used a similar implementation to the health bar. The biggest difference is that the mana doesn’t change when you possess a new enemy or unpossess. It sticks to the slime no matter what.

For the skeleton, I created a crosshair that appears whenever you are holding the attack button. The camera moves out to the side so you can better see your target. To make it similar to a real bow and arrow, you have to pull the bow back fully for it to shoot. To make this work, I had to create a UseReleaseAttackEvent in the PossessBase to tell when the player released a button. The only issue I ran into was trying to get the camera to move back into place after it goes out. I found out the problem was that I was saving the relative locations of two start and end locations of the skeleton. I was moving the camera to these positions but didn’t give those start locations the same parent, so the relative locations were completely different. Once I gave them the same parent, everything worked fine. 

To get the health bar done quickly early on, I made it so the onscreen health bar checks the player’s health every frame and updates. This was inefficient, so I made an update UI function that updates the UI when the player takes damage, heals, or possesses an enemy. 

Overall, I am happy with my progress this week, but I feel like I can be doing more. I plan to take on bigger tasks next week to improve the game.

Leave a comment

Log in with itch.io to leave a comment.