Sat for a moment to think about the new power I wanted to add. I knew I wanted it to have the ability to fire a projectile. But as the powers have two abilities, such as the heal and the self life-drain, this one should have two abilities as well. Took some time for me to decide that the other ability it would have would be a hammer, since this power is taken from the first boss. How exactly it would work I would figure out after I got the projectile to work, which was harder because it is a new type of attack that isn’t the melee or the whip.
Started off simple by testing what would happen when I spawned the projectile. I am basing it on the projectiles the boss would shoot. It would not move at first, but that’s when I remembered it was moving in the direction based on its velocity so I had to set that. So what I had to actually do was set it’s velocity to the forward vector of the camera and multiply it so it would shoot forward.
Once I got it shooting out I moved on to the next step which was tying it to an animation. I found a decent one on mixamo that shows the arm having some recoil upon firing. It fit the attack well. It wasn’t going exactly in the center of the crosshair because it was firing from the character not the center of the screen/camera. I fixed this by moving the firing point to the head so it is closer to the crosshair, and the hitbox is quite large so it isn’t too hard to hit a target with it.
From there I had to decide how much the shooting cost, and then I added logic where it would update the resource bar based on the current power selected. This is to show on the resource whether or not you have enough Primelight to cast the ability. It was easy because I already had it in place for the heal. I just had to create a new variable that I would set as the current power’s value. And every power has a enhanced power to it as well. So it has a super shot that is bigger and does more damage. I want to add a better animation to it, but I haven’t found the right one just yet.
The hammer attack was fairly straight forward to add, but had a few issues because it could overlap the shoot animation but I fixed it so you can’t shoot while attacking. Also I realized the sword mesh I was using for the weapon was upside down so when I changed the appearance of the weapon to a hammer, it was upside down. To get around this I switched the sword model to one that was facing upwards. With that the hammer was right side up and it fit the animations quite well. I just had to incorporate the logic for movement, damage, etc.
I added effects to the hammer along with its enhanced move set. When the player is enhanced they will slam the ground. I also needed to add indicators of when the powers were switched, so I added sound and also changed the image beside the resource bar that I had first put just for the dash indicator, but now it’s a useful image to show what power you are on. I quickly updated the control menu for the keyboard and gamepad so the new inputs for the powers would be there.
The indicator on the resource bar was not enough. I needed something more clear, which was changing the color of the lantern. I was a bit hesitant to do this at first because I didn’t only have to change the color of the material of the lantern, but I had to change the color of its lights, and cone model too. It wasn’t actually as difficult as I thought. And it turned out to look really nice to have a different lantern color. But I will probably add one more indicator as well once I’ve figured out what. There may be some colorblind people who will find it hard to see the lantern as a different color. And the indicator on the resource bar is a bit small and can be easy to miss. So I would probably find another visual indicator that is more obvious than a change of color.
My final addition to the abilities was adding a ring that the player can summon using the hammer when enhanced. I was feeling that the hammer was missing something more. It was lackluster and it needed something more as an incentive to have it as a viable attack. So when the hammer smashes the ground it summons a ring just like the boss.
I will continue improving and refining the new powers. I have to make sure they were in tandem with all the other controls and there are probably other bugs I haven’t seen or figured out yet. So far so good though. I’m definitely heading in the direction I want to go. Other than this there will probably be only one more power just for simplicity and my peace of mind. The other abilities will only be passives such as double jumping and air dashing.

























