top of page
Search

Log 04: The Rest of Week 03

  • Writer: Kassandra McCormack
    Kassandra McCormack
  • Oct 4, 2023
  • 3 min read

09/28/2023 Thur:

The first thing I wanted to tackle was the ability to push mooks out of the way. At first I tried just using a boolean check and an added impulse to the pushed character's movement component. The problem here is that I could not access the bool in the pushed actor without casting it to my custom character class, and as this was in a physics call that would get really expensive really quick. So what I did is create an IPushable interface that the basic class could inherit and the child classes could override. I went with an interface because you can call interface events without a direct reference to the interface. So the mook's implementation would apply an impulse to its movement component based on the vector passed to it, and other classes could implement the interface with an empty method to avoid being pushed. I might have to make the Playable Characters be pushable when not directly controlled so that if they do clump together for some reason they won't actually block the way.


ree

I spent the rest of the night trying to get the movement while blocking / locked on to work.


09/29/2023 Fri:

I discovered my attacks weren't working since I changed over to the new Character classes!


Turns out I just forgot to populate the arrays in the Attack Controller, but it did lead me to a different problem: the hit detection code was missing. When I changed over to the new classes I did this intentionally as I had originally created my own damage event calls and instead wanted to not re-invent the wheel and instead use Unreal's built in damage event calls. Unfortunately this required me to change where all my damage calculations happened. Moving everything into the Attack Controller's Hit Detection method was simpler and less work than I had thought it would be, so that was a nice surprise.


ree

It also got me started thinking about how I would incorporate weapons into the equation. I know where the damage modifier will go, but not yet sure how to get it there, nor even how to store it. This led me to the next thing I wanted to work on: attacks with a weapon.


09/30/2023 Sat:

Spent the day trying to figure out how to do weapons. My game is going to allow the player to summon and un-summon their weapon in the middle of their attack string at will. The attacks with weapons will do more damage and hit a bigger area, but the trade off is that they will use up some of the player's Power (which is used for other things, like their ultimate attack, special abilities, and transforming).


The problem is that I didn't know how to hot-swap the animation montages between fists and weapons. In Unity I was able to nest prefabs and could access them as needed, but we can't nest blueprints (at least not able to access variables and functions in the child blueprints that I could find). At first I tried setting up various weapon blueprints with the appropriate montages, but as I said: I discovered that wouldn't work. Eventually I settled on instead of keeping everything together in one place, I would have to store them (the arrays of attacks, references to meshes, etc.) in separate places and instead link them in code. Not as elegant, but gets the job done. Then I spent a little while fussing with animation notifies and debugging why basic combos weren't working.


Now I'm faced with the more complicated problem: how to "equip" / "summon" and "unequip" / "unsummon" the weapons mid-combo. Obviously, the player can't play an equip and unequip animation in between each attack, that would just get slow and cumbersome. In my old project, I had set up a system between some particles and a shader asset that allowed me to dissolve and re-appear the weapons in the character's hand. I'm going to have to do some research to see if I can do the same in Unreal. As well as update the animation blueprint to change locomotion animations based on if the weapon is equipped or not.


ree

 
 
 

Comments


bottom of page